Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> How to use variable in the LIKE function along with % operators
Hi,
Is there any way i can use the variable in the Like function. That
means i have query like
SELECT * FROM Device WHERE DeviceName LIKE %v_MediaName%;
Here "v_MediaName" is the userdefined variable which contains string. I want to retrieve all the records from the "DEVICE" table whose DeviceName LIKE %v_MediaName%;
If i put it in a single quotes '%v_MediaName%' then the v_MediaName will be treaded as a string instead of a variable. I am using this query in a Procedure.
please help me out to resolve the issue.
thanks
Rao
Received on Mon Nov 27 2006 - 01:46:50 CST
![]() |
![]() |