General information
Forum:
Microsoft SQL Server
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 ??
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only