|Subject||RE: [firebird-support] String with added string-variable|
|Author||Svein Erling Tysvær|
>Hello,Still not enough apostrophes (I needed six apostrophes when I did my test, but I only used apostrophes around a constant and didn't use any concatenation so you need more than me). Try
>I have test it now.
>stmtxt = 'select 1 from rdb$database where exists(SELECT *
>WHERE RDB$RELATION_NAME = T_DT
> and RDB$FIELD_NAME = ''''' || fname || '''''';
>execute statement stmtxt into :idexists;
>The stmtxt is '..._Name = '''COLUMNAME'''' and I get an SQL-Error. The statement-text should be '..._Name = 'COLUMNNAME''.
stmtxt = 'select 1 from rdb$database where exists(SELECT *
WHERE RDB$RELATION_NAME = T_DT
and RDB$FIELD_NAME = ''''''' || fname || '''''''';
(so seven apostrophes before fname and eight after to get the six apostrophes that I successfully used)