SELECT TOP 1 Invoice.ApprovedPersonName FROM Invoice WHERE Invoice.NoClient=Client.Numero ORDER BY Invoice.AddDate
SELECT TOP 1 Invoice.ApprovedPersonName FROM Invoice WHERE Invoice.NoClient=Client.Numero ORDER BY Invoice.AddDate DESCI would say this can be done with one select command with the use of MIN(), MAX(). However, I am not sure if this would always be adequate:
SELECT MIN(Invoice.ApprovedPersonName) AS FirstOne,MAX(Invoice.ApprovedPersonName) AS LastOne FROM Invoice WHERE Invoice.NoClient=Client.Numero ORDER BY Invoice.AddDateIs this about the proper way to do it?