Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select problem
Message
 
À
13/04/2006 13:20:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01113520
Message ID:
01113536
Vues:
16
>i have 3 table
>
>
>table tb_mesure = ident,code,descr
>table tb_item = ident,code,descr
>table tb_item_in = ident , ident_item,ident_mesure,qty
>
>
>
>i want to get the sum of the qty(tb_item_in) with the code(tb_item) and the descr(tb_mesure)
>
>
>
>
>how can i make the select for sql server
>
>
>thanks
SELECT tb_item_in.Ident, tb_item.Descr,  SUM(Qty) AS Qty
       FROM tb_item_in
       LEFT JOIN tb_item ON tb_item_in.Ident = tb_item.Ident
GROUP BY tb_item_in.Ident
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