Subject | AW: AW: [firebird-support] statement and composite variable names |
---|---|
Author | Olaf Kluge |
Post date | 2012-05-23T07:58:32Z |
Hello Thomas,
I have 6 input variables in a stored procedure, named F1, F2, F3, F4, F5,
F6. In each variable it is entered a name of a column from a table. (F1 =
column1, etc.)
Now I need to check if the name in F1 to F6 is correct. I need the content
of my input-variables, and I would the variable names composed dynamically
('F' || i)
Thank you.
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 = <<<THE CONTENT OF F1 to
F6 ('F' || i)>>>
execute statement :stmtxt into :idexists;
if(idexists = 0) then
begin
--.
break;
end
i = i + 1;
end
[Non-text portions of this message have been removed]
I have 6 input variables in a stored procedure, named F1, F2, F3, F4, F5,
F6. In each variable it is entered a name of a column from a table. (F1 =
column1, etc.)
Now I need to check if the name in F1 to F6 is correct. I need the content
of my input-variables, and I would the variable names composed dynamically
('F' || i)
Thank you.
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 = <<<THE CONTENT OF F1 to
F6 ('F' || i)>>>
execute statement :stmtxt into :idexists;
if(idexists = 0) then
begin
--.
break;
end
i = i + 1;
end
[Non-text portions of this message have been removed]