YOU need to display the date ll-oct-2007 in words as ‘Eleventh of October, Two Thousand
Seven’. Which SQL statement would give the required result?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
YOU need to display the date ll-oct-2007 in words as ‘Eleventh of October, Two Thousand
Seven’. Which SQL statement would give the required result?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Correct answer is
C.
Option C
SQL> select to_char(to_date(’11-oct-2007′), ‘fmDdspth “of” Month, Year’) from dual;
TO_CHAR(TO_DATE(’11-OCT-2007′),’FMDDSPTHOFMONTH,YEAR’)
—————————————————————————
Eleventh of October, Two Thousand Seven
Yeap, answer is C.
Yah. Answer is C
@MKR, You actually tested the version A with spth, not C.
A is correct.
SQL> select to_char(’11-oct-2007′,’fmDdspth “of” Month,Year’) from dual ;
select to_char(’11-oct-2007′,’fmDdspth “of” Month,Year’) from dual
*
ERROR at line 1:
ORA-01722: invalid number
SQL>
Can someone give a proper explanation of option A being right.
C