jdbrown239 (4/26/2013)
LynnYou guys were right about the 'Where' clause being the issue. I added a few indexes to the table to increase performance and went back to a suggested 'where' clause by Sean and I was able to get the data without a time stamp.
WHERE cast(c.CTS_LAST_SAVED_DATE as DATE)> = cast(GETDATE() as DATE) and cast(a.APP_LAST_SAVED_DATE as DATE)>= cast(GETDATE() as DATE) or CAST(c.CTS_LAST_SAVED_DATE as DATE) >= cast(GETDATE() as DATE)and co.CO_BOOKING_DATE is not NULL
Thanks you guys for hanging in there.
Doug
Glad you were able to get it sorted out.
_______________________________________________________________
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/