I can enter the SQL line below in Transact-SQL in SQL 7.0 and it runs fine. When I try to run it in Access 2000 I get the following error:
Syntax Error (Missing Operator) in query expression
'CAST(prod_list.prod_no AS char(10)) = ord_list.part_no)'
Based on all documentation I've read it looks fine and it runs in Query Analyzer in SQL 7.
All I'm doing with the CAST expression is converting an INT field to a char(10) field to compare the prod_no field to the part_no field.
Here's the SQL line:
SELECT prod_no, prod_list.seq_no, prod_list.part_no, prod_list.description, prod_list.plan_qty
FROM (OrdItem INNER JOIN OrdMain ON OrdItem.Order_ID = OrdMain.Order_ID) INNER JOIN (prod_list INNER JOIN ord_list ON CAST(prod_list.prod_no AS char(10)) = ord_list.part_no) ON (OrdItem.SequenceOfItems = ord_list.line_no) AND (OrdMain.ExternalID = ord_list.order_no);
Any help would be appreciated...
Thanks,
Bessebo
Syntax Error (Missing Operator) in query expression
'CAST(prod_list.prod_no AS char(10)) = ord_list.part_no)'
Based on all documentation I've read it looks fine and it runs in Query Analyzer in SQL 7.
All I'm doing with the CAST expression is converting an INT field to a char(10) field to compare the prod_no field to the part_no field.
Here's the SQL line:
SELECT prod_no, prod_list.seq_no, prod_list.part_no, prod_list.description, prod_list.plan_qty
FROM (OrdItem INNER JOIN OrdMain ON OrdItem.Order_ID = OrdMain.Order_ID) INNER JOIN (prod_list INNER JOIN ord_list ON CAST(prod_list.prod_no AS char(10)) = ord_list.part_no) ON (OrdItem.SequenceOfItems = ord_list.line_no) AND (OrdMain.ExternalID = ord_list.order_no);
Any help would be appreciated...
Thanks,
Bessebo