Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No Duplicates
Message
 
 
To
04/05/2010 15:36:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01462570
Message ID:
01463086
Views:
44
This message has been marked as a message which has helped to the initial question of the thread.
>Oh is there a way i can number records? as in if a all records get a value of one an if it is encountered again it gets incremented an gets 2 and if i see it a thrid time it gets 3 etc?so example
>we have three instances of peter
>the first one will be
>
>1 peter
>2 peter
>3 peter
>
If your original table doesn't have an ID field (or fields combinations making a unique key), then in VFP the only way would be to rely on recno()

I already posted this version in my previous replies.

If you want to add this to the select, then

select Name, cast(0 as I) as IDField from myTable group by Name having count(*) > 1 into cursor csrDups readwrite

replace all IDField with recno() in csrDups
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform