Skip to content
Advertisement

Insert Fail because of wrong non-numeric character

hy

table:

create table Players (PlayerNo number (4) not null, Name varchar2(15), date_of_birth date,leagno varchar(4));

wrong insert:

insert into PLAYERS (PlayerNo,Name,date_of_birth,leagno) VALUES (1,'Philipp K','Jan-10-1999','1')

whats wrong?

error code:

Fehler beim Start in Zeile 1 in Befehl:
insert into PLAYERS (PlayerNo,Name,date_of_birth,leagno) VALUES (1,'Philipp K','Jan-10-1999','1')
Fehlerbericht:
SQL-Fehler: ORA-01858: Ein nicht-numerisches Zeichen wurde gefunden, während ein numerisches Zeichen erwartet wurde
01858. 00000 -  "a non-numeric character was found where a numeric was expected"
*Cause:    The input data to be converted using a date format model was
           incorrect.  The input data did not contain a number where a number was
           required by the format model.
*Action:   Fix the input data or the date format model to make sure the
           elements match in number and type.  Then retry the operation.

Advertisement

Answer

*Cause: The input data to be converted using a date format model was incorrect. The input data did not contain a number where a number was required by the format model.

The date string you’re using doesn’t match what oracle is expecting. The default format, iirc, is DD-Mon-YYYY, not Mon-DD-YYYY as you’re trying to use.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement