Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New table
Message
From
22/06/2003 18:28:21
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00802764
Message ID:
00802765
Views:
30
This message has been marked as the solution to the initial question of the thread.
>I have a table many records
>
>
>
>Name
>
>Jonh
>Jonh
>Jonh
>Jonh
>Albert
>Jonh
>Jonh
>Albert
>Moses
>Moses
>
>I want to summarize it to a new table, the name would appear
>only once and a new fiel counts how many times the name occours
>
>Name ========= occours
>
>Jonh ====== 6
>Albert ====== 2
>Moses ====== 2
SELECT Name,COUNT(*) AS Occours FROM Customers GROUP BY 1 INTO TABLE D:\MyTable.dbf
You can also UPPER(Name) AS Name as the first field if you wish to get that variation as well.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform