PxPlus User Forum

Main Board => Discussions => ODBC => Topic started by: eldonfsr on June 11, 2021, 11:17:48 AM

Title: Join Tables Error Identifier
Post by: eldonfsr on June 11, 2021, 11:17:48 AM
I have this SQL statements but when is executed send a error not found indentifier

select PurchaseOrderNumber, PurchaseOrderDate, Vendorname, ItemNumber  from  {  oj   #PO1_PurchaseOrderEntryHeader  INNER  JOIN #PO2_PurchaseOrderEntryLine ON #PO1_PurchaseOrderEntryHeader.PurchaseOrderNumber = #PO2_PurchaseOrderEntryLine.PurchaseOrderNumber }  WHERE  PO1_PurchaseOrderEntryHeader.PurchaseOrderDate =  {d"2015-08-05"}

what i doing wrong...
Title: Re: Join Tables Error Identifier
Post by: Devon Austen on June 11, 2021, 12:39:49 PM
Is the # symbol part of the table name?

If it is not then it likely is the problem as that is not supported syntax.

If it is part of the table name then it looks like it is missing from the WHERE clause.
Title: Re: Join Tables Error Identifier
Post by: eldonfsr on June 11, 2021, 12:46:14 PM
select *   from  {  oj   PO1_PurchaseOrderEntryHeader  INNER  JOIN PO2_PurchaseOrderEntryLine ON PO1_PurchaseOrderEntryHeader.PurchaseOrderNumber = PO2_PurchaseOrderEntryLine.PurchaseOrderNumber }  WHERE  PO1_PurchaseOrderEntryHeader.PurchaseOrderDate =  {d"2015-08-05"}

even i write without # is the same message...
 
Title: Re: Join Tables Error Identifier
Post by: Devon Austen on June 11, 2021, 02:15:23 PM
Are the table names all correct and is that the correct field names?

If you do it without the WHERE clause to test does it work?