SQL 2000. I'm trying to join two tables on the smalldatetime columns in each. One is my date table that does not have a time included in the date and the other table has a time included in it's date. I want to join only on the date portion of the second table. I'm trying to do a sum on the day's total dollars and don't care what time the value was posted. I can use the following code to eliminate the time portion and then do the join, but is this the best way and does it interfere with SQL using any indexes on the dates? These are fairly small tables but I still want to do it the best way.
Auguy
Sylvania/Toledo Ohio
Code:
dateadd(day,datediff(day,0,postdate),0)
Auguy
Sylvania/Toledo Ohio