Invalid Number Error [message #9486] |
Fri, 14 November 2003 11:06 |
mkr
Messages: 2 Registered: November 2003
|
Junior Member |
|
|
This insert is driving me nuts. I just can't see the problem. Can anyone help. Below is the query, the response, and the table.
insert into EMPLOYEE_SHIFT (
Emp_Shift_ID, Emp_ID, Store_ID, Manager_ID, Time_Start, Time_Stop)
VALUES ('1000001', '000000001', '001', '000000001',
TO_DATE('11/20/2003 8:00', 'MM/DD/YYYY HH24:MI'),
TO_DATE('11/20/2003 17:00', 'MM/DD/YYYY HH24:MI')
);
Emp_Shift_ID, Emp_ID, Store_ID, Manager_ID, Time_Start, Time_Stop)
*
ERROR at line 2:
ORA-01722: invalid number
Research says that the "invalid number" error can occur when oracle is making a string to number conversion. But as you can see by the table below, Emp_Shift_ID is a varchar2, and my input is a quoted string.
Can anyone see the problem?
SQL> desc employee_shift
Name Null? Type
-------- -------- ---------
EMP_SHIFT_ID.....NOT NULL.....VARCHAR2(7)
EMP_ID...........NOT NULL.....VARCHAR2(9)
STORE_ID.........NOT NULL.....VARCHAR2(3)
MANAGER_ID....................VARCHAR2(9)
TIME_START.......NOT NULL.....DATE
TIME_STOP........NOT NULL.....DATE
|
|
|
Re: Invalid Number Error [message #9488 is a reply to message #9486] |
Fri, 14 November 2003 13:43 |
sverch
Messages: 582 Registered: December 2000
|
Senior Member |
|
|
It works for me, but some time ago I had something similar to this, only with dates, not with strings, and it was related to ODBC driver settings. I don't remember details, but I remember rewriting my statement.
|
|
|
|