Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: ORA-01401: inserted value too large for column
That's funny. When I tried it on Oracle 9.0.1.1.0 on SunOS there was no error.
When I tried it on Oracle 9.2.0.3.0 on SunOS the value assigned to po_out was an X followed by two (2) spaces.
> -----Original Message-----
> Post, Ethan
>
> Seeing this on AIX 5.1 64 bit Oracle 9.2.0.1.0 with char
> datatypes. Anyone
> aware of this issue?
>
> CREATE TABLE CHAR_TEST
> (
> CHAR1 CHAR(1)
> )
>
>
> --------------------------------------------------------------
> --------------
> ------------------------------
>
> CREATE OR REPLACE PROCEDURE TEST_CHAR (
> po_out OUT CHAR_TEST.CHAR1%TYPE -- this column is defined
> as CHAR(1)
> )
> IS
> BEGIN
>
> po_out := 'X';
>
> -- The value assigned to po_out (in Oracle 9i instance) is
> an 'X' followed
> by 199 spaces.
> -- The value assigned to po_out (in Oracle 8i instance) is
> an 'X', no
> spaces.
> dbms_output.put_line('[BEGIN]-->' || po_out || '<--[END]');
>
> -- In Oracle 9i, the following will cause the exception: "ORA-01401:
> inserted value too large for column"
> INSERT INTO CHAR_TEST (CHAR1)
> VALUES (po_out);
>
> EXCEPTION WHEN OTHERS
> THEN
> dbms_output.put_line('Error: ' || SQLERRM);
> END;
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jacques Kilchoer INET: Jacques.Kilchoer_at_quest.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Oct 16 2003 - 18:29:25 CDT