Using session variables (defined in SQL*Plus ) in a PLSQL Package
From: chollet <sc2ch_at_yahoo.de>
Date: 7 Nov 2001 07:33:10 -0800
Message-ID: <f3d44148.0111070733.5e2afbfb_at_posting.google.com>
open c1;
loop
fetch c1 into c_nr, c_value;
exit when c1%notfound;
dbms_output.put_line('Name: '||c_nr||'/'||c_value); end loop;
close c1;
end;
Date: 7 Nov 2001 07:33:10 -0800
Message-ID: <f3d44148.0111070733.5e2afbfb_at_posting.google.com>
The following Script is running perfectly:
set verify on
set serveroutput on size 500000
define foo = upper
declare
c_nr number(08);
c_value varchar2(50);
cursor c1 is
select nr, name from client where &foo(name) = &foo('Name_Sample');begin
open c1;
loop
fetch c1 into c_nr, c_value;
exit when c1%notfound;
dbms_output.put_line('Name: '||c_nr||'/'||c_value); end loop;
close c1;
end;
--- But how is it possible to refer to the session-variable 'foo' within a plsql package on the db?Received on Wed Nov 07 2001 - 16:33:10 CET