Error Updating Integer Field
Posted in 2016
Topics: Data Types & Schema Design
informix11.7FC8:
Table
create table internal_attorney
(
userid varchar(20) not null ,
locationid integer not null ,
isactive char(1) not null ,
allocated_files integer,
primary key (userid) constraint "informix".primary
);
SQL
Update internal_attorney set allocated_files = 2 where userid ='user'
when trying to update allocated_files we get the following error:
# 1213: A character to numeric conversion process failed
any help will be appreciated.
A problem probably at retrieving and interpreting the row (or one of the=20
rows addressed). Would you see the same for a SELECT using same WHERE=20
clause?
From: "FLIP VAN WYNGAARDT" <flipv@raf.co.za>
To: ids@iiug.org
Date: 01.07.2016 12:03
Subject: Error Updating Integer Field [37345]
Sent by: ids-bounces@iiug.org
informix11.7FC8:=20
Table=20
create table internal=5Fattorney=20
(=20
userid varchar(20) not null ,=20
locationid integer not null ,=20
isactive char(1) not null ,=20
allocated=5Ffiles integer,=20
primary key (userid) constraint "informix".primary=20
);=20
SQL=20
Update internal=5Fattorney set allocated=5Ffiles =3D 2 where userid =3D'use=
r'=20
when trying to update allocated=5Ffiles we get the following error:=20
# 1213: A character to numeric conversion process failed=20
any help will be appreciated.=20
***************************************************************************=
****=20
Forum Note: Use "Reply" to post a response in the discussion forum.=20
When selecting,deleting and inserting it works fine only update return this error. Is this maybe a bug?
Interesting. Root cause might be a bug, or some sort of corruption whose=20
root cause might again be one ;-)
I'm assuming the same is working if you try it on an SQL copy of the table =
(same schema, insert into ... select from ...)?
Maybe this would then suffice even to solve your immediate problem.
Else I'd try tapping the error (onmode -I -1213 -> create the error ->=20
disable the trap using 'onmode -I') and providing the resulting af file in =
a new PMR. This might give a better clue where exactly sich 'character to =
numeric conversion' occurs, and on which data.
Andreas
From: "FLIP VAN WYNGAARDT" <flipv@raf.co.za>
To: ids@iiug.org
Date: 01.07.2016 12:25
Subject: Re: Error Updating Integer Field [37347]
Sent by: ids-bounces@iiug.org
When selecting,deleting and inserting it works fine only update return=20
this=20
error.=20
Is this maybe a bug?=20
***************************************************************************=
****=20
Forum Note: Use "Reply" to post a response in the discussion forum.=20
Do you happen to have an UPDATE trigger on it? ;) On Fri, Jul 1, 2016 at 11:24 AM, FLIP VAN WYNGAARDT <flipv@raf.co.za> wrote: > When selecting,deleting and inserting it works fine only update return this > error. > > Is this maybe a bug? > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --94eb2c05665c2d3f81053690cd12