Update tblEvent Set [SellThroughNow] = Case When e.QTY_Available = 0 then 1 Else 0 End ,[SellThrough1Hour] = Case When e.ProjectedTimeTill100PercentSellThrough <= 60 then 1 Else 0 End ,[SellThrough1AndHalfHour] = Case When e.ProjectedTimeTill100PercentSellThrough <= 90 then 1 Else 0 End ,[SellThrough2Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 120 then 1 Else 0 End ,[SellThrough2AndHalfHours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 150 then 1 Else 0 End ,[SellThrough3Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 180 then 1 Else 0 End ,[SellThrough4Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 240 then 1 Else 0 End ,[SellThrough5Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 300 then 1 Else 0 End ,[SellThrough6Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 360 then 1 Else 0 End ,[SellThrough7Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 420 then 1 Else 0 End ,[SellThrough8Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 480 then 1 Else 0 End ,[SellThrough9Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 540 then 1 Else 0 End ,[SellThrough10Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 600 then 1 Else 0 End ,[SellThrough11Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 660 then 1 Else 0 End ,[SellThrough12Hours] = Case When e.ProjectedTimeTill100PercentSellThrough <= 720 then 1 Else 0 End ,[SellThroughGreaterOrEqual13] = Case When e.ProjectedTimeTill100PercentSellThrough > 720 OR e.ProjectedTimeTill100PercentSellThrough Is Null then 1 Else 0 End from tblEvent e where ((((getdate() >= promostartdate) And (getdate() < PromoEndDate)) And RecordType = 'Promo') OR (RecordType = 'Event' AND EventEndDate > getdate()))

ProjectedTimeTill100PercentSellThrough SellThrough1Hour SellThrough2Hour SellThrough3Hour SellThrough4Hour 65 0 0 0 0

ProjectedTimeTill100PercentSellThrough SellThrough1Hour SellThrough2Hour SellThrough3Hour SellThrough4Hour 65 0 1 1 1