Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 INNER JOIN Syntax

Author  Topic 

ramdas
Posting Yak Master

181 Posts

Posted - 2002-12-26 : 11:23:16
Hi Folks,
I have 3 tables called CMS,Gate and Answer.
I have to join the GATE and CMS on Gate Number, join GATE and Answer table on Region. How would I do this using the new INNER JOIN syntax, I am getting confused as to the placement of the tables in the syntax.

Bye
Ramdas

Ramdas Narayanan
SQL Server DBA

MichaelP
Jedi Yak

2489 Posts

Posted - 2002-12-26 : 11:26:46
Something like the following:


SELECT c.Field, g.Field, a.Field -- WHATEVER SELECT FIELDS
FROM CMS c
INNER JOIN Gate g ON g.GateNumber = c.GateNumber
INNER JOIN Answer a ON a.RegionID = g.RegionID
WHERE c.Field = @SomeValue



Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

ramdas
Posting Yak Master

181 Posts

Posted - 2002-12-26 : 12:20:37
Thank you
Bye

Ramdas Narayanan
SQL Server DBA
Go to Top of Page
   

- Advertisement -