Home » Developer & Programmer » Forms » Problem in the cursor
Problem in the cursor [message #378143] Mon, 29 December 2008 02:30 Go to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

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 messageGo to next message
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 #378158 is a reply to message #378149] Mon, 29 December 2008 03:14 Go to previous messageGo to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

OK DEAR.
Re: Problem in the cursor [message #378159 is a reply to message #378158] Mon, 29 December 2008 03:24 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps you'd want to search for "varying elements in IN list" (I believe that Tom Kyte offers a nice discussion about the issue). Also, check this OraFAQ topic (or search for more).
Re: Problem in the cursor [message #378173 is a reply to message #378159] Mon, 29 December 2008 03:58 Go to previous messageGo to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

i have check but i cant find the solution what i want. pls explain me in detail.
Re: Problem in the cursor [message #378567 is a reply to message #378173] Wed, 31 December 2008 00:02 Go to previous messageGo to next message
tipyyt
Messages: 11
Registered: March 2007
Location: Karachi
Junior Member

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
ganesh_jadhav0509
Messages: 74
Registered: May 2007
Location: Chester
Member

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.
Previous Topic: can we do web enabled in form 6i
Next Topic: Forms6i: write data in two or more Excel sheets
Goto Forum:
  


Current Time: Sun Feb 09 10:15:33 CST 2025