Re: rowid value

From: Howard Latham <howard.latham_at_gmail.com>
Date: Tue, 5 Aug 2014 16:48:47 +0100
Message-ID: <CAPCNhx0_oMgtkC9Jy7G3vBdEyGf-sDJotsR8taSXcfHdejw0Cg_at_mail.gmail.com>



I'd vote for the b one too.

On 5 August 2014 16:24, Ruel, Chris <Chris.Ruel_at_lfg.com> wrote:

> If I could assume you have access and the necessary predicates to
> identify the duplicate rows, you can just select out the ROWIDs and use the
> order by clause:
>
>
>
> select rowid, department_name
>
> from departments
>
> order by rowid;
>
>
>
> If you do not have the knowledge to design a predicate to identify the
> duplicate rows and you are only concerned with the two in your post, you
> could do something like this:
>
>
>
> with rowids as (
>
> select 'AAAocvACXAAAPFJAAa' from dual
>
> union
>
> select 'AAAocvACXAAAPFJAAb' from dual)
>
> select *
>
> from rowids
>
> order by 1;
>
>
>
> In the above example, I would say then the last rowid returned is the
> higher one. I believe that is simply based on ascii sorting as you can see
> the last characters are a and b with b returning as the"higher" one.
>
>
>
> Chris..
>
>
>
>
>
>
>
> Chris Ruel * Oracle Database Administrator
>
> cruel_at_lfg.com * Desk:317.759.2172 * Cell 317.523.8482
>
>
>
> *From:* oracle-l-bounce_at_freelists.org [mailto:
> oracle-l-bounce_at_freelists.org] *On Behalf Of *Zelli, Brian
> *Sent:* Tuesday, August 05, 2014 11:07 AM
> *To:* oracle-l (oracle-l_at_freelists.org)
> *Subject:* rowid value
>
>
>
> Another dba I'm covering for told me to delete a duplicate with the higher
> rowid?
>
> Which one is the higher rowid? AAAocvACXAAAPFJAAa or AAAocvACXAAAPFJAAb?
>
>
>
>
>
> Brian
>
>
>
>
>
>
> This email message may contain legally privileged and/or confidential
> information. If you are not the intended recipient(s), or the employee or
> agent responsible for the delivery of this message to the intended
> recipient(s), you are hereby notified that any disclosure, copying,
> distribution, or use of this email message is prohibited. If you have
> received this message in error, please notify the sender immediately by
> e-mail and delete this email message from your computer. Thank you.
>
> Notice of Confidentiality: **This E-mail and any of its attachments may
> contain
> Lincoln National Corporation proprietary information, which is privileged,
> confidential,
> or subject to copyright belonging to the Lincoln National Corporation
> family of
> companies. This E-mail is intended solely for the use of the individual or
> entity to
> which it is addressed. If you are not the intended recipient of this
> E-mail, you are
> hereby notified that any dissemination, distribution, copying, or action
> taken in
> relation to the contents of and attachments to this E-mail is strictly
> prohibited
> and may be unlawful. If you have received this E-mail in error, please
> notify the
> sender immediately and permanently delete the original and any copy of
> this E-mail
> and any printout. Thank You.**
>

-- 
Howard A. Latham

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Aug 05 2014 - 17:48:47 CEST

Original text of this message