Problem in the cursor [message #378143] |
Mon, 29 December 2008 02:30 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
samit_gandhi
Messages: 226 Registered: July 2005 Location: Hong Kong
|
Senior Member |
![samit_gandhi](/forum/theme/orafaq/images/yahoo.png)
|
|
Hi,
I am making cursor like this :
cursor c1 is select ename from emp
where job in (:a);
in my one of the query i m concatinate the value of a.
means a return 'SALESMAN','CLERK'
In this scenerio the cursor is not working.
If instead of :a if i put 'SALESMAN','CLERK' than its working fine.
Please help
|
|
|
Re: Problem in the cursor [message #378149 is a reply to message #378143] |
Mon, 29 December 2008 02:58 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
dhanuka.rajesh
Messages: 49 Registered: March 2008 Location: Mumbai
|
Member |
|
|
Are you trying to use SQL Plus/ Toad.
I just checked, it does not even work for regular Queries.
If you get certain information on this do let me know.
Best Regards,
Dhanuka. Rajesh
|
|
|
|
|
|
Re: Problem in the cursor [message #378567 is a reply to message #378173] |
Wed, 31 December 2008 00:02 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
If you are declaring 'A' variable then check the width of that variable i.e a varchar2(5) which is smaller then 'clerk salesman'.
Better is send me the proper code,i ll give u the answer
Regards
Danish Hayder
|
|
|
Re: Problem in the cursor [message #378586 is a reply to message #378143] |
Wed, 31 December 2008 00:52 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
ganesh_jadhav0509
Messages: 74 Registered: May 2007 Location: Chester
|
Member |
![ganesh_jadh0509](/forum/theme/orafaq/images/yahoo.png)
|
|
When you are passing variable it takes like
''SALESMAN','CLERK'' so it is not possible to take values like that instead better if you can use cursor in loop and dump the values in another variable.
|
|
|