Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01489: result of string concatenation is too long

rahchaOct 17 2016 — edited Oct 17 2016

i am trying to use

select trim(COLUMN_VALUE) from

XMLTABLE(('"'

  || REPLACE(TRIM(REPLACE('AUDIO SYSTEM CHEVROLET MYLINK RADIO WITH NAVIGATION AND 8 DIAGONAL COLOR TOUCH-SCREEN AM/FM STEREO AM/FM Stereo Smart Device Integration MP3 Player Navigation System Auxiliary Audio Input Bluetooth Connection;Alternator 150 amps;Assist handle front passenger on A-pillar;BOSE SOUND WITH 6 SPEAKER SYSTEM Premium Sound System;Battery heavy-duty 730 cold-cranking amps/70 Amp-hr maintenance-free with rundown protection and retained accessory power;Brakes 4-wheel disc with DURALIFE rotors 4-wheel antilock;Bumper front chrome;Bumper rear chrome;Cooling external engine oil cooler;CornerStep rear bumper;Cruise control electronic with set and resume speed steering wheel-mounted;Door handles body-color;Door locks power;Driver Information Center 4.2-inch diagonal color display includes driver personalization warning messages and vehicle information;EMISSIONS FEDERAL REQUIREMENTS;ENGINE 5.3L ECOTEC3 V8 WITH ACTIVE FUEL MANAGEMENT DIRECT INJECTION AND VARIABLE VALVE TIMING 8 Cylinder Engine Flex Fuel Capability;EXTERIOR;Engine 4.3L FlexFuel EcoTec3 V6 with Active Fuel Management Direct Injection and Variable Valve Timing includes aluminum block construction with (FHS) E85 FlexFuel capability capable of running on unleaded or up to 85% ethanol (285 hp [212 kW] @ 5300 rpm ;Exhaust aluminized stainless-steel muffler and tailpipe;Floor covering color-keyed carpeting with rubberized vinyl floor mats (Double Cab and Crew Cabs include second row floor mats);Frame fully-boxed hydroformed front section;GVWR 6900 lbs. (3130 kg) (Crew Cab and Double Cab requires 2WD models and (LV3) 4.3L EcoTec3 V6 engine.);GVWR 7000 LBS;Glass deep-tinted;Grille surround chrome;Headlamps high intensity discharge (HID) projector-beam with LED signature DRL;INTERIOR;Instrumentation 6-gauge cluster featuring speedometer fuel level engine temperature tachometer voltage and oil pressure;LPO POLISHED EXHAUST TIP;Lamps cargo area cab mounted with switch on center switch bank;MECHANICAL;Mirror caps body-color;Mirrors outside heated power-adjustable (includes drivers side spotter mirror) (Body-color.);Moldings bodyside body color;Pickup box;REAR AXLE 3.42 RATIO;Rear axle 3.23 ratio (Standard and only available on (LV3) 4.3L EcoTec3 V6 engine with 2WD models.);Rear wheel drive;Remote Locking Tailgate (Deleted with (ZW9) pickup box delete.);SEATS FRONT 40/20/40 SPLIT-BENCH 3-PASSENGER AVAILABLE IN CLOTH OR LEATHER Driver Adjustable Lumbar Split Bench Seat;Seat rear 60/40 folding bench (folds up) 3-passenger (includes child seat top tether anchor);Seats front 40/20/40 split-bench 3-passenger available in cloth or leather includes driver and front passenger recline with outboard head restraints and center >;Steering Electric Power Steering (EPS) assist rack-and-pinion;Steering column Tilt-Wheel manual with theft-deterrent locking feature;Steering wheel audio controls;Suspension Package Handling/Trailering;TEXAS EDITION Climate Control Back-Up Camera Rear Defrost Multi-Zone A/C A/C Remote Engine Start;TRANSMISSION 6-SPEED AUTOMATIC ELECTRONICALLY CONTROLLED A/T 6-Speed A/T;Tailgate EZ-Lift and Lower;Tailgate and bed rail protection cap top;Tire carrier lock keyed cylinder lock that utilizes same key as ignition and door;Tire spare P255/70R17 all-season blackwall (Included and only available with (RBZ) P255/70R17 all-season blackwall tires.);Tires P255/70R17 all-season blackwall;Transmission 6-speed automatic electronically controlled with overdrive and tow/haul mode. Includes Cruise Grade Braking and Powertrain Grade Braking;Visors driver and front passenger illuminated vanity mirrors;WHEELS 20 Aluminum Wheels;Wheel full-size spare 17 (43.2 cm) steel;Wheelhouse liners rear (Requires Crew Cab or Double Cab model.);Wheels 17 x 8 (43.2 cm x 20.3 cm) bright machined aluminum;Windows power front and rear with driver express up and down and express down on all other wind', '&', '154')), ';', '","')

  || '"'));

which gives error

ORA-01489: result of string concatenation is too long

01489. 00000 -  "result of string concatenation is too long"

*Cause:    String concatenation result is more than the maximum size.

*Action:   Make sure that the result is less than the maximum size.

but if i trim the value by one character in the XMLTABLE i get no issue

select trim(COLUMN_VALUE) from

XMLTABLE(('"'

  || REPLACE(TRIM(REPLACE('AUDIO SYSTEM CHEVROLET MYLINK RADIO WITH NAVIGATION AND 8 DIAGONAL COLOR TOUCH-SCREEN AM/FM STEREO AM/FM Stereo Smart Device Integration MP3 Player Navigation System Auxiliary Audio Input Bluetooth Connection;Alternator 150 amps;Assist handle front passenger on A-pillar;BOSE SOUND WITH 6 SPEAKER SYSTEM Premium Sound System;Battery heavy-duty 730 cold-cranking amps/70 Amp-hr maintenance-free with rundown protection and retained accessory power;Brakes 4-wheel disc with DURALIFE rotors 4-wheel antilock;Bumper front chrome;Bumper rear chrome;Cooling external engine oil cooler;CornerStep rear bumper;Cruise control electronic with set and resume speed steering wheel-mounted;Door handles body-color;Door locks power;Driver Information Center 4.2-inch diagonal color display includes driver personalization warning messages and vehicle information;EMISSIONS FEDERAL REQUIREMENTS;ENGINE 5.3L ECOTEC3 V8 WITH ACTIVE FUEL MANAGEMENT DIRECT INJECTION AND VARIABLE VALVE TIMING 8 Cylinder Engine Flex Fuel Capability;EXTERIOR;Engine 4.3L FlexFuel EcoTec3 V6 with Active Fuel Management Direct Injection and Variable Valve Timing includes aluminum block construction with (FHS) E85 FlexFuel capability capable of running on unleaded or up to 85% ethanol (285 hp [212 kW] @ 5300 rpm ;Exhaust aluminized stainless-steel muffler and tailpipe;Floor covering color-keyed carpeting with rubberized vinyl floor mats (Double Cab and Crew Cabs include second row floor mats);Frame fully-boxed hydroformed front section;GVWR 6900 lbs. (3130 kg) (Crew Cab and Double Cab requires 2WD models and (LV3) 4.3L EcoTec3 V6 engine.);GVWR 7000 LBS;Glass deep-tinted;Grille surround chrome;Headlamps high intensity discharge (HID) projector-beam with LED signature DRL;INTERIOR;Instrumentation 6-gauge cluster featuring speedometer fuel level engine temperature tachometer voltage and oil pressure;LPO POLISHED EXHAUST TIP;Lamps cargo area cab mounted with switch on center switch bank;MECHANICAL;Mirror caps body-color;Mirrors outside heated power-adjustable (includes drivers side spotter mirror) (Body-color.);Moldings bodyside body color;Pickup box;REAR AXLE 3.42 RATIO;Rear axle 3.23 ratio (Standard and only available on (LV3) 4.3L EcoTec3 V6 engine with 2WD models.);Rear wheel drive;Remote Locking Tailgate (Deleted with (ZW9) pickup box delete.);SEATS FRONT 40/20/40 SPLIT-BENCH 3-PASSENGER AVAILABLE IN CLOTH OR LEATHER Driver Adjustable Lumbar Split Bench Seat;Seat rear 60/40 folding bench (folds up) 3-passenger (includes child seat top tether anchor);Seats front 40/20/40 split-bench 3-passenger available in cloth or leather includes driver and front passenger recline with outboard head restraints and center >;Steering Electric Power Steering (EPS) assist rack-and-pinion;Steering column Tilt-Wheel manual with theft-deterrent locking feature;Steering wheel audio controls;Suspension Package Handling/Trailering;TEXAS EDITION Climate Control Back-Up Camera Rear Defrost Multi-Zone A/C A/C Remote Engine Start;TRANSMISSION 6-SPEED AUTOMATIC ELECTRONICALLY CONTROLLED A/T 6-Speed A/T;Tailgate EZ-Lift and Lower;Tailgate and bed rail protection cap top;Tire carrier lock keyed cylinder lock that utilizes same key as ignition and door;Tire spare P255/70R17 all-season blackwall (Included and only available with (RBZ) P255/70R17 all-season blackwall tires.);Tires P255/70R17 all-season blackwall;Transmission 6-speed automatic electronically controlled with overdrive and tow/haul mode. Includes Cruise Grade Braking and Powertrain Grade Braking;Visors driver and front passenger illuminated vanity mirrors;WHEELS 20 Aluminum Wheels;Wheel full-size spare 17 (43.2 cm) steel;Wheelhouse liners rear (Requires Crew Cab or Double Cab model.);Wheels 17 x 8 (43.2 cm x 20.3 cm) bright machined aluminum;Windows power front and rear with driver express up and down and express down on all other win', '&', '154')), ';', '","')

  || '"'));

is there any size issue / constraint which i am missing?

This post has been answered by sdstuber on Oct 17 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2016
Added on Oct 17 2016
8 comments
627 views