PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Operator error  (Read 446 times)

mm_coder

  • Member
  • **
  • Posts: 5
    • View Profile
Operator error
« on: February 27, 2023, 09:16:59 PM »
Select tbl.column, tbl.column....
FROM tbl
WHERE SO_SalesOrderHeader.OrderDate>'2023/01/28'

attempting to get records > than '2023'01'28' below error

[ProvideX][ODBC Driver]Invalid operand for operator: >

Is there a syntax here I'm missing?

Very best regards,
Bret

mm_coder

  • Member
  • **
  • Posts: 5
    • View Profile
Re: Operator error
« Reply #1 on: February 27, 2023, 09:35:52 PM »
Well, while hunting I found this syntax that worked for my query.

WHERE SO_SalesOrderDetail.ItemCode='S-205180' AND SO_SalesOrderHeader.OrderDate> {d'2022-06-01'}

The {d'2022-06-01'} solved this problem.

Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 382
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: Operator error
« Reply #2 on: February 28, 2023, 08:29:10 AM »
You must be using a older version of the ODBC driver. Since version 6 (released 2016) of the PxPlus SQL ODBC driver it supports dates with or without the date being escaped.
Principal Software Engineer for PVX Plus Technologies LTD.