We help IT Professionals succeed at work.

"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?
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2019
Commented:
Never reply on implicit data type conversions.

Always to data conversions explicitly:

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

Author

Commented:
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:
CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2019

Commented:
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;

Author

Commented:
never mind. I figure out

Explore More ContentExplore courses, solutions, and other research materials related to this topic.