Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A very simple but complicated SQL statement.
Message
 
 
À
26/02/1998 09:53:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00081329
Message ID:
00081461
Vues:
22
>>>>If you would want to use Foxpro then SELECT TOP 5 .... will do this job. If you don't want to use Foxpro, then what is a purpose to post this question on Foxpro forum?
>>>
>>>
>>>I am using ODBC support to connect oracle with VFP. And don't want to use one more query to get top 5 records that have been fetched by the SQLexec command.
>>
>>There is no *Select top* for an Oracle query. You would have to do:
>>
>>sqlexec(nHandle,"select sal from employee order by sal desc","MyCursor")
>>select top 5 from mycursor
>
>In SQL-Server you can set @@ROWCOUNT to 5 to retrieve just 5 record once. I don't use Oracle, but guess something similar should be there.

I think you are correct, Ed. But, I think this only available in SQL*Plus as a formatting command. e.g., set rowcount = 5. So this would not work with SQLExec.

I know you can specify on the VFP side to return a maximum of ## rows. But can this be done on the fly programmatically?
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform