Solved

Not a valid Month

Posted on 2007-12-02
1
1,094 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 rollup query 3 51
Oracle Syntax 8 56
Query Records that don't match 8 34
Web Service from a stored procdure oracle 10 49
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now