Subject Re: AW: [firebird-support] statement and composite variable names
Author Thomas Steinmaurer
Olaf,

> Is there no option to use internal variables (composite) in a statement?

IMHO, it isn't entirely clear what you want to achieve.


Regards,
Thomas


> Thank your.
>
> -------------------------
>
> Hello,
>
> In a stored procedure there are 6 Input Parameters F1 to F6. This varchar
> variables contains table-field-names and I verify this.
>
> Now I thought I can use a statement like this:
>
> i = 0;
>
> while (i< 7) do
>
> begin
>
> idexists = 0;
>
> stmtxt = 'select 1 from rdb$database where exists(SELECT * FROM
> RDB$RELATION_FIELDS
>
> WHERE RDB$RELATION_NAME = T_DT and RDB$FIELD_NAME = :' || 'F' || :i;
>
> execute statement :stmtxt into :idexists;
>
> if(idexists = 0) then
>
> begin
>
> --.
>
> break;
>
> end
>
> i = i + 1;
>
> end
>
> How can I use the content of F1 to F6 in this statement (not the name of
> variable rather the content). Actually the statement uses .._name = :F1
>
> Thanks in advance.
>
> Best regards.
>
> Olaf
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>