473,386 Members | 1,644 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.

how to eliminate the duplicate data which is depend on the text

5
hi there

i have fields name called ..

PAF (text) , PNo (Number ) , LastName (Text)

2006/214/2 , 220101 , Winne
2006/321/3, 521496 , Joe
2006/321/1 , 521496 , Joe
2006/541/4 , 521496 , Joe

I want the record of

2006/241/2 , 220101 , Winne
2006/541/4 , 521496 , Joe.

is anyone can tell me how to eliminate the dublicate record of Joe ...


Thanks !

Sandi
Sep 25 '06 #1
4 1515
sandi
5
hi there

could you tell me how to eliminate the duplicate data in the MS ACCESS

Sandi
Sep 25 '06 #2
PEB
1,418 Expert 1GB
Hi,

So to do that the algorithme is a bit long!

1) Create a column in your table! Name it to_delete and assign it from type Yes/No

2) Create Query with this SQL:
Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCT  PNo , LastName , Count(*) WHERE Count(*)>1;
  2.  
Name it Doubles

3) Create UPDATE Query join your table and the query Doubles by the 2 fields
and set to_delete=yes

4) Create Update Query where to_delete=yes and PNo = dmin("PNo","YOURTable","") Set to_delete to No

5) Finnally create a delete query that deletes all the records where to_delete = yes!

:)

It's long strong and annoying!

isn't it?

:)

Best regards!





hi there

i have fields name called ..

PAF (text) , PNo (Number ) , LastName (Text)

2006/214/2 , 220101 , Winne
2006/321/3, 521496 , Joe
2006/321/1 , 521496 , Joe
2006/541/4 , 521496 , Joe

I want the record of

2006/241/2 , 220101 , Winne
2006/541/4 , 521496 , Joe.

is anyone can tell me how to eliminate the dublicate record of Joe ...


Thanks !

Sandi
Sep 25 '06 #3
sandi
5
Hi there

When i write this code ,

SELECT DISTINCT PNo , LastName , Count(*) WHERE Count(*)>1;

there is an error saying "You tried to execute a quey that does not inclide the specified expression "PNo " as part of an aggregate function"

Thanks

Sandi
Sep 26 '06 #4
PEB
1,418 Expert 1GB
Change it to:

SELECT PNo , LastName , Count(*) GROUP BY PNo , LastName WHERE Count(*)>1 ;
Sep 26 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: gilgantic | last post by:
Is there anyway of eliminating duplicate entries as the database loads data using SQLLDR and/or .ctl (Control File)? I use the following command line using SQLLDR and a control file to load my...
2
by: Francesco Moi | last post by:
Hello. I've got a 'books' table with 'id', 'name', 'author' and 'isbn' fields. Due to an error, my books are duplicated, so I've got (e.g.): 430 - Moby Dick - Herman Melville - 0192833855...
0
by: Luke Airig | last post by:
I am trying to merge two xml files based on common date/time and then write out a tab-delimited xml file with the header record from one of the input files concatenated in front of the merged...
3
by: Tony Young | last post by:
Hi, I have a multimap container. I want to eliminate all "duplicate" elements. By duplicate I mean something like (3, 4), (4, 3) and (4, 3), in which I want to eliminate any two of these...
6
by: Peter | last post by:
Can anyone advise me what is wrong with this code? I want it to tell me if I am entering a duplicate record. However, I always get the "Dupe" error message, whether I have entered a duplicate or...
12
by: Jared Carr | last post by:
First I wish I knew how this was caused but here is our problem. Sometime in the recent past we got a duplicate table. Here is the result of a pg_dump with a pg_restore for just that table. ...
2
by: phillip.s.powell | last post by:
mysql> select id, student_first_name, student_last_name, email, application_date, modification_date, unique_key from student where id in (7268, 862);...
10
by: Backwards | last post by:
Hello all, I'll start by explaining what my app does so not to confuss you when i ask my question. ☺ I have a VB.Net 2.0 app that starts a process (process.start ...) and passes a prameter...
1
by: bhaskar321 | last post by:
Hi all, i am new to access could any one tell me how can i eliminate duplicate records from the query Thanks, Bhaskar
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
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.