Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count number
Message
De
21/02/2000 23:17:52
 
 
À
21/02/2000 22:15:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00335161
Message ID:
00335205
Vues:
17
>>>I would like to create a SQL query in which one column contains a counter that increments by one for each record in the query result. This would be just like the count function which can be set for a report in the report designer. However I can't seem to find any function that would generate the numbers into the query result. As this must have come up at other times, I am hoping that some one might be able to give me an idea in this regard.
>>>
>>>Thanks
>>>
>>>Porter Bailey
>>
>>Why can't you use RECNO() of the resulting cursor?
>
>Craig
>
>I have tried Recno( ), however it comes up with the record number of the underlying table record, not the record number of the cursor. I think it was from there. It wasn't a sequential series of numbers anyhow.
>
>PB


You can't put RECNO() in as part of the SQL SELECT. It produces unpredicatable results. However, after the SQL Statement has been executed, the each record in the cursor will have a RECNO. Use that.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform