Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kieran5405
Yak Posting Veteran
96 Posts |
Posted - 2007-05-15 : 07:01:34
|
Hi,I am trying to get this working in a sql query. I have the below query which gets the username and adds two column values together to get a total amount.SELECT NTuser, Convert(VARCHAR(100), sum(TravelAmount + SubAmount), 1) as 'TotalAmount' FROM ExpensesHowever, there will be many rows for the same username so what I need to do is return only one row per username with the total of all the users 'TotalAmount'.Any help much appreciated. |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|