|
First answer, can't be done. When you say "where FIRSTNAME like 'Dan%', the cursor begins at 'Dan', you can't got backwards past the beginning. Second answer, you could fake this by tracking the first page. When you do a page up and you're on the first page, you close the current cursor and open one that uses something like: where FIRSTNAME <= DAN order by FIRSTNAME desc It's easier to consider SUBSET TO: instead of POSITION TO: HTH, Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121 > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Dan > Sent: Friday, July 29, 2005 2:40 PM > To: RPG400-L@xxxxxxxxxxxx > Subject: SQL Position-To with scroll-backwards capability > > > Searched the archives, but didn't find an answer... The question: > > How does one effect a "Position-To" in SQL? SQL is required for this > effort (I think) because the user will get to specify on the fly the > values for which they are searching (for example, FIRSTNAME like > 'Dan%'). Now, there might be 10,000 records that meet this criteria, > and the user wants the ability to position to 'Dann' BUT STILL HAVE > THE ABILITY TO PAGE UP (scroll backwards). BTW FWIW, FIRSTNAME in > this example is a primary key field in an existing logical. > > The requirement for dynamic wildcard searches indicates the > need for using SQL. > > TIA, > Dan > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
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.