Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Comments on Why???
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01BFF895.D7AEBA92
Content-Type: text/plain;
charset="iso-8859-1"
Just to arbitrarily select one row out of the subselect. I'm guilty of this in the past.
But if that's the case the SELECT DISTINCT is not necessary.
-----Original Message-----
From: Christine Turner [mailto:christine.turner_at_ips-sendero.com]
Sent: Friday, July 28, 2000 9:20 AM
To: Multiple recipients of list ORACLE-L
Subject: Comments on Why???
Good Morning All....
Working on something someone else wrote and maybe I'm missing the obvious. But would anyone have any idea as to why someone would use the rowid in this query????
insert into temp_big_gllist (glacct, desct)
select distinct (gl_acct_no), (description)
from gene310 t1 where t1.rowid =
(select min(t2.rowid)
from gene310 t2
where t1.gl_acct_no = t2.gl_acct_no);
I'm having a hard time understanding why someone would do this and of course there are no notes left behind to explain. Anyone else have any ideas????
Thanks In Advance!!
Take Care,
Christine Turner
DBA
IPS SENDERO
Scottsdale, Arizona
-- Author: Christine Turner INET: christine.turner_at_ips-sendero.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). ------_=_NextPart_001_01BFF895.D7AEBA92 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printableReceived on Fri Jul 28 2000 - 08:15:04 CDT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>RE: Comments on Why???</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Just to arbitrarily select one row out of the =
subselect. I'm guilty of this in the past. </FONT>
</P>
<P><FONT SIZE=3D2>But if that's the case the SELECT DISTINCT is not =
necessary.</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Christine Turner [<A =
HREF=3D"mailto:christine.turner_at_ips-sendero.com">mailto:christine.turner= @ips-sendero.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Friday, July 28, 2000 9:20 AM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: Comments on Why???</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Good Morning All....</FONT>
</P>
<P><FONT SIZE=3D2>Working on something someone else wrote and maybe I'm =
missing the obvious.</FONT>
<BR><FONT SIZE=3D2>But would anyone have any idea as to why someone =
would use the rowid in this</FONT>
<BR><FONT SIZE=3D2>query????</FONT>
</P>
<P><FONT SIZE=3D2>insert into temp_big_gllist (glacct, desct)</FONT>
<BR><FONT SIZE=3D2>select distinct (gl_acct_no), (description)</FONT>
<BR><FONT SIZE=3D2>from gene310 t1 where t1.rowid =3D</FONT>
<BR><FONT SIZE=3D2>(select min(t2.rowid)</FONT>
<BR><FONT SIZE=3D2>from gene310 t2</FONT>
<BR><FONT SIZE=3D2>where t1.gl_acct_no =3D t2.gl_acct_no);</FONT>
</P>
<P><FONT SIZE=3D2>I'm having a hard time understanding why someone =
would do this and of course</FONT>
<BR><FONT SIZE=3D2>there are no notes left behind to explain. =
Anyone else have any ideas????</FONT>
</P>
<P><FONT SIZE=3D2>Thanks In Advance!!</FONT>
<BR><FONT SIZE=3D2>Take Care,</FONT>
<BR><FONT SIZE=3D2>Christine Turner</FONT>
<BR><FONT SIZE=3D2>DBA</FONT>
<BR><FONT SIZE=3D2>IPS SENDERO</FONT>
<BR><FONT SIZE=3D2>Scottsdale, Arizona</FONT>
</P>
<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: Christine Turner</FONT>
<BR><FONT SIZE=3D2> INET: christine.turner_at_ips-sendero.com</FONT>
</P>
<P><FONT SIZE=3D2>Fat City Network Services -- (858) =
538-5051 FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>San Diego, =
California -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------= -----</FONT>
<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an =
E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of =
'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB =
ORACLE-L</FONT>
<BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed =
from). You may</FONT>
<BR><FONT SIZE=3D2>also send the HELP command for other information =
![]() |
![]() |