>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.