Subject Dynamic Query in Firebird
Author Tomy Handaka
Hi all,

How to create a stored procedure that receive sql query as input parameter and return values based on its input?

The skeleton for the stored procedure is:

create procedure spDynamicQuery(sqlQuery varchar(1024))
-- execute statement :sqlQuery here

example of sqlQuery: 'select users.username from users where users.userid = ''John'''

I've tried many approaches but there's an error message (Wrong request type in EXECUTE STATEMENT).

[Non-text portions of this message have been removed]