Issue with TIMESTAMPDIFF from SQL Server

ianjdudley

New Member
I'm trying to run a simple comparison of dates in a DTS script on SQL Server 7 pulling in date from a Progress database. The code I am trying to run is:

SELECT * FROM IRECOF WHERE TIMESTAMPDIFF(SQL_TSI_DAY, CURRENT_DATE, IRDTTR) <= 2

(IRDTTR is a transaction date field in the Table IRECOF, that is of DATE type.)

When I parse this code through the "Build Query" syntax-checker in DTS (which I understand checks that the SQL syntax is suitable for Progress), I get this error message:

"ADO Error. [OpenLink][ODBC][Progress Server]** Unable to understand after WHERE TIMESTAMPDIFF (247)."

Have been searching for a solution to this for quite a while. Any idea what I am doing wrong?

Thanks

Ian
 
Back
Top