473,386 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Multiple occurance of same record

Hi,

I have imported a spreadsheet into an access databsae and have noticed
that there are multiple occurances of exactly the same record. I
would like to know if there is a way of deleting the muliple
occurances of the record and leave it so that there is only one record
of each occurance remaining.

I am aware that there is a feature in the query wizard to delete
multiple occurances but I dont want to delete all occurances - just
ensure that there is only one of each.

e.g

column A Column B
column A Column B
column A Column B

I would like a query that would delete two of the records but leave
one remianing.

Any help would be greatly appreciated,
Chris

May 24 '07 #1
4 1689
Hi Chris,

Here is what you can do - write a query that selects the first row from
each group of duplicate rows and insert those unique records into a new
table. The new table will contain only the unique rows.

Here is the simplest way to get only one row from a group of duplicate
rows:

Select Distinct * From tblx

and here is how to insert those rows into a new table

Select * Into NewTbl From
(Select Distinct * from tblx) t1

You don't have to create NewTbl. The Sql statement will create it
automatically. This is a Make Table query. You can rename tblx to the
name of your actual table. And t1 is an alias for the subquery that is
your table of unique rows that you are going to insert into NewTbl. The
alias (an alias) is required when using a subquery to define a table.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
May 24 '07 #2
I came across similar situation. So try this if it suits in your case.

Delete duplicate records in Excel before importing it in Access. Excel
has a feature called "remove duplicates".

May 25 '07 #3
On 25 May 2007 04:06:34 -0700, Matuag <ma****@gmail.comwrote:
>I came across similar situation. So try this if it suits in your case.

Delete duplicate records in Excel before importing it in Access. Excel
has a feature called "remove duplicates".
Not founf in Excel 98

Chuck
May 25 '07 #4
Not founf in Excel 98

Chuck
Was referring to Office 2007

May 25 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: intl04 | last post by:
Are there any problems with multiple user access to the same Access database on a shared network drive? I have 'shared' chosen for 'default open mode'. As for the record locking properties, I...
4
by: Steve Jorgensen | last post by:
Hi all, This is actually not an issue of mine, but one a friend of mine told me about that I was able to confirm. Let's say you want a highly customizable report, so you want to be able to do...
4
by: David Warner | last post by:
Greetings! In looking into some C coding, I am looking for the C function that will search for multiple occurances of a same character in a string. For Instance: char str = "We the people...
4
by: Jim Heavey | last post by:
I am wanting to find any instance in a string where more then on occurance of a value occurs and replace it with a single occurance of the value. Specifically I want to search a text field and find...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
6
by: ApexData | last post by:
I have 2 tables: Table1 and Table2. Neither one has a primary key because each table will only have 1-record. My form is a SingleForm unbound with tabs (my desire here). Using this form, in...
3
by: RSH | last post by:
Hi, I am having this very bizarre occurance with 4 dropdown lists on my ASP .Net page. Each control has its own unique id. When the user selects a value from each of the dropdownlists it is...
6
by: zuchowra | last post by:
Hi everyone. I need help. I have a combo box in my form that i want to populate multiple text boxes after you select your selection in the combo box. Here is my set up. The Fields that need to be...
7
by: j420exe | last post by:
I would like to return the first occurance of a record. The first occurance is date driven. Searched on message boards and internet and saw a few different ways to tackle this. Is using the ROWNUM =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.