If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Normalizing data
Hi,
Say you have a field (lets call it Name) within a table - this Name field contains 100,000 entries which broken down is 5000 different names which are repeated several times. To create a new table with a Name ID field and just list the 5000 without having to keep deleting the duplicates but making sure you have them all, how do you go about this? Thanks Chris |
#2
|
|||
|
|||
Normalizing data
Assumptions:
You have built the new table and defined the fields. The Name field has a unique index on it. The ID field is an autonumber field Use a query like this to append the records to the table. INSERT INTO NewTable(UniqueNameField) SELECT DISTINCT NameField FROM TheOldTable WHERE NameField Is Not Null If you are using the query grid, then build the query with just the fields you want to transfer, set the query's Unique VALUES property to Yes and then select Query: Append Query from the menu. You'll be prompted for the name of the table you want to add records to and an Append To: row will appear for you to specify the destination fields. "bagnallc" wrote in message ... Hi, Say you have a field (lets call it Name) within a table - this Name field contains 100,000 entries which broken down is 5000 different names which are repeated several times. To create a new table with a Name ID field and just list the 5000 without having to keep deleting the duplicates but making sure you have them all, how do you go about this? Thanks Chris -- bagnallc |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Query does not order the same data in the same way | Milković Aleksandar | Running & Setting Up Queries | 10 | December 15th, 2005 12:01 PM |
Excel Macro to Copy & Paste | [email protected] | Worksheet Functions | 0 | December 1st, 2005 01:56 PM |
Help PLEASE! Not sure what answer is: Match? Index? Other? | baz | Worksheet Functions | 7 | September 3rd, 2005 03:47 PM |
Unable to have multiple queries feeding a single report | PZ Straube | Setting Up & Running Reports | 15 | June 15th, 2005 08:16 AM |
How to create graphs in a monthly report where the base data can change | John Clarke | Charts and Charting | 3 | June 25th, 2004 02:22 AM |