Link to home
Start Free TrialLog in
Avatar of wasabi3689
wasabi3689Flag for United States of America

asked on

"not a valid month"

I have an insert statement in Oracle

INSERT INTO TABLE1 (..., ...,...,CREATED_DATE, CREATED_BY..)
     VALUES(........L,'2012-01-27 11:42:04.830','JOHN','N')
Error report:
SQL Error: ORA-01843: not a valid month
01843. 00000 -  "not a valid month"
*Cause:    
*Action:


Date_type of
CREATED_DATE is      TIMESTAMP(6)            

How to fix this issue?
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wasabi3689

ASKER

I have this error by using

to_timestamp('2012-01-27 11:42:04.830','YYYY-MM-DD HH24:MI:SS.FF')

Error report:
SQL Error: ORA-00947: not enough values
00947. 00000 -  "not enough values"
*Cause:    
*Action:
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Post your complete statement.  You are missing a column or 10 between the insert and the select.

from: http://ora-00947.ora-code.com/
INSERT INTO EMP(EMPNO,ENAME) VALUES('JONES')



You can test just the to_timestamp with:
select to_timestamp('2012-01-27 11:42:04.830','YYYY-MM-DD HH24:MI:SS.FF')  from dual;
never mind. I figure out