Last post May 09, 2011 09:20 AM by alok_dida
May 09, 2011 08:28 AM|TENi|LINK
i want to update top 2 records for following condition
i have table 'Guarantors' with fields AcNo, AcType, GuarantorDate, Status.
This table contains multiple records for these columns.
i want to update status for top 2 maximum GuarantorDate for group of AcNo and AcType.
Following is my group SQl
May 09, 2011 09:20 AM|alok_dida|LINK
Guarantors.Status = 'Status'
(select TOP 2 acno,actype from Guarantors group by AcNo,AcType) T
T.acno = Guarantors.acno and T.AcType = Guarantors.AcType