Hello. Thx for response.
I have tried something like
exec 'INSERT INTO "tuser"."dam.test.db::tuser.procedures.search_result" SELECT '''||table_name||''' AS TABLE_NAME, '||column_name||' AS ID, SCORE() AS SCORE FROM '||table_name||' WHERE contains(*, '''||keyword||''', fuzzy(0.5))';
but here i have "tuser"."dam.test.db::tuser.procedures.search_result" created before the execution. What i really want is to make it as a local variable. Something like:
DECLARE schema_name NVARCHAR(300) := 'tuser';
indexed_tables = SELECT DISTINCT "TABLE_NAME" FROM "SYS"."FULLTEXT_INDEXES" WHERE "SCHEMA_NAME" = :schema_name ;
but i can not transform the top 'exec ...' statement into 'result = SELECT ...' because it always says that it can not pass the scalar value into the 'FROM ...' part.