I use the EXECUTE statement in a procedure which has 2 parameters, one is to hold the query, and the other for the value used in the query
but I have an error:
ERROR: syntax error at or near "USING"
may any one solve this problem?
THANKS.
Code:
create or replace function delete_from_table1(character varying , integer ) RETURNS void as ' DECLARE query ALIAS FOR $1; id ALIAS FOR $2; BEGIN EXECUTE query USING id ; END;' language 'plpgsql';
ERROR: syntax error at or near "USING"
may any one solve this problem?
THANKS.
Comment