Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Any One have any insight?????
Hi,
Looks like, the developer is trying to select the first row that was inserted in usrtblname for a given gl_acct_no and then use such rows to populate temp_big_gllist table.
This approach is not right as rowid consists of the physical location where the row is stored in the datafile. Oracle assigns the rowid based on the free space availability in the disks. It is not right to assume that the ROWIDs will always be in increasing order...So, the min(rowid) usage is not the right way...
Hope this helps..
Regards
Rajagopal Venkataramany
address which as u know is composed of the datafile no,
On Thu, 05 Oct 2000 07:26:44 -0800, ORACLE-L_at_fatcity.com wrote:
> Good Morning All.....
>
> Listed below is a block of code from a pl\sql procedure that I'm not sure
> what the developer was trying to accomplish. I know this is easy, but
it's
> one of those "looked at it too long to see the answer" situations.
Anyone
> have any ideas as to why the developer was using rowid in this insert
> statement????
>
> insert into temp_big_gllist (glacct, desct)
> select distinct (gl_acct_no), (description) from usrtblname
> t1 where t1.rowid = (select min(t2.rowid) from v_usrtblname
> t2 where t1.gl_acct_no = t2.gl_acct_no);
>
>
> Any comments are appreciated!!!!!
> Thanks,
> Christine Turner
> DBA
> IPS Sendero
> Scottsdale, Arizona
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> 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).
Regards
Rajagopal Venkataramany
![]() |
![]() |