Subject | Re: [firebird-support] Cicling fields |
---|---|
Author | Martijn Tonies |
Post date | 2010-02-05T15:41:53Z |
Hi,
Well, 'new.c' is a character value, so this will result
in something like:
if ('new.c1' = 0)
Obviously, a string with that value never equals to the
numerical value 0.
a trigger with OLD/NEW.<columnname> ) by name.
That's not a string value that looks like a name.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
> I have a table with 140 fieds.Refuses?
> Named c1, c2.. c 140.
>
> c1..c140 are type integer
>
> Now I have to count some values into them.
>
> this is a code snippet:
> -- ******************************************
> cnt = 1; s0 = 0;
> while ( :cnt < 101 ) do begin
> if ( 'new.c' || :cnt = 0 ) then s0 = :s0 + 1;
> cnt = :cnt + 1;
> end
> -- ******************************************
>
> Firebird refuse this : 'new.c' || :cnt.
Well, 'new.c' is a character value, so this will result
in something like:
if ('new.c1' = 0)
Obviously, a string with that value never equals to the
numerical value 0.
> So don't works.You can only address columns (or the pseudo row in
>
> Anyone could help??
a trigger with OLD/NEW.<columnname> ) by name.
That's not a string value that looks like a name.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com