How to Left join more than two table ? 
Author Message
 How to Left join more than two table ?

I try many time but no success in VB6....
what I have try before:
 1)select tableB.field1, tableC.field2 from tableA left join
   tableB,tableC on tableA.field1=tableB.field1 AND
   tableA.field2=tableC.field2
 2)select tableB.field1, tableC.field2 from {oj {oj tableA left join
   tableB on tableA.field1=tableB.field1 } left join tableC on
   tableA.field2=tableC.field2 }

  How to write the SQL if I want Left Join more than two table ?



Thu, 27 Dec 2001 03:00:00 GMT  
 How to Left join more than two table ?
You have to nest the joins. Try:

select tableB.field1, tableC.field2
from (tableA left join tableB on tableA.field1=tableB.field1) left join
tableC  on  tableA.field2=tableC.field2

Quote:

>I try many time but no success in VB6....
>what I have try before:
> 1)select tableB.field1, tableC.field2 from tableA left join
>   tableB,tableC on tableA.field1=tableB.field1 AND
>   tableA.field2=tableC.field2
> 2)select tableB.field1, tableC.field2 from {oj {oj tableA left join
>   tableB on tableA.field1=tableB.field1 } left join tableC on
>   tableA.field2=tableC.field2 }

>  How to write the SQL if I want Left Join more than two table ?



Thu, 27 Dec 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Joining two tables from two databases

2. Here's a sticky wicket - joining two tables on two diffrent servers with ADO

3. Table join between two tables in different databases

4. Deletion from LEFT JOINed tables - very basic question

5. Deletion from LEFT JOINed tables - very basic question

6. LEFT JOIN WITH AN EXTERNAL TABLE

7. Deletion from LEFT JOINed tables - very basic question

8. Need info from table that is linked through another left outer join

9. SQL statement on 2 or more tables (left outer joins)

10. Deletion from LEFT JOINed tables - very basic question

11. LEFT JOIN not selecting all records in originating table

12. AdoDC with LEFT JOIN deletes from both tables

 

 
Powered by phpBB® Forum Software