I a column names comments, the record I am working with has the following value in comments - '11, 12'
I want to use this select statement as a sub query that would replace the 11, 12 for region in the bottom statement -
SELECT to_number(comments, '99')
from report_dist
where group_type = 'PLT01'
select *
from region
where email_flag = 'Y'
and ((region in(11, 12)
and 'PLT01' like 'PLT%')
or 'PLT01' NOT LIKE 'PLT%')
order by region;
I want to use this select statement as a sub query that would replace the 11, 12 for region in the bottom statement -
SELECT to_number(comments, '99')
from report_dist
where group_type = 'PLT01'
select *
from region
where email_flag = 'Y'
and ((region in(11, 12)
and 'PLT01' like 'PLT%')
or 'PLT01' NOT LIKE 'PLT%')
order by region;