Home Forums SQL Server 2005 SQL Server Newbies How to use SELECT query within the WHERE clause RE: How to use SELECT query within the WHERE clause
HanShi
SSC-Dedicated
Points: 33506
More actions
August 27, 2013 at 3:57 am
#1645094
Would this do?
select *
from @Energy_Centre_Availability ECA
inner join @Energy_Centre_Boiler_Maintenance_Schedule ECBMS
on ECA.t_stamp >= ECBMS.StartDate
and ECA.t_stamp < ECBMS.EndDate