SQL qurey - WHERE

uncle_scrooge
04-20-2004, 06:36 AM
Is it possible to build in WHERE Nr = '1' in this SQL query:

Set rs1 = conn_db.Execute( _
"SELECT Brand, SUM([Sales Value (Euro)]) As SumValueEuro, SUM([Sales Units]) As SumUnits, SUM([Sales Units %]) As SumUnitsper, SUM([Sales Euro %]) As SumEuroper, AVG([EU-Price per Unit]) As AvgPerunit, SUM(Unwcalc) As SumUnwcalc, SUM(Wcalc) As SumWcalc FROM Table1 GROUP BY Brand ORDER BY SUM([Sales Units]) DESC", , _
adCmdText)

Syko10-96
04-20-2004, 06:42 AM
assuming Nr is a string field in your table, yes.

it should go between your FROM clause and your GROUP BY clause

uncle_scrooge
04-20-2004, 06:55 AM
Thanks!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum