Subject | Re: [firebird-support] Indirect value |
---|---|
Author | Teträm Corp |
Post date | 2009-02-07T18:50:15Z |
Hi
if you were in before update trigger, you could do this with
execute statement 'select ' || colname || ' from mytable where ... '
into :colvalue;
but in after update, I guess you have to use a way to store your value
in before update trigger and retrieve it in after update.
e.g. context, temporary table, etc
Thierry
Hans a écrit :
if you were in before update trigger, you could do this with
execute statement 'select ' || colname || ' from mytable where ... '
into :colvalue;
but in after update, I guess you have to use a way to store your value
in before update trigger and retrieve it in after update.
e.g. context, temporary table, etc
Thierry
Hans a écrit :
>
> Hi, my question
>
> Is it possible, say in a after update trigger to retrieve
> the value of a column 'Name' indirectly somewhat
> alike
>
> Suppose Old.Name contains 'Hans'
> -----
> declare variable ColName Varchar(8);
> declare variable ColValue Varchar(255);
> begin
> ColName = 'Name';
>
> ColValue = ['Old.' || ColName] ;
> -----
> The value of ColValue at this point = 'Hans'
>
> Best Regards
> Hans
>
>