Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / February 2006

Tip: Looking for answers? Try searching our database.

Normalizing data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bagnallc - 13 Feb 2006 16:22 GMT
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

Signature

bagnallc

John Spencer - 14 Feb 2006 13:00 GMT
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.

> Hi,
>
[quoted text clipped - 9 lines]
>
> Chris
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.