Pentium
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Pentium
-
-
Hi guys and girls from having learned a lot from W3Schools I came across a problem which even the site doesn't explain so came to the forums for some guidance. Having searched Google hard I found no luck in resolving this problem. I would like to group my fields together according to an expression. Now this seems easy... yes it does as W3Schools tutorials suggest however I am using ASP and embedding SQL into limiting the data produced via this SQL Statement:
dim sqlCommand sqlCommand = "" sqlCommand = sqlCommand + "SELECT [Quantity], [Supplier] " sqlCommand = sqlCommand + "FROM y2005m05 " sqlCommand = sqlCommand + "GROUP BY [Quantity] " objRs.open sqlCommand, objconn,1,3
However after running it I get this:Error Type:Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)[Microsoft][ODBC SQL Server Driver]
Column 'y2005m05.Supplier' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause./test_pro2/groupbysupp.asp, line 60[/b]Suggestions and Comments are welcome. Thank youPent
SQL Group By Clause
in SQL
Posted
What is I wanted to display the SUM of the Quantity along with the Customer... I simply tried this code:
However I get the following error...Error Type:Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)[Microsoft][ODBC SQL Server Driver]