Solved

Not a valid Month

Posted on 2007-12-02
1
1,097 Views
Last Modified: 2013-12-07
Why i'm I getting a not a valid month when executing this

INSERT INTO PROG_CHAN
VALUES(11001,10306,'12-01-2007',TO_DATE('01-12-2007 2:00:00','DD-MM-YYYY hh:mi:ss'));

INSERT INTO PROG_CHAN
VALUES(11001,10306,'12-02-2007',TO_DATE('02-12-2007 4:00:00','DD-MM-YYYY hh:mi:ss'));

INSERT INTO PROG_CHAN
VALUES(11002,33753,'12-03-2007',TO_DATE('03-12-2007 6:00:00','DD-MM-YYYY hh:mi:ss'));

INSERT INTO PROG_CHAN
VALUES(11002,33753,'12-04-2007',TO_DATE('04-12-2007 2:00:00','DD-MM-YYYY hh:mi:ss'));

INSERT INTO PROG_CHAN
VALUES(11005,22024,'12-05-2007',TO_DATE('05-12-2007 6:00:00','DD-MM-YYYY hh:mi:ss'));

INSERT INTO PROG_CHAN
VALUES(11005,10108,'12-06-2007',TO_DATE('06-12-2007 12:00:00','DD-MM-YYYY hh:mi:ss'));

INSERT INTO PROG_CHAN
VALUES(21002,33753,'12-07-2007',TO_DATE('07-12-2007 4:00:00','DD-MM-YYYY hh:mi:ss'));

INSERT INTO PROG_CHAN
VALUES(21004,37349,'12-07-2007',TO_DATE('08-12-2007 2:00:00','DD-MM-YYYY hh:mi:ss'));
0
Comment
Question by:awehme
1 Comment
 
LVL 25

Accepted Solution

by:
imitchie earned 500 total points
ID: 20393368
try making sure that hh:mm:ss has exactly 8 chars, i.e.
VALUES(21004,37349,'12-07-2007',TO_DATE('08-12-2007 02:00:00','DD-MM-YYYY hh:mi:ss'));
instead of
VALUES(21004,37349,'12-07-2007',TO_DATE('08-12-2007 2:00:00','DD-MM-YYYY hh:mi:ss'));
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
oracle 11g 23 107
Shredding xml into an oracle 11g Database 2 58
upgrading Oracle 10g/ 11g / 11g R2 to Oracle 12c 25 69
having some issue on pl sql procedure 1 23
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Via a live example, show how to take different types of Oracle backups using RMAN.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question