|
You're correct to want to eliminate the cursor in this case. SELECT
HSACTION INTO :myHsAction FROM ... WHERE ... ORDER BY ... FETCH FIRST
ROW ONLY will perform slightly better and is simpler to code and
maintain. Another possible approach is to use a subselect that gets a MAX
Finally, you use an RRN in the ORDER BY. Is there absolutely no other
way to get the right order? Like another table column to serve as a
secondary order-by column. RRN is not keyed internally so I recommend
avoiding it when possible.
Hth, Elvis
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.