Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: value too large why oh why?
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