0

My original query worked perfectly via SQL Developer:

select * from [table] where DT_CURRENT_DT = '15-OCT-18'

However when ran via freehand SQL in SAP BO I got no results. After running the query with no conditions I noticed that BO re-formats the date to 10/15/18

0

to_date function solved the issue and now the condition is recognized by BO's freehand SQL.

DT_CURRENT_DT = to_date('10/15/18', 'MM/DD/YY')

| improve this answer | |
  • 1
    Better use to_date('10/15/18', 'MM/DD/RR') or much better to_date('10/15/2018', 'MM/DD/YYYY') - did you never hear about the Y2K-Problem? - (I see I am getting old. Nowadays developers were still young kids when the Y2K topic was all over in the news) – Wernfried Domscheit Nov 16 '18 at 17:51
  • 1
    Always use 4-digit years. The 'RR' trick is a band-aid fix for the Y2K problem. If you read the Oracle documentation, The answer can change at the year 2050. – Michael Kutz Nov 18 '18 at 23:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.