Q
Problem solve Get help with specific problems with your technologies, process and projects.

Joining more than two tables

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.

 

 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

Dig Deeper on Microsoft SQL Server Installation

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close