Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I add incremental counter in select statement
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Can I add incremental counter in select statement
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01269984
Message ID:
01269984
Vues:
89
Is there a way to add an incremental count expression while using SELECT statement. For example, the statement below retrieves record into cursor:
select firstname from sometable into cursor
the data retrieved is;
john
susan
mary
etc..
Is there a way to write the SELECT statement where I can add a number for each record retrieved. For example:

the desired data I would like to retreive is the firstname column and incremental number column (I don't know how to add something in SELECT statement to create incremental numbers);
name column    incremental number column
john           1
susan          2
mary           3
etc..          etc..
is there anything I can add in the SELECT statment to get incremental number column. Thanks

Nick
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform