Hi,
Could you please help to sort out comparison problem
DECLARE @TIMESTAMP varchar(30)='EventTimestamp'
DECLARE @Wkstr1 NVARCHAR(30)=CAST('Sep 28 2015 12:00AM' AS DATE)
When i take the print of below statement
WHEN CAST(A.'+@TIMESTAMP+' AS DATE) >= CAST('+@Wkstr1+' AS DATE)
it gives like below
WHEN CAST(A.EventTimestamp AS DATE) >= CAST(2015-09-28 DATE)
but i need
WHEN CAST(A.EventTimestamp AS DATE) >= CAST('2015-09-28' DATE)