Hi All!
I am using power query to query an ODBC to oracle and return the results to excel... I have done it many times in the past. I am trying to ODBC - "advanced" sql so I can filter the data coming back from the server to make it as fast as possible. It hangs. Main query is being filtered by the subquery using a WHERE XXXXX IN(subquery)

So main query works with out limiting records and the subquery works by itself when testing... but together it just hangs.. just to note (not sure if it is the problem) the subquery and the main query both query the same table - I did give each one a different alias.... table BCS.TEBIT_REPORTING_TV

select 
               report_final.*
from 
               BCS.TEBIT_REPORTING_TV report_final
where 
               report_final.PROJECT_ID in(
                              select 
                                             report.PROJECT_ID          
                              from 
                                             BCS.TEBIT_REPORTING_TV report
                                             inner join BCS.TEBIT_RPTG_TEAM_DV Bene_team on Bene_team.TEAM_ID = report.BENEFICIARY_TEAM_ID
                                             inner join BCS.TEBIT_RPTG_TEAM_DV Init_team on Init_team.TEAM_ID = report.INITIATING_TEAM_ID
                                             inner join BCS.TEBIT_RPTG_PROJECT_TYPES_DV project_type on project_type.PROJECT_TYPE_ID = report.PROJECT_TYPE_ID
                                             inner join BCS.TEBIT_RPTG_PROJECT_STATUS_DV project_status on project_status.PROJECT_STATUS_CDE = report.PROJECT_STATUS_CDE
                              where
                                             (report.MAX_POTENTIAL_FISC_YEAR_ID>2017 and
                                             project_status.PROJECT_STATUS_DESC <> 'Cancelled' and
                                             project_type.PROJECT_TYPE_DESC= 'VA/VE' and
                                             Bene_team.PROFIT_CENTER_GROUP_ID = 'DNDG')
                                             or
                                             (report.MAX_POTENTIAL_FISC_YEAR_ID>2017 and
                                             project_status.PROJECT_STATUS_DESC <> 'Cancelled' and
                                             project_type.PROJECT_TYPE_DESC= 'VA/VE' and
                                             Init_team.PROFIT_CENTER_GROUP_ID = 'DNDG')
                              group by 
                                             report.PROJECT_ID
                              )
Thanks
Steve - Harrisburg