Subject RE: [firebird-support] Get the value of a field in a relation using a dynanic constructed field name
Author Leyne, Sean
Hans,

> Using FB2.5.0
>
> If it possible to get the value of a field in a relation using a dynanic
> constructed field name
>
> In a before delete trigger I wish to construct a FieldName like
>
> Declare Variable FieldName Varchar(93)
> Declare Variable FieldValue Varchar(32)
>
> FieldName = 'Old.' || MyField;
>
> FieldValue = *FieldName; -- The Contents if the Field FieldName

No, this is not possible.

Another approach would be to use EXECUTE BLOCK and EXECUTE STATEMENT to navigate the table structure and construct a trigger at runtime which could be added to the table.

Your question is not clear regarding your intended purpose.


Sean