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!

Add Year

sliderrulesNov 15 2010 — edited Nov 15 2010
Hi,

I have a query where I am converting a date to a year field and adding 1 onto the year:

to_char(s.active_month, 'YYYY')+1

active_month is in date format DD-MON-YYYY

I get an error message:

ORA-00932: inconsistent datatypes: expected NUMBER got CHAR
00932. 00000 - "inconsistent datatypes: expected %s got %s"


Can anyone help with converting this field to a number?

Thanks

Edited by: sliderrules on 15-Nov-2010 08:56
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 13 2010
Added on Nov 15 2010
13 comments
351 views