Re: Select Max values from queries for multiple Schedule_Number -
01-07-2008
, 09:40 PM
Here is one way to get you the results:
SELECT Schedule_Number,
Process_Description,
MAX(TMDT) AS TMDT
FROM Process_Data
WHERE Process_Description = 'Exit Cold Rinse'
AND Schedule_Number LIKE '12345%'
GROUP BY Schedule_Number, Process_Description
Really no need for joins and the logic for Schedule_Number is converted to
utilize any index on the column.
HTH,
Plamen Ratchev
http://www.SQLStudio.com |