Re: Correction: Error (-881) : Resulting string length must be less than or equal to 255.
Posted in 2005
Omar,
IDS version 9 gives the following full description for error -881:
"Resulting string length from TRIM must range from 1 character to 255
characters.
The TRIM function returned a string whose length did not span a range from 1 to
255 characters. The TRIM function returns a VARCHAR string. A VARCHAR string
must have a length that ranges from 1 character to 255 characters. Check that
the TRIM function returns strings whose length is within that range."
I suspect that you have a trigger on your table which uses TRIM (or calls a
stored procedure which does). Use "dbschema -d <database> -t <table>" to find
out if this is the case. You could temporarily suspend the trigger using the SQL
statement "SET TRIGGERS FOR <table> DISABLED" before you run the delete.
--
Regards,
Doug Lawry
www.douglawry.webhop.org
"Omar Luque Valdivia" <omaluva@yahoo.com> wrote in message
news:1113417552.4661c630ef8b9d2f0552e496239b9f1f@teranews...
>
> Hello
>
> I'm trying delete a row, but i get a following error :
> -----------------------------------------------------------------------
> delete from tbperposhist where phicdcip ="00003566";> SQL Error (-881) : Resulting string length must be less than or equal to 255.
>
> CREATE TABLE "informix".tbperposhist
> (
> phicdcip character(8) NOT NULL,
> phiidptoingreso smallint NOT NULL,
> phiacingreso date NOT NULL,
> phicdpostula character(10) NOT NULL,
> phicdespecial smallint,
> phiidflgsexo character(1),
> phiidtipdoc smallint DEFAULT 0,
> phiiddocumento character(15) DEFAULT '',
> phinoapepaterno varchar(30,0) DEFAULT 'NULL',
> phinoapematerno varchar(30,0) DEFAULT 'NULL',
> phinoprimero varchar(30,0) DEFAULT 'NULL',
> phinosegundo varchar(30,0) DEFAULT 'NULL',
> phifcnacimiento date,
> phicdnacionalid character(6) DEFAULT '',
> phicddomicilio character(6) DEFAULT '',
> phitxresidencia varchar(100,0) DEFAULT 'NULL',
> phinocalle character(100) DEFAULT '',
> phiidtipocalle character(20) DEFAULT '',
> phitxurbaniza varchar(50,0) DEFAULT 'NULL',
> phitxreferencia varchar(100,0) DEFAULT 'NULL',
> phiidinstruccio smallint DEFAULT 0,
> phiididioma character(4) DEFAULT '',
> phicaescrito decimal(3,0) DEFAULT 0,
> phicahablado decimal(3,0) DEFAULT 0,
> phicaentiende decimal(3,0) DEFAULT 0,
> phiidreligion character(4) DEFAULT '',
> phiidgrpsanguin character(4) DEFAULT '',
> phiidflginelegi character(1) DEFAULT 'N',
> phiidflgvacante character(1) DEFAULT 'N',
> phiidflgprocmil character(1),
> phicdgrdpostula smallint,
> phiidestado smallint DEFAULT 1,
> phicdusuario varchar(20,0),
> phifcactualiza datetime YEAR TO SECOND DEFAULT CURRENT YEAR TO SECOND
> )
> EXTENT SIZE 2000 NEXT SIZE 600
> LOCK MODE ROW;
> -- Creating primary key constraint
> ALTER TABLE "informix".tbperposhist
> ADD CONSTRAINT PRIMARY KEY
> (
> phicdcip,
> phiidptoingreso,
> phiacingreso
> )
> CONSTRAINT "informix".ct_tbperposhist1;
>
> Others rows was deleted succesfully in other tables, example :
> -----------------------------------------------------------------------
> delete from tbpersancjun where sajcdcip =00003566;
> delete from tbperimagen where imgcdcip ='00003566';>
> Why?
>
> Appreciate any help on this issue.
> Thanks
> Regards,
>
> Omar.
>
> Omar LUQUE Valdivia
> Informix Database Administrator
> Direcci'n de Telem'tica - Marina de Guerra del Per'
> Av. La Marina Cdra. 36 s/n, La Perla - Callao, Lima - Peru
> Telf : (511) 614-2900 (511) 562-3900 Ext. 2277 2265
> E-mail : Luque001@marina.mil.pe
> Cel. 9 639-7201