Home » SQL & PL/SQL » SQL & PL/SQL » Re: how to pass parameters dynamically
Re: how to pass parameters dynamically [message #37154] Mon, 21 January 2002 18:33
Satish Shrikhande
Messages: 167
Registered: October 2001
Senior Member
create table table1(id number,name varchar2(10),fromdate date,todate date);
SQL> select * from table1;

ID NAME FROMDATE TODATE
---------- ---------- --------- ---------
1 SATISH 18-JAN-02 19-JAN-02
2 ANAND 18-JAN-02 19-JAN-02

create procedure pro_1(p_1 varchar2,p_2 date) as
begin
dbms_output.put_line(p_1);
dbms_output.put_line(p_2);
end;

declare
cursor c1 is
select * from table1 ;
begin
for z in c1 loop
if z.id=1 then
pro_1(z.name,z.fromdate);
else
pro_1(z.name,z.todate);
end if ;
end loop;
end;
Previous Topic: what is two categories on oracle??
Next Topic: plsql-reg
Goto Forum:
  


Current Time: Fri Jul 23 11:29:30 CDT 2021