Stefan Motz
asked on
SQL Query
I'm trying to display the number of Compliments by month but I get the "Expected end of statement" error message.
I would appreciate your help:
I would appreciate your help:
i=1
do while i<=12
sql2013 = "SELECT Count(ID) AS CountID FROM Compliments where year("OccDate")='2013' and month("OccDate")=i"
Set rs2013 = conn.Execute(sql2013)
compliments= rs2013("CountID")
response.write MonthName(i) & rs2013("CountID")
i=i+1
loop
j=1
do while j<=12
sql2014 = "SELECT Count(ID) AS CountID FROM Compliments where year("OccDate")='2014' and month("OccDate")=j"
Set rs2014 = conn.Execute(sql2014)
compliments= rs2014("CountID")
response.write MonthName(i) & rs2014("CountID")
j=j+1
loop
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER