Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

INSTR function in where clause

NagaJun 10 2009 — edited Jun 10 2009
Hi,

I need to check whether the portion of passed comma separated value is there in one of table column values, if its present then i need to fetch that record from the same table.

Example
--------
table1

col1 col2
-----------
01 john
02 Raj

and i am passing '02,04,06' as a input parameter value and based on this value, i need to check in a table and get some record.

procedure p1 (v_string varchar2)
is
select col1, col2
into a, b
from table1
where instr(v_string,........ -- Here i need apply the logic

end;

output
------
02 Raj

please help me with this logic

rds,
Naga
This post has been answered by Nicolas Gasparotto on Jun 10 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 8 2009
Added on Jun 10 2009
5 comments
6,277 views