Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Summing Problem
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01328699
Message ID:
01328720
Views:
10
>But the query requires that I group by all the fields in the SELECT portion
>
>

If you need SUM of the fields, you only need to group by ID and add SUM for other fields, e.g.
SELECT	t.iTrading_Partner_ID,
>>>		SUM(tp.sTP_Name1) as sTP_Name1,
>>>		SUM(tar.AR) as AR,
>>>		SUM(tdp.Depo) as Depo,
etc.
>>You can group only by iTrading_Partner_ID and add SUM for all other column.
>>

UPDATE. I see that Eric beat me by few minutes while I was working on my own SQL script.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform