PxPlus User Forum

Twitter Twitter Twitter

Author Topic: invalid Operand for operator <Assigment>  (Read 1308 times)

eldonfsr

  • Silver Member
  • ***
  • Posts: 39
    • View Profile
invalid Operand for operator <Assigment>
« on: November 29, 2020, 08:13:50 PM »
I have this sql statements to ejecute  but send that error

 INSERT INTO PO5_ReceiptEntryHeader ( vendornumber , ReceiptNumber ,  batchnumber , ReceiptType ,InvoiceNumber,InvoiceDate,InvoiceDueDate,PurchaseOrderNumber,TaxableAmount)
VALUES(                               'CONT'     ,'064509'       , '00011'      ,'I'          ,' CAESC7796'  ,'10/29/2020','11/28/2020','T11499   ','     430.45')

i using c# i dont know if i have to use " or ' to in close value or is wrong date format .

please help me thanks.
 



Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 383
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: invalid Operand for operator <Assigment>
« Reply #1 on: November 30, 2020, 09:30:44 AM »
The date format is 'YYYY-MM-DD'.

If you are using a version of the ODBC driver earlier then version 6 you have to use the escaped date format {d 'YYYY-MM-DD'}. Versions after 6 can use either the escaped format or just the date string.

The ODBC driver uses single quotes to enclose string values including date strings.
Principal Software Engineer for PVX Plus Technologies LTD.