Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with SP
Message
De
11/11/2013 09:10:11
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Versions des environnements
SQL Server:
SQL Server 2000
Application:
Web
Divers
Thread ID:
01587728
Message ID:
01587736
Vues:
42
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform