public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: Rich Shepard <[email protected]>
To: [email protected]
Subject: Re: Removing duplicate rows in table
Date: Tue, 10 Sep 2024 08:45:21 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
On 9/10/24 08:29, Rich Shepard wrote:
> On Tue, 10 Sep 2024, Adrian Klaver wrote:
>
>> Is there a Primary Key or Unique index on this table?
>
> Adrian,
>
> No. It didn't occur to me to make the project number a PK as this table is
> not related to others in the database.
>
> But, yesterday it occurred to me to make the proj_nbr a PK to eliminate
> future issues.
>
You might want to do something like:
select proj_nbr, count(*) as ct from projects group by proj_nbr;
to see how big a problem it is. If it is only a few projects it could
just a matter of manually deleting the extras.
Whatever you do:
1) Make sure you have a backup of at least that table.
2) Do the data changes as BEGIN; <changes> COMMIT; or ROLLBACK;
> Thanks,
>
> Rich
>
>
--
Adrian Klaver
[email protected]
view thread (16+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Removing duplicate rows in table
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox