Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: impact of running MAX() on a varchar field ?

Re: impact of running MAX() on a varchar field ?

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: Mon, 09 Feb 2004 21:10:46 -0500
Message-ID: <eIWVb.1300$Gx1.606@fe01.usenetserver.com>


Jack wrote:

> Greetings,
>
> I am de-duping some rows (group by custID) and placing MAX() on all
> other fields which are varchar. Does anyone know what the effect of
> doing MAX() on varchar fields is ?

It returns the MAX() text value based on the sort order of the character set.

> Will it randomly select the MAX
> value of any of these
> fields across duplicate cust IDs (mixing fields from different rows),
> or will it randomly select a custID and retain that row's attributes
> with integrity?
> Thanks,
>
> Jack

The MAX() is the value FOR THAT COLUMN. thus yes it will mix fields from different rows. But there is nothing RANDOM about it.

-- 
Ed Prochak
running    http://www.faqs.org/faqs/running-faq/
netiquette http://www.psg.com/emily.html
--
"Two roads diverged in a wood and I
I took the one less travelled by
and that has made all the difference."
robert frost
Received on Mon Feb 09 2004 - 20:10:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US