Hi Everyone,
I am having a problem with a BETWEEN statement using dates.
Im testing my app on MS Access and it works fine, but when im reading off SQL 2000 it fails the error received is
Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '#'.
Does SQL 2000 require different syntax?
You advice would be much appreciated.
Tim :)
** SQL Statement ***
Code:
strSQL = "SELECT Opp.OppID, Opp.OppRef, Opp.OppName, Opp.OppDescShort, Opp.OppPublished, Opp.OppClosing " & _
"FROM GamesLink_Opportunities " & _
"AS Opp WHERE (Opp.OppPublished BETWEEN #"&DateFrom&"# AND #"&DateTo&"#) ORDER BY Opp.OppName"
TDA