You are here: Re: Select Max values from queries for multiple Schedule_Number « MsSQL Server « IT news, forums, messages
Re: Select Max values from queries for multiple Schedule_Number

Posted by Plamen Ratchev on 01/08/08 03:40

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация