Hello All,

Below is the problem and way I was trying to handle it



C_list contains comma separated values of group Id’s. this list contains all
the group id’s associated to a particular login name.



C_list= (1,15005,800005,800003,800004,805)



This variable will be holding up dynamically value in numbers.



For group id numbers in simple sql statement we can get the result
corresponding name using the below query,



Select c105,c106 from t10 where c106 in (1, 101,102,104).



Same query when I tried transforming in a cursor it throws up a compilation
error. The error points out to a fetch statement where we try and fetch the
data from the cursor for one particular group id.



Declare cursor c1 as select c105,c106 from t10 where c106 in(c_list);

Begin

Open c1;

Loop

Fetch C1 into g_num,g_name;

dbms_output.put_line(g_name);

EXIT WHEN C1%NOTFOUND;

END LOOP;

Close c1;

End;



Hope it explains the problem I am facing.

Any suggestions/Comments or previously implemented code will be helpful for
me.

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:rmisoluti...@verizon.net ARSlist: "Where the Answers Are"

Reply via email to