Change: 
LEFT JOIN (BillOfMat LEFT JOIN ItemMaster ON BillOfMat.CompNum
=ItemMaster.ParentNum) 
ON BillOfMat_1.CompNum = BillOfMat.ParentNum

to:
LEFT JOIN BillOfMat ON BillOfMat_1.CompNum = BillOfMat.ParentNum LEFT JOIN
ItemMaster ON BillOfMat.CompNum =ItemMaster.ParentNum 

You cannot do embedded joins

-----Original Message-----
From: Mike Mike [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 11:24 AM
To: [EMAIL PROTECTED]
Subject: Help on SQL Statement


Hello,
I've been working on this for a long time now and I
cannot figure this out.
Can someone help me get this sql statement without
erroring or why it doens't work.
Here is the SQL statement...

SELECT DISTINCT ItemMaster.ParentNum,
ItemMaster.Desc1, ItemMaster.Price 
FROM BillOfMat AS BillOfMat_1 
LEFT JOIN (BillOfMat 
LEFT JOIN ItemMaster ON BillOfMat.CompNum =
ItemMaster.ParentNum) 
ON BillOfMat_1.CompNum = BillOfMat.ParentNum 
WHERE (((ItemMaster.ParentNum) Like "200*") AND
((BillOfMat_1.Kw)='25') AND 
((BillOfMat_1.Engine)='G') AND
((BillOfMat_1.Fuel)='NL'));

..And here is the error I get.
ERROR 1064: You have an error in your SQL syntax near
'(BillOfMat
LEFT JOIN ItemMaster ON BillOfMat.CompNum =
ItemMaster.ParentNum)
O' at line 3
Thank you for your help
  --Mike

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to