468,104 Members | 1,436 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,104 developers. It's quick & easy.

Multiple joins in SQL Server

Hi I have a requirement where in i haev to convert the SQL from Oracle
to the one which will run on the SQL server.

in the Oracle Query i am doing multiple joins, between some 13 tables.
and some of these joins are inner joins and some are Left outer joins.

table1 inner joined with table 2
table2 inner join with table3
table2 inner join with table4
table2 left join with table5
table5 left jin with table6
table6 left jin with table7
table7 left jin with table8
table8 left jin with table9

Any idea how to achieve this??

Tia
naren
Jan 4 '08 #1
2 19385
narendra vuradi wrote:
Hi I have a requirement where in i haev to convert the SQL from Oracle
to the one which will run on the SQL server.

in the Oracle Query i am doing multiple joins, between some 13 tables.
and some of these joins are inner joins and some are Left outer joins.

table1 inner joined with table 2
table2 inner join with table3
table2 inner join with table4
table2 left join with table5
table5 left jin with table6
table6 left jin with table7
table7 left jin with table8
table8 left jin with table9
Easy peasy, e.g.

select <list of fields>
from table1
join table2 on table1.a = table2.a
join table3 on table2.b = table3.b
join table4 on table2.c = table4.c
left join table5 on table2.d = table5.d
left join table6 on table5.e = table6.e
left join table7 on table6.f = table7.f
left join table8 on table7.g = table8.g
left join table9 on table8.h = table9.h
Jan 4 '08 #2
Narendra,

Assuming on Oracle you don't face the deprecated (+) syntax it should be
identical since the JOIN syntax is SQL Standard. What fails?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jan 4 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Ed_No_Spam_Please_Weber | last post: by
16 posts views Thread by Randy Harris | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.