German date problem [message #798] |
Tue, 05 March 2002 01:52 |
Barbara
Messages: 7 Registered: November 2001
|
Junior Member |
|
|
Hi there,
I use a german Version of Oracle 8i and am confused
about inserting dates:
I created a table 'Customers' with following structure:
Name Null? Typ
----------------------------------------- -------- ----------------------------
NAME NOT NULL VARCHAR2(20)
FIRSTNAME NOT NULL VARCHAR2(20)
IDENTIFICATION NOT NULL VARCHAR2(20)
BIRTHDAY NOT NULL DATE
STREET NOT NULL VARCHAR2(30)
POSTCODE NOT NULL VARCHAR2(10)
CITY NOT NULL VARCHAR2(20)
PHONE VARCHAR2(30)
MOBILE VARCHAR2(30)
CUSTOMER_ID NOT NULL NUMBER(6)
I can add a record with following statement
insert into customers
values( 'Mustermann', 'Helmut', '2000A999', '29-nov-70', 'Wiesenstr. 23',
'70565', 'STUTTGART', '0711-6755821','0173-6566528',customer_id_seq.nextval)
/
But with the month march I can not insert a record
like
insert into customers
values( 'Mustermann', 'Helma', '2000A999', '29-mrz-70', 'Wiesenstr. 23',
'70565', 'STUTTGART', '0711-6755821','0173-6566528',customer_id_seq.nextval)
/;
an error appears
FEHLER in Zeile 2:
ORA-01858: ein nicht-numerisches Zeichen wurde gefunden, wo numerisches
erwartet wurde
Does anybody know something about this 'March Problem'
?
Thanks in advance,
Barbara
|
|
|
Re: German date problem [message #799 is a reply to message #798] |
Tue, 05 March 2002 02:11 |
pratap kumar tripathy
Messages: 660 Registered: January 2002
|
Senior Member |
|
|
first of all , i do not german.sorry if i am messing u up.
it seems ur date format is DD-mon-yyyy.
so use like this
1.FIRST METHOD:
insert into customers
values( 'Mustermann', 'Helma', '2000A999', TO_DATE('29-mrz-70','DD-MON-YY'), 'Wiesenstr. 23',
'70565', 'STUTTGART', '0711-6755821','0173-6566528',customer_id_seq.nextval);
change the date format accodingly
make sure nls_language has been properly set
2.SECOND METHOD:
set NLS_DATE_FORMAT .....
and use the same insert staement as before
------------------
ORA-01858 a non-numeric character found where a digit was expected
Cause:
The input data to be converted using a date format model was incorrect. The format model expected a number but found a non-numeric character.
Action:
Check the input data and the date format model to make sure the elements match in number and type, then retry the operation.
----------------------------
|
|
|
|
Re: German date problem [message #161931 is a reply to message #8728] |
Tue, 07 March 2006 23:23 |
sathya103
Messages: 1 Registered: March 2006
|
Junior Member |
|
|
Try the following.
alter system set nls_language="german din"
Then, following will be output.
SQL> select sysdate from dual;
SYSDATE
---------
07-MRZ-06
Best regards,
Sathya.
|
|
|