Solved

Not a valid Month

Posted on 2007-12-02
1
1,099 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

696 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