[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: SQR Error



Hi
     We faced the same problem. This error occurs because in your where
clause, the two date values that you are comparing, are not in the same
format. For e.g. - If you display effdt and $Thrudate they might not be in
the same format.
Effdt ( the one that you are retrieving from the database) should be in the
format described in the setenv.sqc under the NLS_DATE_FORMAT setting.
Sometimes this does not work and you might have to set the NLS_DATE_FORMAT
inside the SQR within a begin-sql end-sql block like this.

BEGIN-SQL
   ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'
END-SQL

This statement will retrieve all the dates from the database in the
'DD-MON-YYYY' format. Since $Thrudate and $AsOfDate are also in this
format, the date formats will match and the error should not occur.

Hope this helps.