M
Medhat Nasr
Hi Group,
Working with Access 2002 and SQL 2000,
For an ADODB Recordset's Source I use this syntax :
rst.Source = "SELECT GteeID, CurExpiryDte FROM " & _
"dbo.Guarntees WHERE (CurExpiryDte BETWEEN '" & _
strChkDurEnd & "' AND '" & strTodayIs & "')"
rst.Open
This only opens the correct Recordset , when the date represented
by the first date literal after BETWEEN operator, precedes the other
date,meaning when 'strChkDurEnd' is < 'strTodayIs' .
But, if 'strChkDurEnd' is > 'strTodayIs' it doesn't work properly, and no
recordset opens!
I wonder if this one-direction correctly handling of the BETWEEN operator in
such a syntax, is a standard behavior of SQL ?
Thanks in advance,
Working with Access 2002 and SQL 2000,
For an ADODB Recordset's Source I use this syntax :
rst.Source = "SELECT GteeID, CurExpiryDte FROM " & _
"dbo.Guarntees WHERE (CurExpiryDte BETWEEN '" & _
strChkDurEnd & "' AND '" & strTodayIs & "')"
rst.Open
This only opens the correct Recordset , when the date represented
by the first date literal after BETWEEN operator, precedes the other
date,meaning when 'strChkDurEnd' is < 'strTodayIs' .
But, if 'strChkDurEnd' is > 'strTodayIs' it doesn't work properly, and no
recordset opens!
I wonder if this one-direction correctly handling of the BETWEEN operator in
such a syntax, is a standard behavior of SQL ?
Thanks in advance,