Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Summing Problem
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
01328699
Message ID:
01328720
Vues:
11
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform