Home Forums SQL Server 7,2000 T-SQL Summing charges based on the record level NRV code RE: Summing charges based on the record level NRV code
noeld
SSC Guru
Points: 96590
More actions
June 20, 2007 at 12:41 pm
#714197
???
select Account_nbr, NRV_CODE, SUM(charges) as Total_NRV
from [sourcetable]
group by Account_nbr, NRV_CODE
Or maybe what you want is simply :
select NRV_CODE, SUM(charges) as Total_NRV
group by NRV_CODE
* Noel