• That does NOT help me understand what you want. I can't see your screen, I have no idea what datatypes are in your table, I have no idea what values are in the columns. In short, without ddl and sample data I am shooting in the dark at unknown targets for an unknown reason. The fact that I was able to come close in a previous post was mostly dumb luck.

    Add to that the strange syntax you keep throwing.

    < { fn NOW() } - 80)

    That is NOT t-sql and I am not sure what it really is. I am also pretty sure it is not accurate because if you store the timestamp you are missing a portion of the day.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/