Home » SQL & PL/SQL » SQL & PL/SQL » cursor paramater and like clause
cursor paramater and like clause [message #193726] Tue, 19 September 2006 02:49 Go to next message
Messages: 65
Registered: November 2001
I want to pass the paramter in one of the cusror , thus i am giving a like and then paramater%
but some how this is not able to retrive any value ie not able to pass the parameter.
The query works fine in TOAD but not in Procedure..

could any suggest is there any other way to pass the parameter with like Clause..

cusror a is
select x,y,z
from table1;

cursor b(param1 in varchar2) is
select ....

from <table>
where column like 'param1%';

is this a correct way to pass column like 'param1%'
Re: cursor paramater and like clause [message #193731 is a reply to message #193726] Tue, 19 September 2006 03:17 Go to previous message
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
CURSOR b (p_param_1 in  varchar2) IS
WHERE field_1 like p_param_1||'%'
Previous Topic: Question in group by clause
Next Topic: Order by column value
Goto Forum:

Current Time: Sat Oct 22 07:40:24 CDT 2016

Total time taken to generate the page: 0.10471 seconds