>Hi all, I need to retrieve the largest value from one of my tables in SS, my code is shown below
>
>
>Select ClaimRef,max(Claim.AdmittedValUSD) as admval from claim
>group by ClaimRef
>
>
>
>I expected to get 1 record but receive thousands ? any idea why ?
>ClaimRef is unique PK
try
SELECT TOP 1.* FROM claim ORDER BY claim.AdmittedValUSD desc
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.