Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

TRUNC date function

1060309Dec 20 2013 — edited Dec 20 2013

when i am executing the following queries

select trunc('25-JUL-08','YEAR') from dual;

select trunc('25-JUL08','MONTH') from dual ;

none of the query is working in sql developer and prompting the following message

Error starting at line 1 in command:

select trunc('25-JUL-08','MONTH')

from DUAL

Error report:

SQL Error: ORA-01722: invalid number

01722. 00000 -  "invalid number"

*Cause:   

*Action:

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 17 2014
Added on Dec 20 2013
3 comments
973 views