× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 12/15/2016 04:56:23
PM:
My advice...

Don't do it. SQL doesn't really support "Position To", instead it's
more
"Search/Subset By"


Really? What about the following?

where db_column >= :search

Lot's of posts over the years detailing the hoops needed in SQL to do
a
position to (and provide the exact functionality you have now). Not
really
worth the effort IMO.


I don't see any hoops in doing the example above. The only challenge is
if
there's nothing that matches and you want to display the previous record

as well as those that are greater than the search criteria.

Not a problem if you're willing to use a scrollable cursor. In
this case, if the first fetch does not have a key equal to the position-to
value, then you just have to reposition the cursor to -1 relative to the
row fetched. That enables you to fetch the row previous to the first
non-matching key.

Sincerely,

Dave Clark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.