- Forum
- Databases
- Oracle How do I use a input variable inside like condition
-
Junior Member
How do I use a input variable inside like condition
How Do I use a input parameter to a procedure in a query inside like condition.
let v_empl is varchar input parameter to a procedure.
then select * from empl where empname like '%v_empl%';
is yeilding null rows.
How do I use a input variable inside like condition.
-
Expert Member
Re: How do I use a input variable inside like condition
Hi Bharani,
Use your query as follows,
select empno, empname from empl where empname like '%'||v_empl||'%';
This way you can use the input variable inside the like condition.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules