|  | Posted by Alexander Kuznetsov on 09/14/05 18:33 
group by is missing:
 Here's one option:
 
 
 select
 t.Contact,
 t.Company,
 t.Job_Title,
 t.Importance
 from
 dbo.MyTable t
 join
 (
 select Company, max(Importance) as 'Importance'
 from dbo.MyTable
 --------------
 GROUP BY COMPANY
 -----------
 ) dt
 on t.Company = dt.Company
 and t.Importance = dt.Importance
 
 
 Simon
  Navigation: [Reply to this message] |