We are connected to NetSuite via REST API, and using SuiteQL to do some kinds of work.
We found this example query to find deleted transactions:
using a query like this:
SELECTTO_CHAR ( DeletedDate, 'DS TS' ) AS DeletedDate,Type AS RecordType,RecordID,BUILTIN.DF( DeletedBy ) AS DeletedBy,BUILTIN.DF( Context ) AS Context FROM DeletedRecord WHERE ( DeletedDate >= TO_DATE ( TO_CHAR ( SYSDATE, 'YYYY-MM-DD' ), 'YYYY-MM-DD' ) )
But when we try it we get an error message:
What is the correct query syntax for this?