Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL syntax for the following
Message
De
30/12/2008 09:27:16
 
 
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
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01244721
Message ID:
01370139
Vues:
24
>Doug,
>
>I understand that this is an old thread, but this topic was discussed today on another forum. See this solution
>http://forums.asp.net/t/1362385.aspx
>
>
>select [id],[name]
>
>from test as A1
>
>where (select count(*) from test as A2 where A2.[id]=A1.[id] and A2.name<=A1.name )<=2
>
>order by [id]
>
>
Hi Naomi,

but the PERCENT is lost !

Happy new 2009.

>
>>Hi,
>>
>>I have a VFP table with the following structure...
>>
>>idnum
>>keyword
>>cgroup
>>iscore
>>
>>...I have one SQL statement that gets the top 20 percent (iscore) of all records (100 records returns 20), and this works fine...
>>
>>SELECT TOP 20 PERCENT,* FROM Table ORDER BY iscore
>>
>>I am now trying to get the top 20 percent (iscore) of each group (cgroup) and am struggling for the correct SQL syntax.
>>
>>Regards
>>Doug Johnston
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform