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!

using list as a result of query in where clause

SarahDec 9 2019 — edited Dec 9 2019

I have this query

select *

from TMP_MAPPING t

where t.lvl1_code in ('L-12-3-3','L-12-3-4')

, but "where clause" isn’t a static part. 'L-12-3-3','L-12-3-4' are the results of

(select t.comments from LCR_CBI_RATIOS3 t where t.pragraph = '22-40') query.

the result is a varchar2 cell. this is the result 'L-12-3-3','L-12-3-4'

It must be like below query

select *

from TMP_MAPPING t

where t.lvl1_code in (select t.comments from LCR_CBI_RATIOS3 t where t.pragraph = '22-40')

This query doesn’t have any result.

How could I solve this problem?

This post has been answered by Paulzip on Dec 9 2019
Jump to Answer
Comments
Post Details
Added on Dec 9 2019
13 comments
724 views