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!

comma separator

Hiren ModiNov 12 2009 — edited Nov 12 2009
Hi All,
I have 2 tables as following.
Master Table
-----------------
Key Value
1 Hair
2 Face
3 Eye Brow


Transaction Table
-------------------------
PK ChainData
1 1,2,3
2 2,3
3 3

I want to execute query like : select * from Master_Table where Key IN (select ChainData from Transaction_Table where PK = 1);

Here I can't get any result because the output of the inner query 1,2,3 it is considered as full string but I wanted to use it as separate value for IN Query.
e.g. select * from Master_Table where Key IN (1,2,3);
is working perfectly file but I want to make it dynamic like above given query.

Thanks in advance.

- Hiren
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 10 2009
Added on Nov 12 2009
3 comments
339 views