1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| SELECT DISTINCT CONVERT(INT,k.OPERATION) AS "OP", k.Refkit AS "N° Outils", k.Libkit AS "Désignation Outil", d.RepereUsinage AS "Repère Usinage", a.Libart2 AS "Famille", d.refart AS "MABEC",a.Libart1 AS "Désignation MABEC", a.CodeFourn AS "Fournisseur", a.P_REF_FOURNISSEUR AS "Cofor", a.PrixUnit AS "Prix Unitaire", d.EquipementParPo AS "Equipement par machine", d.NB_UTILISATION AS "Nbre Utilisation", d.CHARNIERE AS "Charnière",
--Colonne calculée
(a.PrixUnit * d.EquipementParPo)/(d.CHARNIERE*d.NB_UTILISATION) AS "Coût OC pièce",
d.EquipementParPo/(d.CHARNIERE*d.NB_UTILISATION) AS "Nbre OC consommé à la pièce"
--(d.EquipementParPo/(d.CHARNIERE*d.NB_UTILISATION))*i.DOTATION AS "Nbre OC Moteur/jour"
--Tables
from articles a, kits k, detailkits d, ImputationMouvt i
--Conditions
where a.refart=d.refart and d.RefKit=k.RefKit and k.centrecout=i.CodeImput and k.centrecout='F6341'
--Filtre sur les consommables
and a.Libart2 NOT LIKE '%P%'
--Filtre
ORDER BY CONVERT(INT,k.OPERATION), k.Refkit |
Partager