on 2019 Oct 03 12:32 PM
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?
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Besides that, there may be ways to parameterize your statement that do not require dynamic SQL, say by using connection-specific variables...
User | Count |
---|---|
68 | |
16 | |
12 | |
7 | |
7 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.