Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I want to add a runbalance calculated field in query
Message
De
25/11/2006 13:08:29
 
 
À
25/11/2006 11:46:58
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 7.0
Divers
Thread ID:
01172408
Message ID:
01172417
Vues:
17
>I want to add a balance field to this query how do I achive this
>
>
>select outdt as date ,packsetid, shetkariid,
>sum(inqty) as inqty, sum(outqty) as outqty , ****running balance field***
>from stkoffset
>where packsetid = @p_packsetid and shetkariid = @p_shetkariid
>group by packsetid, shetkariid, outdt
>order by packsetid, shetkariid, outdt
>
>Rajesh
select outdt as date ,packsetid, shetkariid,
      sum(inqty) as inqty,
      sum(outqty) as outqty ,
      sum(inqty - outqty) as Balance
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform