Hi Floriran,
Thanks for your reply. For learning purpose, i have created following SP.
create procedure USP_TEST()
as
begin
declare var_name varchar(10) := 'UMESH';
exec ' "select" '||:var_name||' "from dummy;" ';
end
I am able to compile it. As per suggestion, i have added " " quotes. but getting following error. Any idea?
Could not execute 'call USP_TEST' in 33 ms 72 µs .
SAP DBTech JDBC: [257]: sql syntax error: "UMESH"."USP_TEST": line 5 col 2 (at pos 84): [257] (range 3) sql syntax error exception: sql syntax error: incorrect syntax near """: line 1 col 1 (at pos 1)