Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching for matching records with different event code
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00640052
Message ID:
00640057
Views:
15
>Okay I need to extract records in a table based on it occuring in the table more than 4 times, each time having a different event code.
>
>For example John Smith occurs 5 times with a different event code each time.
>Name Code
>John Smith emd1
>John Smith emd2
>John Smith emd3
>John Smith emd4
>John Smith emd5
I am not sure this is what you need, but you could probably try with something like:
SELECT name, count(*) FROM mytable GROUP BY name ORDER 3 DESC
This will give you how many instanced of each person are in the table.
Hector Correa
Previous
Reply
Map
View

Click here to load this message in the networking platform