I have a query which contains in it the vial # , product , speed , # of people and the vials/manmin. there are multiple vial # for each product and within a vial # there are duplicate entries.So the same vial # could have run on another shift and the speed could be different therby causing the vials/manmin to be different. I would like to give the user the option to enter a vial # and display the record with the highest vial/manmin for that particular vial #. How would i do this?
Please advise.
Thanks.
*CODE**
SELECT [Packaging table].[vial #], [Packaging table].shift, [Packaging table].line, [Packaging table].Product, [Packaging table].People, [Actual Units]/[hours run]/60/[people] AS [v/manmin], [Packaging table].[Actual Units], [Packaging table].[hours run], [Packaging table].[STD people]
FROM [Packaging table]
ORDER BY [Packaging table].[vial #], [Actual Units]/[hours run]/60/[people];
Please advise.
Thanks.
*CODE**
SELECT [Packaging table].[vial #], [Packaging table].shift, [Packaging table].line, [Packaging table].Product, [Packaging table].People, [Actual Units]/[hours run]/60/[people] AS [v/manmin], [Packaging table].[Actual Units], [Packaging table].[hours run], [Packaging table].[STD people]
FROM [Packaging table]
ORDER BY [Packaging table].[vial #], [Actual Units]/[hours run]/60/[people];