|
rrayfield -> RE: SQL Server 2000 Date Part Sort By Date (4/1/2006 16:58:56)
|
I am having a massive brain cramp... I am now getting a compilation error like this Microsoft VBScript compilation error '800a03ee' Expected ')' objRS.Open "SELECT Count(ID) AS myCount, (Timestamp,2) AS myDate FROM tableName WHERE DateDiff("d",Timestamp, GetDate()) < 8 AND DateDiff("d",Timestamp, GetDate()) > 0 GROUP BY (Timestamp,2)", objConn, adCmdTable" -------------------------------------------------------------------------------------------------^ because of the "" around the "d" Here is the current code I have objRS.Open "SELECT Count(ID) AS myCount, (Timestamp,2) AS myDate FROM tableName WHERE DateDiff("d",Timestamp, GetDate()) < 8 AND DateDiff("d",Timestamp, GetDate()) > 0 GROUP BY (Timestamp,2)", objConn, adCmdTable" Thanks for all you help
|
|
|
|