|
The best method I've found for a position-to with SQL is to use the scrollable cursor that some other posters have described, however, using the COUNT(*) function to find where to position the scrolling cursor. See example: DECLARE CURS1 DYNAMIC SCROLL CURSOR FOR SELECT IPROD, IDESC FROM IIM ORDER BY IPROD OPEN CURS1 SELECT COUNT(1) INTO :POS FROM IIML01 WHERE IPROD<XPOS REC=POS-1 FETCH FIRST FROM CURS1 FETCH RELATIVE :REC FROM CURS1 INTO :hostvar
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.