Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Finding "surrounding" rows of a matching field?
Database experts,
I have a table with >50.000 rows and a VARCHAR2(50) column where I want to search for a pattern (maybe right-truncated). Besides getting a matching row (if there is any), I want to get 20 rows alphabetically before and after the matching row. Same if no row matches.
Since rows are not "sorted" I wonder if there is some way to use an index on that column for that purpose. Am I overlooking something? If this is not possible, will the ConText cartridge be able to solve my problem?
Thanks in advance for any help.
Herwig
-- ECCE TERRAM GmbH Herwig Henseler Heinrichstrasse 18d Tel. 0441 / 500 12-0 26131 Oldenburg Fax. 0441 / 500 12-29Received on Tue Oct 21 1997 - 00:00:00 CDT