• Change:

    and cast(h.created as datetime) < convert(datetime, floor(convert(float, getdate()))))

    to:

    and cast(h.created as datetime) < dateadd(hour, 2, convert(datetime, floor(convert(float, getdate())))))

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon