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:05:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/09/2002 21:03:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
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:
00702567
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.

Of course, you would invoke the function from the SQL command.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform