Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning an Incremental Field Value in SQL
Message
De
30/04/2004 08:50:42
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Returning an Incremental Field Value in SQL
Divers
Thread ID:
00899694
Message ID:
00899694
Vues:
49
I'm trying to return 1 for the value of the UniqueID field in the first record and then increment each subsequent record in MyCursor. The SQL below returns all "1" in the resulting records. I'm sure this is because the pointer does not move in MyTable, but there must be a simple way. I was lookng at AutoInc, but that doesn't seem to be applicable to cursors. We have a GetNext functionality for tables but I don't need it here. I'm sure it's simple, but it's not coming to me right now.
SELECT ;
   MyTable.Field1, ;
   RECNO('MyTable') AS UniqueID ;
   FROM MyTable ;
   INTO CURSOR MyCursor
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform