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!

insert date as string of numbers

967472Oct 10 2012 — edited Oct 10 2012
Hi,

I'm new to Oracle & PL/SQL, so I assume this is pretty beginnerish. I can't figure out why this doesn't work on an Oracle db (it does on SQL Server).

I have table T(id integer, mydate date). If I do inserts like this:

insert into T values(1,'30-02-2012')

I get this err:

"Error starting at line 1 in command:
insert into Rating values(201, 101, 2, '24-01-2011')
Error report:
SQL Error: ORA-01843: not a valid month
01843. 00000 - "not a valid month"
*Cause:
*Action:"

It only works with a month mask ( insert into T values(1,'30-FEB-2012') ). This doesn't seem to be about the date format, and I don't wanna use to_date.

Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2012
Added on Oct 10 2012
5 comments
3,938 views