1. String concatenation using the PL/pgSQL language is done like this:
declare
split_table_name text[];
v_PK text;
v_Query text;
v_Query := 'select ' || v_PK || ' from ' || split_table_name[1];
2. To run the above query string variable (i.e v_Query), use the EXECUTE statement like this:
declare
result text;
EXECUTE v_Query into max_num_str ;
or
EXECUTE 'select ' || v_PK || ' from ' || split_table_name[1] into max_num_str ;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Thank you for your comment.