Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select problem
Message
 
To
13/04/2006 13:20:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01113520
Message ID:
01113536
Views:
17
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform