HI,
I am trying to write a query that would display the current rate at the minute based on which meeting time is occuring. I could have up to 3 meetings scheduled per shift.
My goal was trying to have a qry that shows the current production gaol based on current minute in shift and based on which meeting is occuring.
"shift start & end" = 07:45 - 15:45
"23" = the current scheduled downtime minutes for this machine. The "current scheduled downtime minutes" is summed in coldfusion as the meeting time happens.
"480" = shift minutes
"1218" = current production on machine
"standard rate" = 192000
My current query..
SELECT ABS(Standard_Rate / 480 * 23) AS rate,
ABS(1218 / (Standard_Rate / 480 * 23) * 100) AS eff
FROM tbl
WHERE (RIGHT(Name, 2) = '04') AND (Name LIKE '%lbr%')
ORDER BY Name
Db table where schedule is stored
start_date end_date start_hour start_minute end_hour end_minute
12/4/2013 12/4/2013 8 8 9 45
12/4/2013 12/4/2013 12 0 13 0
12/4/2013 12/4/2013 15 30 15 45
I am trying to write a query that would display the current rate at the minute based on which meeting time is occuring. I could have up to 3 meetings scheduled per shift.
My goal was trying to have a qry that shows the current production gaol based on current minute in shift and based on which meeting is occuring.
"shift start & end" = 07:45 - 15:45
"23" = the current scheduled downtime minutes for this machine. The "current scheduled downtime minutes" is summed in coldfusion as the meeting time happens.
"480" = shift minutes
"1218" = current production on machine
"standard rate" = 192000
My current query..
SELECT ABS(Standard_Rate / 480 * 23) AS rate,
ABS(1218 / (Standard_Rate / 480 * 23) * 100) AS eff
FROM tbl
WHERE (RIGHT(Name, 2) = '04') AND (Name LIKE '%lbr%')
ORDER BY Name
Db table where schedule is stored
start_date end_date start_hour start_minute end_hour end_minute
12/4/2013 12/4/2013 8 8 9 45
12/4/2013 12/4/2013 12 0 13 0
12/4/2013 12/4/2013 15 30 15 45