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

Home -> Community -> Usenet -> c.d.o.server -> Re: value too large why oh why?

Re: value too large why oh why?

From: prunoki <hegyvari_at_ardents.hu>
Date: 10 Feb 2007 10:41:18 -0800
Message-ID: <1171132878.417667.71400@q2g2000cwa.googlegroups.com>

prunoki írta:
> Hi,
>
> Okay this is driving me nuts.
>
> INSERT INTO konyvelesi_tetelek (ugyletszam, szamlaszam, eloiras_id,
> eloiras_tetel_id,
> teljesites_tetel_id, partnerkod, tartozik_fksz,
> kovetel_fksz, osszeg, megjegyzes,
> konyveles_datum_ido, felvivo, felvitel_datum_ido, modosito,
> modositas_datum_ido,
> feladas_datum_ido, sztorno_datum_ido, sztorno_par, sztorno_tetel,
> sztornozo_tetel,
> konyvelesi_tipus_id, biztositek_id, sztornozo, szamla_tipus)
> (SELECT ugyletszam, szamlaszam, eloiras_id, eloiras_tetel_id,
> teljesites_tetel_id,partnerkod, kovetel_fksz, tartozik_fksz,
> osszeg, substr('Sztornó: ' || megjegyzes,1,49),
> konyveles_datum_ido, felvivo, felvitel_datum_ido, '', NULL, NULL,
> NULL, tetelsorszam, 0,
> 1, konyvelesi_tipus_id, biztositek_id, NULL, szamla_tipus
> FROM konyvelesi_tetelek
> WHERE tetelsorszam = p_tetelsorszam);
>
> After executing
>
> ORA-12899: value too large for column
> "CONSUS_HLF_FEJLESZTO"."KONYVELESI_TETELEK"."MEGJEGYZES" (actual: 51,
> maximum: 50)
>
> The column in question is the one with the substr around it:
> substr('Sztornó: ' || megjegyzes,1,49)
>
> I have double triple checked the positions. There are no triggers on
> the table. The database is XE, using its default (and to my knowledge
> only) character set. The megjegyzes column is varchar2(50). How on
> Earth is this possible?
>
> Regards,
>
> Krisztian

I found out that every national character counts as two against the permitted length and substr is not aware of that. After converting the data type to nvarchar2(50) it works. This is something I am not used to as I can usually pick the database charset (XE did not let this for me). What is going to byte me next when using XE?

Cheers.

Krisztian Received on Sat Feb 10 2007 - 12:41:18 CST

Original text of this message

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