Reputation: 101
I'm Trying to insert a row into ORDER table with a structure as follows:
However when using this insert statement:
INSERT INTO "ORDER" (
CUSTREQDATE,
CUSTREQTIME,
DATEPICKEDUP,
TIMEPICKEDUP,
ACTUALDATEDELIVERED,
ACTUALTIMEDELIVERED,
DELIVEREDFLAG,
RESTAURANTID,
CUSTOMERID,
DRIVERID,
CUSTADDRESSID
) VALUES (
TO_DATE('01/08/2017', 'DD/MM/YYYY'),
TO_DSINTERVAL('0 19:00:00'),
NULL,
NULL,
NULL,
NULL,
'X',
5,
1,
10,
1
);
It throws me the error:
ORA-01877: string is too long for internal buffer
I know its not my Date fields because I can insert dates on my other tables successfully using the TO_DATE
statement.
Could it be my TO_DSINTERVAL
statement?
Upvotes: 2
Views: 6436
Reputation: 5880
'X'
that you're trying to insert probably requires more than 1 byte (depending on your encoding).
Try changing byte to char:
ALTER TABLE "ORDER"
MODIFY(DELIVEREDFLAG CHAR (1 CHAR))
Or you can just increase DELIVEREDFLAG
size:
ALTER TABLE "ORDER"
MODIFY(DELIVEREDFLAG CHAR (2 BYTE))
Upvotes: 1