SELECT countryCode, cityCode, itemCode, storeType, vendorCode, gridCodeX, gridCodeY, facings, brand, rc, storeCode, storeName, Monday, Saturday, Sunday, Tuesday,
Wednesday, Thursday, Friday, ARABIC, ItemName, upcCode, TREF
FROM dbo.ScheduleView
WHERE (CASE DATEPART(weekday, GETDATE() + 4)
WHEN 1 THEN [Sunday] WHEN 2 THEN [Monday] WHEN 3 THEN [Tuesday] WHEN 4 THEN [Wednesday] WHEN 5 THEN [Thursday] WHEN 6 THEN [Friday] WHEN 7 THEN
[Saturday] END = 1)
|