wal has asked for the wisdom of the Perl Monks concerning the following question:

hi there i get an truncation error on a field but don't know why DBD::Oracle::st fetchall_arrayref failed: ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 8 of 122, ora_type 1) for Statement "SELECT "ADVERTISEMENT_ID","DELIVERY_GROUP_ID","PUBLISHING_GROUP_ID","ADDRESS_ID","PERSON_ID","REF_PROPERTY","REF_HOUSE","REF_OBJECT","VOLUME","OBJECT_CATEGORY","OBJECT_TYPE","DISTANCE_FROM_PUBLIC_TRANSPORT","DISTANCE_FROM_SHOPS","DISTANCE_FROM_KINDERGARTEN","DISTANCE_FROM_SCHOOL","DISTANCE_FROM_SCHOOL2",to_char("PUBLISH_UNTIL", 'YYYY-MM-DD HH24:MI:SS'),"FLOOR","NUMBER_ROOMS","NUMBER_APPARTMENTS","SURFACE_LIVING","SURFACE_PROPERTY","SURFACE_USABLE","YEAR_BUILT","WITH_VIEW","FIRE_PLACE","CABLE_TV","LIFT","FAMILY","PARKING","GARAGE","ROOFFLOOR","BALCONY","SITUATION","TITLE",to_char("AVAILABLE_FROM", 'YYYY-MM-DD HH24:MI:SS'),"VISIT_NAME","VISIT_PHONE","VISIT_EMAIL","VISIT_REMARK","AD_DESCRIPTION","AD_DESCRIPTION2","RENT_NET","RENT_EXTRA","PRICE_UNIT","SELLING_PRICE","OFFER_TYPE","SENDER_ID","CURRENCY","YIELD","CONTACT_PERSON","TARGET_DESTINATION","DATA_DELIVERER_ADDRESS_ID","URL",to_char("TIMESTAMP", 'YYYY-MM-DD HH24:MI:SS'),"AD_LOGO",to_char("CREATED", 'YYYY-MM-DD HH24:MI:SS'),"BILLING_ADDRESS_ID","BILLING_NUMBER","DISTANCE_FROM_MOTORWAY","ROOM_HEIGHT","HALL_HEIGHT","MAX_FLOOR_LOADING","CARRYING_CAPACITY_CRANE","CARRYING_CAPACITY_ELEVATOR","ISDN","WHEELCHAIR_ACCESS","ANIMAL_ALLOWED","RAMP","LIFTING_PLATFORM","RAILWAY_TERMINAL","RESTROOMS","WATER_SUPPLY","SEWAGE_SUPPLY","POWER_SUPPLY","GAS_SUPPLY","MUNICIPAL_INFO","OBJECT_REFERENZ","FTP_DIRECTORY","FILE_NAME",to_char("FILE_DATE", 'YYYY-MM-DD HH24:MI:SS'),to_char("RECORD_DATE", 'YYYY-MM-DD HH24:MI:SS'),"AGENCY_ID","BUILT_NEW","BUILT_OLD","CORNER_HOUSE","GARDENHOUSE","HIGHFLOOR","MIDDLE_HOUSE","MINERGY_BUILT","MINERGY_CERTIFIED","NUMBER_FLOORS","PLOT_CONNECTED","ROOMMATE","SWIMMINGPOOL","UNDER_LAW","UNDER_ROOF","WORLD","YEAR_RENOVATED","AD_LOGO_2","AD_URL_TITLE","CONTACT_FORM","DEFAULT_CONTACT_FORM_TYPE","VERSION","OBJECT_URL_DELIVERER","MINIMUM_SURFACE_USABLE","CO_OWNERSHIP_NUMERATOR","CO_OWNERSHIP_DENOMINATOR","GEAK_CLASS","HEATING_SYSTEM","HEATING_USAGE_PER_YEAR","SURFACE_LIVING_BUILDING","EKZ_LOWER","EKZ_UPPER","SHOW_ENERGY_RATING","HIDE_EVALO_RATING","ENERGY_DOC_TYPE_1","ENERGY_DOC_FILENAME_1","ENERGY_DOC_FILENAME_ORIG_1","ENERGY_DOC_TYPE_2","ENERGY_DOC_FILENAME_2","ENERGY_DOC_FILENAME_ORIG_2" FROM "HOMEGATE"."ADVERTISEMENT_LOADER" a" at /root/perl5/lib/perl5/Ora2Pg.pm line 10280. ERROR: ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 8 of 122, ora_type 1) can anybody help me? thanks

Comment on dbd::oracle truncation error
Replies are listed 'Best First'.
Re: dbd::oracle truncation error
by Happy-the-monk (Abbot) on May 30, 2016 at 17:05 UTC

    hi there i get an truncation error on a field but don't know why DBD::Oracle::st fetchall_arrayref failed

    Without knowing, just being intuitive: maybe fetchall_arrayref fails because of Oracle's truncation error?

    If you have set DBI to die on any error that's the usual behaviour (that's the RaiseError => 1, in your DBI->connect( ... string).

    Field no 8 from Oracle's error message would be "REF_OBJECT" so have a look at that, too.

    Cheers, Sören

    Créateur des bugs mobiles - let loose once, run everywhere.
    (hooked on the Perl Programming language)

Re: dbd::oracle truncation error
by james28909 (Chaplain) on May 30, 2016 at 16:31 UTC
    Please use code tags.