|
group by error : Expected end of statement
|
|
03-09-2010, 07:21 PM
Post: #1
|
|||
|
|||
|
group by error : Expected end of statement
hi...
i have an error to total my products in group by any help please ..... this is my code what is wrong? Code: <BODY> <% Set MyConn = Server.CreateObject("ADODB.Connection") MyConn.Open "FILEDSN=c:/dsn/MyTable_dsn.dsn" SQL_query = "SELECT products, SUM(sales) AS Totalsales" FROM Customer GROUP BY products; Set RS = MyConn.Execute(SQL_query) WHILE NOT RS.EOF %> <br> BAG: <%=RS("Total sales")%> <br> <% RS.MoveNext WEND RS.Close MyConn.Close %> </BODY> Thanks. |
|||
|
03-09-2010, 07:32 PM
Post: #2
|
|||
|
|||
|
RE: group by error : Expected end of statement
Move the quote to the end of the string.
SQL_query = "SELECT products, SUM(sales) AS Totalsales FROM Customer GROUP BY products"; |
|||
|
« Next Oldest | Next Newest »
|




