I have an SQL subquery but I want to write it as a join. I know there is a limitation on the IN clause in PL/SQL whereby its Max Limit of Params is 1000. So I need a join statement instead of using the IN with a subquery.
I have spent hours trying to convert it but am Stumped.
Can anyone help please. See attached code.
There are 2 tables..passenger and segment. The segment has a dep_city field which I need to check...and retrieve data from depending on whats in it.
'id' is a common value between the tables.
select distinct myseg.segment_id, myseg.segment_name
from segment myseg where myseg.pkno in (
where passenger.date > to_date('16/02/2009', 'dd/MM/yyyy')
and passenger.index= '1'
and seg.dep_city in ('BOS', 'NYC', CHI', 'SFO')
and passenger.segment_id = segment.segment_id