I am creating a report using SQL Server 7 Query Analyzer. I mainly work with Oracle SQL, which has a slightly different syntax. I have three tables and want to return all matching rows from the tables. Using JOINS I can join two tables together, but I am not sure how to join three tables in MS SQL. This statement is what I am trying to achieve:
 SELECT c.profilename, c.loginuser, s.company, s.product , s.filedescription, i.systemserialnumber FROM hstcomputers C FULL OUTER JOIN sigsoftware S, hstIdentification i ON c.id = i.id AND s.sigid = i.sigid
I know the third table in the FROM is the wrong syntax, but I am not 100% sure how it should be, as everything I have read is based around joining two tables.

    Requires Free Membership to View

 

 Select columns From table1 inner join table2 on table1.col1 = table2.col2 Inner join table3 on table1.col1 = table3.col2 Inner join table4 on table2.col1 = table4.col5 Inner join table5 on table3.col1 = table5.col17
Etc.

 

For More Information

This was first published in July 2003

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.