I know that it is possible to create a procedure without defining the result of it, but this is true only if I dont execute the select statement within an execute immediate. create procedure myproc() begin select 'ss' from dummy; -- this works execute immediate ('select ''ss'' from dummy'); -- this does not work end; Any Ideas? Comment Text Removed
|
Does it work when you add the WITH RESULT SET ON clause, see here...? By default, EXECUTE IMMEDIATE is not supposed to return a result set. 1
Besides that, there may be ways to parameterize your statement that do not require dynamic SQL, say by using connection-specific variables...
(03 Oct '19, 14:44)
Volker Barth
Thank you very much! it has worked with (WITH RESULT SET ON)
(04 Oct '19, 04:18)
Baron
Replies hidden
...so don't forget to check-mark the answer :)
(04 Oct '19, 08:40)
Breck Carter
|