Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field that numbers instace of a common data field
Message
De
19/09/2002 21:03:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/09/2002 19:53:44
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00702553
Message ID:
00702566
Vues:
9
>Is there a way in an sql statement to have a field that would number the records 1 through whatever, only giveing the records with a unique field the number 1 and those that have the same data in a particular field to increment by 1?

I don't know whether there is a fast, easy, built-in way - but you can write a small UDF, that either increments a variable, or gets a field from disk, and resets when the value (passed as a parameter) changes.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform