28. december 2005 - 12:47Der er
10 kommentarer og 1 løsning
Menst brugte værdi udskrives
Jeg skal i min access tabel have udskrevet den hyppigste værdi.
Altså f.eks. hvis Ole har været skrevet 500 gange og Jens kun har været brugt 100 gange, skal jeg have udlæst Ole. Problemet er blot at jeg ikke kender de værdier der står i databasen....
Welll i have a database where people put in different information, including the names of sertain individuals. Now i need to list which individual has been typed in the most, but here i dont know the names of these individuals.
therefore, i have a table called Navn, where the typed info is supposed to go. But if Ole has been mentioned 50 times, i need his name on the top of the list.
In your Access database you can make an Aggregate query. group on the field containing the name and then add the same field again to the query, but this time, instead of grouping on the column use Count. This will show you the nuber of times each name has been entered into the table.
You can then sort descending on the column containing the number to to show the highest first.
No, i dont realy know how to make queries in Access.... And yes im using Access from VB. Could you by chance make the SQL-string for me, or give me an example ?
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.