Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle ASP
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Oracle ASP Using ASP with Oracle databases. For Oracle discussions not specific to ASP, please see the Oracle forum. For more ASP discussions, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle ASP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 8th, 2012, 06:42 AM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default ORA-01843 not a valid month

I create a table member with 8 fields, with idMember as primaryKey. Two among these fields is the field's date_of_birth and date_back that have same type, date.
But when I insert data into it, appears an error like this -> ORA-01843 not a valid month.
Previously when I didn't include a date field again, successfully. However when I include it, writing error ORA-01843 not a valid month.

I give the insert command like this:
insert into member values ​​('M102019', 'Adhe Nurcahya',.., to_date ('28-May-1992 ',' DD-MON-YYYY'),..., .. , to_date ('12-dec-2011 ',' DD-MON-YYYY '));

Anyone know why is this possible?
I'm confused, is there because in a record to_date there should be no more than 1??
Thank's..
  #2 (permalink)  
Old January 10th, 2012, 09:55 AM
Authorized User
Points: 448, Level: 7
Points: 448, Level: 7 Points: 448, Level: 7 Points: 448, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2011
Posts: 86
Thanks: 1
Thanked 12 Times in 12 Posts
Default

Hi,

you should be able to insert two date fields in one insert statement.
Perhaps the order of your table fields is not matching up with the order you have in the insert statement?
Try specifying your columns to be sure. It should look like this then:
Code:
 
INSERT INTO member(column1, column2, column5, column8)
VALUES ('M102019', 'Adhe Nurcahya',to_date ('28-May-1992 ',' DD-MON-YYYY'),to_date ('12-dec-2011 ',' DD-MON-YYYY '));
The Following User Says Thank You to disel2010 For This Useful Post:
adhe2chazper (January 13th, 2012)
  #3 (permalink)  
Old January 13th, 2012, 01:03 PM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by disel2010 View Post
Hi,

you should be able to insert two date fields in one insert statement.
Perhaps the order of your table fields is not matching up with the order you have in the insert statement?
Try specifying your columns to be sure. It should look like this then:
Code:
 
INSERT INTO member(column1, column2, column5, column8)
VALUES ('M102019', 'Adhe Nurcahya',to_date ('28-May-1992 ',' DD-MON-YYYY'),to_date ('12-dec-2011 ',' DD-MON-YYYY '));
thx disel.. I did get it yesterday..
It don't work bcause I haven't turned the nls_format_date..
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ORA-20505 sellyh19 Oracle 0 January 17th, 2011 06:35 AM
Converting month name to month number kalyanykk SQL Server 2005 7 August 19th, 2008 10:37 PM
ORA-0134 db009 Oracle 0 February 23rd, 2007 06:04 AM
[Oracle][ODBC][Ora][ORA-01013 Corey Access 1 December 15th, 2006 10:29 AM
query Current Month, Month+1, Month+2, Month+3 anterior Access 2 September 24th, 2006 08:25 PM



All times are GMT -4. The time now is 03:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.