garbage

garbage

  • NA
  • 10
  • 26.3k

using BETWEEN in sql2005

Jul 10 2006 3:30 AM

I have an sql statement comparing dates in the Where clause.
This is my code:

[CODE]
CONVERT(NVARCHAR, D.Spd_deldateans, 101) between @DATE1 AND @DATE2
[/CODE]

The problem with the statement, is that, it doesn't show any records when one of the parameters is blank or null. How would it be able to show records giving value only to either of the parameters?


Answers (1)