Operator error

Started by mm_coder, February 27, 2023, 09:16:59 PM

Previous topic - Next topic

mm_coder

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

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

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.