I want to set the saletype to 0 if the sale date has expired or is not yet active but only if assignDate is true. how can I build it in the view?
SELECT dbo.ItemStore.SaleType, dbo.ItemStore.SpecialBuyFromDate AS SaleStartDate ,
dbo.ItemStore.SpecialBuyToDate AS SaleEndDate , dbo.ItemStore.AssignDate
FROM dbo.ItemMainAndStoreView