Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One SQL, two SQLs, three SQLs, four...
Message
De
21/01/2003 17:04:13
 
 
À
21/01/2003 16:57:51
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00744004
Message ID:
00744016
Vues:
10
>Hi All
>
>I can easily do this in VFP
>
>
SELECT <pkfield>,max(field2) as maxfield from <table1> group by <pkfield> into cursor <cursor1>
>
>and then...
>
>
SELECT <field1> from <table1> where <pkfield> in (select <pkfield> from <cursor1>) into cursor <cursor2>
>
>Question is, how can I do this with SQL Server? I'm assuming I won't be able to create a stored procedure on the client's database.
>
>Thanks in advance!

>
SELECT <field1> from <table1> where <pkfield> in (select <pkfield> from (SELECT <pkfield>,max(field2) as maxfield from <table1> group by <pkfield>))
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform