>Declare @recsec integer >Select @recsec= Select Max(recseq) From webprddt6.drawmfai Where part no = '860637-001' Group By partno >Select recsec,failoc,faistatus from webprddt6.drawmfai where recsec=@recsec >>or substitute valriable with 1st Select in the 2nd one. It all depends if back-end supports it.