QuestionQ57

VerifiedUsing Single-Row and Aggregate Functions

You run this query:

SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'), 'dd `Monday for` fmMonth rrrr')  

What is the result?

Explanation

Oracle datetime format models reproduce literal text only when it is enclosed in double quotation marks. Backticks are not valid delimiters for a character literal in the format model, so the TO_CHAR call generates an invalid date-format error.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!