 |
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

January 8th, 2012, 06:42 AM
|
Registered User
|
|
Join Date: Dec 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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..
|

January 10th, 2012, 09:55 AM
|
Authorized User
|
|
Join Date: Jan 2011
Posts: 86
Thanks: 1
Thanked 12 Times in 12 Posts
|
|
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:
|
|

January 13th, 2012, 01:03 PM
|
Registered User
|
|
Join Date: Dec 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by disel2010
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.. 
|
|
 |