hi.I meant that you avoid using function calls around columns otherwise you can't use an index on that column.So for example if I wanted to compare a date against a variable then this can use an indexWHERE [datecol] > @startDate AND [dateCol] <= @endDate
But this can noWHERE DATEDIFF(DAY, [dateCol], @startDate) > 2
Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION