ASP Forum
Group by ..... error type:Expected end of statemen
jerrold | Posted 4:44pm 27. January 2010 Server Time |

I want to total my products by group

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
GROUP BY products;

this is my code any help please....

<BODY>
<%
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open "FILEDSN=c:/dsn/MyTable_dsn.dsn"
SQL_query = "SELECT products, SUM(total)"
FROM Customer
GROUP BY products;
Set RS = MyConn.Execute(SQL_query)
WHILE NOT RS.EOF
%>


<%
RS.MoveNext
WEND
RS.Close
MyConn.Close
%>
</BODY>
katy8439 | Posted 4:24am 28. January 2010 Server Time |

You're missing the closing quote at the end of your query:

GROUP BY products;

Should be

GROUP BY products"
jerrold | Posted 4:48pm 28. January 2010 Server Time |

closing quote is not working... same error problem.
you have a complete sample code of GROUP BY


Reply to Post Group by ..... error type:Expected end of statemen



Back to Forum Page