PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Join Tables Error Identifier  (Read 1129 times)

eldonfsr

  • Silver Member
  • ***
  • Posts: 39
    • View Profile
Join Tables Error Identifier
« 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...
« Last Edit: June 11, 2021, 02:19:12 PM by Mike King »

Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 382
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: Join Tables Error Identifier
« Reply #1 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.
« Last Edit: June 11, 2021, 02:20:03 PM by Mike King »
Principal Software Engineer for PVX Plus Technologies LTD.

eldonfsr

  • Silver Member
  • ***
  • Posts: 39
    • View Profile
Re: Join Tables Error Identifier
« Reply #2 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...
 
« Last Edit: June 11, 2021, 02:19:49 PM by Mike King »

Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 382
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: Join Tables Error Identifier
« Reply #3 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?
« Last Edit: June 11, 2021, 02:19:37 PM by Mike King »
Principal Software Engineer for PVX Plus Technologies LTD.