Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How 2 automatically calculate % complete??
Message
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00913692
Message ID:
00913721
Vues:
16
thnaks for the post sergey.
actually i display status on front end screen.
by the way u suggested ..

SELECT st.assid, st.staffid,
(SUM(DATDIFF(minute, wt.starttime,wt.stoptime) /
MAX(st.estimatedduration)) * 100 AS status
FROM staff st
JOIN wortime wt ON st.assid = wt.fk_assid
GROUP BY assid, staffid

but i cannot use the field (estimatedduration) directly the way u did up abv
bcoz the values will be like 1d or 6h or 30min etc.,
seems i need to convert estimatedduration into minutes,right ??
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform