View Single Post
  #4 (permalink)  
Old April 18th, 2008, 09:14 AM
Wolffy's Avatar
Wolffy Wolffy is offline
Slaprentice of Wolves


 
Join Date: Mar 2008
Location: Peoria, IL
Posts: 146
Thanks: 1
Thanked 23 Times in 20 Posts
Rep Power: 1
Wolffy is on a distinguished road

Awards Showcase
Microsoft .Net 
Total Awards: 1

Default

I agree -- however even a character 4-digit year should sort correctly. I wonder about the condition Topic_Date <= getDate(), which compares a VARCHAR with a DATE value. I'm surprised the query even parses. Beyond that, since date/times are nothing more than integers internally, I'm thinking that this compare isn't doing what you think it is. Even if the analyzer figure it out, it would be something like saying '2008' <= '04/15/2008 12:00:00 AM'