Avatar billede goofy75 Nybegynder
12. marts 2003 - 11:57 Der er 2 kommentarer og
1 løsning

Fjerning af dubletter...

Jeg har en laaaang liste med fax numre hvor flere numre går igen, hvordan kan jeg nemmest fjerne dubletter så der kun er ét nummer af hvert...
Avatar billede sjap Praktikant
12. marts 2003 - 12:09 #1
Dette er taget fra hjælpen (desværre har jeg en englesk version, men det går vel alligevel):

To create a new table
In the Database window, click Tables  under Objects.
Click the name of the table you want to delete duplicate records from.
Click Copy  on the toolbar.
Click Paste  on the toolbar.
In the Paste Table As dialog box, type a name for the copied table, click Structure Only, and then click OK.
Open the new table in Design view, and select the field(s) that contained duplicates in the table you copied.
Click Primary Key  on the toolbar to create a primary key based on the selected fields.
Save and close the table.

To append only unique records to the new table
Create a new query based on the original table containing duplicates.
In query Design view, click the Query Type  on the toolbar, and then click Append Query.
In the Append dialog box, click the name of the new table from the Table Name list, and then click OK.
Include all the fields from the original table by dragging the asterisk (*) to the query design grid.
Click Run  on the toolbar.
Click Yes when you receive the message that you're about to append rows.
Click Yes when you receive the message that Microsoft Access can't append all the records in the append query. This transfers only unique records to your new table and discards the duplicates.
To see the results, open the table by clicking Tables  under Objects in the Database window and clicking Open on the Database window toolbar.
When you're sure the new table has the correct unique records, you can delete the original table, and then rename the new table using the name of the original table.
Avatar billede sjap Praktikant
12. marts 2003 - 12:12 #2
Hvis du vil have det på dansk, så slå op i hjælpen under "Automatisk slette dublerede poster fra en tabel".
Avatar billede goofy75 Nybegynder
14. marts 2003 - 11:27 #3
:D
Avatar billede Ny bruger Nybegynder

Din løsning...

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.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester