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
4 1528
hi there
could you tell me how to eliminate the duplicate data in the MS ACCESS
Sandi
PEB 1,418
Recognized Expert Top Contributor
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: -
SELECT DISTINCT PNo , LastName , Count(*) WHERE Count(*)>1;
-
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","YOU RTable","") 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
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
PEB 1,418
Recognized Expert Top Contributor
Change it to:
SELECT PNo , LastName , Count(*) GROUP BY PNo , LastName WHERE Count(*)>1 ;
Sign in to post your reply or Sign up for a free account.
Similar topics |
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
data, but the sample.dat file has duplicate information. I would like to be
able to eliminate this, since I have know ability to manipulate the sample.dat.
${ORACLE_HOME}/bin/sqlldr $USERPW /home/sample/sample.ctl
############# sample.ctl...
|
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
430 - Moby Dick - Herman Melville - 0192833855
528 - A Tale of Two Cities - Charles Dickens - 0141439602
528 - A Tale of Two Cities - Charles Dickens - 0141439602
|
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 detail records in
the output file. The version I have is close to what I need except it
concatenates two sets of header records in front of each merged detail
record and the first two lines in the file and the last line is blank.
Can someone please...
|
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 three. The most
straightforward way I can think of is to first swap every member such
that every member has its key smaller than its value. Then loop thru
the multipmap and erase duplicates (please see the loop below). Is
there a more automatic way...
|
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 not.
The field REGISTRATION1 is in the form and
Registration is the Control Source in the table
(Can't remember why I named the two fields differently, but there was a
reason at the time)
thanks
Peter
| |
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.
--
-- TOC entry 59 (OID 11462032)
-- Name: order_to_do; Type: TABLE; Schema: public; Owner: www
-- Data Pos: 0
--
|
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);
+------+--------------------+-------------------+----------------------------+---------------------+---------------------+------------------+
| id | student_first_name | student_last_name | email
| application_date | modification_date | unique_key |...
|
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 through from a combo box. The combo box items are
made up of IP address and computer host name. Anything a user places in
this combo box it writes this to a txt file called history.txt
|
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
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |