please try this:SELECT dbo.[PLAN].PlanNumber, dbo.VALUATIONREQUEST.ValueDate, dbo.VALUATIONREQUEST.FundValue, dbo.VALUATIONREQUEST.id_ValuationRequestFROM dbo.VALUATIONREQUEST INNER JOIN dbo.VALUETYPE ON dbo.VALUATIONREQUEST.id_ValueType = dbo.VALUETYPE.id_ValueType INNER JOIN dbo.[PLAN] ON dbo.VALUATIONREQUEST.UniquePlanID = dbo.[PLAN].UniquePlanID INNER JOIN dbo.VALUESTATUS ON dbo.VALUATIONREQUEST.id_ValueStatus = dbo.VALUESTATUS.id_ValueStatus inner join (SELECT dbo.[PLAN].PlanNumber, max(dbo.VALUATIONREQUEST.id_ValuationRequest) as id_ValuationRequestFROM dbo.VALUATIONREQUEST INNER JOIN dbo.VALUETYPE ON dbo.VALUATIONREQUEST.id_ValueType = dbo.VALUETYPE.id_ValueType INNER JOIN dbo.[PLAN] ON dbo.VALUATIONREQUEST.UniquePlanID = dbo.[PLAN].UniquePlanID INNER JOIN dbo.VALUESTATUS ON dbo.VALUATIONREQUEST.id_ValueStatus = dbo.VALUESTATUS.id_ValueStatusWHERE (dbo.VALUETYPE.ValueTypeName LIKE 'Contractual%') AND (dbo.VALUESTATUS.ValueStatusName = 'Complete and Checked' OR dbo.VALUESTATUS.ValueStatusName = 'Checked') AND (dbo.VALUATIONREQUEST.FundValue <> 0) group by dbo.[PLAN].PlanNumber) as dton dt.PlanNumber = dbo.[PLAN].PlanNumber and dt.id_ValuationRequest = dbo.VALUATIONREQUEST.id_ValuationRequest WHERE (dbo.VALUETYPE.ValueTypeName LIKE 'Contractual%') AND (dbo.VALUESTATUS.ValueStatusName = 'Complete and Checked' OR dbo.VALUESTATUS.ValueStatusName = 'Checked') AND (dbo.VALUATIONREQUEST.FundValue <> 0)ORDER BY dbo.[PLAN].PlanNumber
Too old to Rock'n'Roll too young to die.