• HanShi (10/24/2016)


    ...

    WHERE x.evntTime > cast(GETDATE()-1 as date)

    since evntTime seems to be DATETIME datatype, wouldn't that leave an implicit conversion in the execution to compare it to the calculated DATE value? If you want to avoid the conversion, maybe something like:

    WHERE x.evntTime > DATEADD(day, DATEDIFF(day, 1, GETDATE()),0)