Left join Query error 
Author Message
 Left join Query error

When running the following query in access it works fine.
When I try to use it in my vb program through an sql
string, the recordset is not created.  I am looking for
any information in trying to do multiple left outer joins.

SELECT ItemInformation.[Order Date], ItemInformation.[Qty
Order],ItemInformation.ITEMNMBR, ItemInformation.ITEMDESC,
ItemInformation.UOMSCHDL,ItemInformation.WRNTYDYS AS
EACHES, ItemInformation.QTYONORD, [QTYONHND]-[ATYALLOC] AS
QTYAVLBLE,ItemInformation.PRIMVNDR,
ItemInformation.VNDITNUM, ItemInformation.PrchUoM,
[CurrentWeek-3SOP].StartWeek,[CurrentWeek-
3SOP].QtyInvoiced, [CurrentWeek-3SOP].QtyOrdered,
[CurrentWeek-2SOP].StartWeek, [CurrentWeek-
2SOP].QtyInvoiced,[CurrentWeek-2SOP].QtyOrdered,
CurrentWeekSOP.StartWeek, CurrentWeekSOP.QtyInvoiced,
CurrentWeekSOP.QtyOrdered FROM ((ItemInformation LEFT JOIN
[CurrentWeek-2SOP] ON ItemInformation.ITEMNMBR =
[CurrentWeek-2SOP].ITEMNMBR) LEFT JOIN [CurrentWeek-3SOP]
ON ItemInformation.ITEMNMBR = [CurrentWeek-3SOP].ITEMNMBR)
LEFT JOIN CurrentWeekSOP ON ItemInformation.ITEMNMBR =
CurrentWeekSOP.ITEMNMBR;
Thanks!



Tue, 29 Nov 2005 00:30:56 GMT  
 Left join Query error

Quote:

>When running the following query in access it works fine.
>When I try to use it in my vb program through an sql
>string, the recordset is not created.  I am looking for
>any information in trying to do multiple left outer joins.

>SELECT ItemInformation.[Order Date], ItemInformation.[Qty
>Order],ItemInformation.ITEMNMBR, ItemInformation.ITEMDESC,
>ItemInformation.UOMSCHDL,ItemInformation.WRNTYDYS AS
>EACHES, ItemInformation.QTYONORD, [QTYONHND]-[ATYALLOC] AS
>QTYAVLBLE,ItemInformation.PRIMVNDR,
>ItemInformation.VNDITNUM, ItemInformation.PrchUoM,
>[CurrentWeek-3SOP].StartWeek,[CurrentWeek-
>3SOP].QtyInvoiced, [CurrentWeek-3SOP].QtyOrdered,
>[CurrentWeek-2SOP].StartWeek, [CurrentWeek-
>2SOP].QtyInvoiced,[CurrentWeek-2SOP].QtyOrdered,
>CurrentWeekSOP.StartWeek, CurrentWeekSOP.QtyInvoiced,
>CurrentWeekSOP.QtyOrdered FROM ((ItemInformation LEFT JOIN
>[CurrentWeek-2SOP] ON ItemInformation.ITEMNMBR =
>[CurrentWeek-2SOP].ITEMNMBR) LEFT JOIN [CurrentWeek-3SOP]
>ON ItemInformation.ITEMNMBR = [CurrentWeek-3SOP].ITEMNMBR)
>LEFT JOIN CurrentWeekSOP ON ItemInformation.ITEMNMBR =
>CurrentWeekSOP.ITEMNMBR;

It's most likely a line continuation and/or quoting problem.
If you can't find the problem, post back with the code
you're using to do all this.

--
Marsh
MVP [MS Access]



Tue, 29 Nov 2005 05:56:49 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Query Left Join Causes Access to crash only in Windows 2000

2. LEFT JOIN does not work in query

3. LEFT JOIN QUERY

4. left join query performance

5. PRB: Left join behaves like a inner join.

6. LEFT JOIN and ERROR 3027 problem

7. Editing and Updating join query causes error?

8. JOIN query skips records without error

9. Update query using joined query as source

10. Left joins from code?

11. Setting Left Join

12. Deletion from LEFT JOINed tables - very basic question

 

 
Powered by phpBB® Forum Software