Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hey Guys, I am trying to create a simple table in Oracle SQL Plus but everytime I try to insert records into the table I get an error saying:'ERROR at line 2: ORA-01861: literal does not match format string'Here is the table code:CREATE TABLE GAME_DATES_AND_VENUES ( GameDatesAndVenuesID INTEGER NOT NULL, Game VARCHAR(50), Dates DATE, Venues VARCHAR(50)) ;Here is the records to be inserted:INSERT INTO GAME_DATES_AND_VENUES (GameDatesAndVenuesID, Game, Dates, Venues) VALUES ('221', 'Boston Celtics Vs. New York Knicks', '2010-09-01', 'TD Garden');I get this error at the DATE datatype by the way.Thanks for looking.
Lumbago
Norsk Yak Master
3271 Posts
Posted - 2010-08-10 : 07:19:57
Sorry but this is a forum for SQL Server...you should try the Oracle forum at dbforums.com instead.- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com
Sachin.Nand
2937 Posts
Posted - 2010-08-10 : 07:21:50
This is an SQL Server forum.Please post in Oracle related forum.www.orafaq.com/forum However you can try this
INSERT INTO GAME_DATES_AND_VENUES (GameDatesAndVenuesID, Game, Dates, Venues)VALUES ('221', 'Boston Celtics Vs. New York Knicks', to_date('2010-09-01'_date, 'ddmmyyyy') , 'TD Garden');
Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH
madhivanan
Premature Yak Congratulator
22864 Posts
Posted - 2010-08-10 : 09:21:27
In ORACLE, by default you need to use dd-MON-yyyy formatMadhivananFailing to plan is Planning to fail