[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Not a valid Month

Posted on 2007-12-02
1
Medium Priority
?
1,101 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 2000 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  â€¦
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Via a live example, show how to take different types of Oracle backups using RMAN.

650 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