Added: June/02/2005 at 9:27am | IP Logged
|
|
|
Include any fields you want to the SELECT statement either before the Sum(...) AS ... or after. For example, to access all fields, you would write:
SELECT Sum(valorfinalproposta) AS comissao, fimcadvenda, fimcadnotafisc FROM tab_CadVendas WHERE fimcadvenda='s' AND fimcadnotafisc = 's' GROUP BY indicaprojeto"
Sum(valorfinalproposta) AS comissao acts as a single field in the SELECT statement.
Chris
|