Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Sql Server Programming

Question on Inner Joins


I need to do a join between the following tables

A -> B
B -> C
A -> D
A-> E

I know how to do all the joins between A and B and A and D and A and E but
how I do insert the join between
 B and C

from A inner join B on A.key = B.key inner D on A.key = D.key inner join E
on A.key = E.key

Where does the B -> C join fit in here.

Thanks
Bill

Just add "inner join C on B.key = C.key" anywhere after the table B has been
referred to in the join list.
Cheers,
             Paul Ibison SQL Server MVP, www.replicationanswers.com

-----------------------------------------------Reply-----------------------------------------------
Hi Bill,

> I need to do a join between the following tables

> A -> B
> B -> C
> A -> D
> A-> E

> I know how to do all the joins between A and B and A and D and A and E but
> how I do insert the join between
>  B and C

> from A inner join B on A.key = B.key inner D on A.key = D.key inner join E
> on A.key = E.key

> Where does the B -> C join fit in here.

Anywhere after the A -> B join.

--
Best regards,
Marcin Guzowski
http://guzowski.info

-----------------------------------------------Reply-----------------------------------------------

On Feb 18, 11:12 am, "Marcin A. Guzowski"

You can also add the condition at the end in a where statement.

Thanks
Mahesh

-----------------------------------------------Reply-----------------------------------------------

lucky wrote:
> You can also add the condition at the end in a where statement.

You're right but I think that's not a good idea to mix two joining
methods (explicit INNER JOIN and SQL:1989 WHERE style).

--
Best regards,
Marcin Guzowski
http://guzowski.info

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc