Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Finding which field of many is too large in a SQL statement...

Re: Finding which field of many is too large in a SQL statement...

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 3 Oct 2006 10:31:45 -0700
Message-ID: <1159896705.539627.261530@m7g2000cwm.googlegroups.com>

dean wrote:
> Here is a typical SQL statement that we build up in code and run
> (through ADO) on 9.1, 9.2 or 10g under windows:
>
> insert into TRAIN_EXPAND_ROUTE_INTERM
> ( KEY_S, LOCATION_I, OUTBOUND_RR_I, ARRIV_TZ_C, CALC_ARRIV_T,
> DEPT_TZ_C,
> CALC_DEPT_T, CALC_DWELL_T, OUTBOUND_SPEED_M, DIST_FROM_ORIG_M, FUEL_S,
> WORK_S,
> CREW_S, INSPECTION_S, TRAIN_ROUTE_I, DIST_M, DIST_BACK_M, USER_GROSS_M,
> USER_LENGTH_M,
> USER_POWER_M, CUTOFF_OUTBOUND_T, CUTOFF_INBOUND_T, CUTOFF_ORIG_T,
> FINAL_PROCESSING_T,
> BLK_SWAP_CUTOFF_T, INBOUND_TRAIN_DIRECTION_I, TRAIN_SET_I,
> SUPPLEMENTAL_WORK_ORDER_S,
> RPT_TRAIN_ARRIVAL_S, RPT_CALL_TRAIN_S, RPT_WORK_ORDER_S,
> RPT_ADVANCED_MAKE_TRAIN_I,
> RPT_DISPATCHER_DELAY_S, OUTBOUND_TRAIN_DIRECTION_I, TRAIN_I,
> P_VERSION_I, ROUTE_ORDER_I )
> select 'Y', '5', 'U', 'C', NULL, 'C', 0, 0, 5, 0, 'N', 'N', ' ', 'N',
> 871, 4.50, 0.00, 0.00, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, 'W',
> 'R', ' ', 'N',
> 'N', 'N', 'N', 'N', 'LO', 10, 931, 1 from dual;
>
>
> If I run this in SQL+, I get the following error message and its simple
> to find the field that's causing problems:
>
> 'N', 'N', 'N', 'N', 'LO', 10, 931, 1 from dual
> *
> ERROR at line 11:
> ORA-01401: inserted value too large for column
>
> My question is, can I query Oracle to find out which field in question
> is the cause of the problem? Somehow SQL+ knows the field and
> highlights it with an asterisk.
>
> Thanks for any help,
>
> Dean

I take you are asking if you can find this information in ADO code and I do not know ADO. If you code in a Pro* language Oracle provides structures that are used to communicate with the database. Parse errors are stored in the SQLCA structure variable sqlca.sqlerrd[4]. If ADO gives you access to the SQLCA structure then the answer is yes, otherwise you are probably out of luck

HTH -- Mark D Powell -- Received on Tue Oct 03 2006 - 12:31:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US