Click here to Skip to main content
15,039,470 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, Iam using VS2010. DataBase-MSAccess2010. While I use the multiple Left Outer Join Query,
Iam facing trouble.

My Query
SQL
Select dc.*, it.itm_description, pt.pty_name 
from dcmst dc 
left outer join itemmst it on dc.itm_code = it.itm_code 
left outer join partymst pt on dc.del_pty_code = pt.pty_code

Receiving the error
OLEDB Exception was unhandled
Syntax error ( missing operator) in query expression 'dc.itm_code=it.itm_code left outer join partymst pt on dc.del_pty_code=pt.pty_cod'.
Really I can't understand my mistake...Does anybody can point my mistake..

Thanks for the helps
Posted
Updated 14-Jun-14 22:58pm
v3

Learn from someone who made the same mistake: multiple-left-joins-in-ms-access.html[^]
   
Comments
Nelek 15-Jun-14 6:18am
   
OP thanked you in a non-solution
Peter Leow 15-Jun-14 6:23am
   
Thanks Nelek.
As peter's answer you need additional pair(s) of parentheses but still you will get syntax error.
Use a LEFT JOIN operation to create a left outer join
SQL
Select dc.*, it.itm_description, pt.pty_name 
FROM (dcmst dc LEFT JOIN itemmst it on dc.itm_code = it.itm_code) LEFT JOIN partymst pt on dc.del_pty_code = pt.pty_code
   
Comments
Nelek 15-Jun-14 6:18am
   
OP thanked you in a non-solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900