Re: stupid go_record question

From: Andrew Velichko <andrew_velichko_at_yahoo.com>
Date: Tue, 23 Jan 2001 18:13:36 -0500
Message-ID: <jeob6.122790$Z2.1508565_at_nnrp1.uunet.ca>


Hi Lesley!

If you know that your record is in the set that is returned by default "WHERE clause" and you don't want to change it dynamically and requery the block then you can write a procedure like: begin
first_record;
loop
--check conditions and if record is satisfied them then exit ...
if :system.last_record = 'TRUE' then

    exit;
else

    next_record;
end if;
end loop;

But this has its disadvantages. If your block is built against a very large table and record that you need is in the end of your query (let's say because of ORDERY clause) then this procedure will run for a long time. And may be noticed that in DEFAULT menu in Record there is no Last Record item because of such danger.

To use go_record procedure you will have to know record's number that can be obtained from :system.cursor_record or :system.trigger_record and for this you have to stand on your record already.

Andrew Velichko
Brainbench MVP for Oracle Developer 2000 http://www.brainbench.com


"Lesley Boughner" <lesley_at_vimich.com> wrote in message news:94kpu702d0k_at_enews1.newsguy.com...
> Hi.
> I just want to navigate to a specific record without changing the
> default_where of the block.
> Can I do this with go_record?
> Can I find the record number of a record without actually having my cursor
> on it? (eg. system.trigger_record or system.cursor_record).
>
> Is there a better way? What am I missing?
>
> Thanks.
> Lesley
>
>
Received on Wed Jan 24 2001 - 00:13:36 CET

Original text of this message