Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field that numbers instace of a common data field
Message
From
19/09/2002 21:03:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
19/09/2002 19:53:44
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00702553
Message ID:
00702566
Views:
8
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform