Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Increment Field
Message
 
 
À
11/04/2008 13:00:21
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01309981
Message ID:
01310020
Vues:
28
>Is there a way to have a value that increments by one in a SQL statement?
>
>
>SELECT *, IncrementThisValueByOne FROM MyTable
>
>
>To get:
>
>
>MyFieldOne MyFieldTwo IncrementThisValueByOne
>
>Bobby      Jones      1
>Jamie      Lee        2
>Terry      Hatcher    3
>
Yes.
select MyField1, myField2, recno() from (select myField1, myField2 from myTable...)
That was a tip by Tamar Granor on the last NY User Group meeting.
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform