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 -> Finding which field of many is too large in a SQL statement...

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

From: dean <deanbrown3d_at_yahoo.com>
Date: 3 Oct 2006 07:35:12 -0700
Message-ID: <1159886112.412154.55390@e3g2000cwe.googlegroups.com>


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 Received on Tue Oct 03 2006 - 09:35:12 CDT

Original text of this message

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