Optimizing date searches

Optimizing date searches

 

  

O guru's of GUID, O sultans of SQL, O great wizards of WHERE...

When doing a search filtering by dates, is there any
advantage/disadvantage to doing:

... WHERE @mySearchDate >= Table.Date_Field AND @mySearcDAte <
DateAdd(dd, 1, Table.Date_Field)

VS.

... WHERE @mySearchDate BETWEEN Table.Date_Field AND DateAdd(dd, 1,
Table.Date_Field)


Thanks!!


Ken


MS Sql Server LazyDBA home page