HELP STATEMENT WITH IN (merged) [message #240154] |
Thu, 24 May 2007 04:38 |
shanthkumaar
Messages: 156 Registered: February 2007 Location: india,chennai
|
Senior Member |
|
|
hi experts,
i have a doubt. and i am explaining it here
declare
c3 integer;
CURSOR user_list(emp varchar2)
is
select ename from emps
where
emp_no=emp;
begin
for c3 in user_list('1') loop
DBMS_OUTPUT.PUT_line(c3.ename||',');
end loop;
end;
output
----------------
shanth,
In the above procedure
for c3 in user_list('1')
iam setting the value 1 to emp and the result comes fine
but i have to give more than one values like
for c3 in user_list('1,2')
and so can use the keyword like the below
emp_no like emp;
how can i do this.
guide me.
i have attached the create and insert table script.
my version
SQL> select banner from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
PL/SQL Release 9.2.0.5.0 - Production
CORE 9.2.0.6.0 Production
TNS for Linux: Version 9.2.0.5.0 - Production
NLSRTL Version 9.2.0.5.0 - Production
regards
shanth
[Updated on: Thu, 24 May 2007 04:43] Report message to a moderator
|
|
|
|
|
|
|
|
|