Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: possible to use alter system or alter session commands dynamically?
You can't substitute variables inside of a string. You have to substitute
the entire string. Maybe something like the following.
EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION :1' USING to_char(v_sid) || ',' || to_char(v_serial#);
"Ryan Gaffuri" <rgaffuri_at_cox.net> wrote in message
news:1efdad5b.0302140555.7bb9a8db_at_posting.google.com...
> I asked this in another thread related to a specific task and got an
> answer on how to do that task, which I appreciate.
>
> However, I'm still wondering if its possible to do this?
>
> I tried:
>
> EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION '':1,:2'''
> USING v_sid, v_serial#;
>
> and it gave me some kind of parsing error. Is it functionally possible
> to do this? Dont need to use it now. Just really curious. Its not in
> the documentation.
Received on Fri Feb 14 2003 - 08:37:53 CST