I have misunderstood.Here is my correction:-- making testdataset nocount ondeclare @holiday table (holidate datetime)insert @holidayselect '20100513' union allselect '20100512' union allselect '20100530' union allselect '20100529'if exists(select * from @holiday where holidate = dateadd(dd,datediff(dd,0,getdate()),0) and datename(dw, getdate()) = 'Thursday')begin print 'no'endelsebegin print 'yes'end
You can test it also if you replace Thursday by Wednesday.
No, you're never too old to Yak'n'Roll if you're too young to die.