Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL TOP in Query
Message
 
 
À
17/02/2009 02:37:17
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01382151
Message ID:
01382366
Vues:
39
>>Frank, unless there can be multiple cInvoiceNo for the same iSaleId, how about
>>
SELECT TOP 2 c_Test.*,val(cInvoiceNo) as iord;
>>	FROM c_Test ;
>>	ORDER BY iord desc
>
>Yeah, I was wondering as well why a subquery was used. I wonder why this was not noticed by anyone else in this thread. Then I even saw subqueries within subqueries for such a simple problem. Err.... ???

You're right, seems like we don't need derived table at all.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform