Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Group by Problem:Expected end of statement
02-06-2010, 11:34 PM
Post: #1
Group by Problem: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>
[/php]
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:

Contact UsDeveloper SolutionReturn to TopReturn to ContentLite (Archive) ModeRSS Syndication