Arbitrary amount of BETWEENs
Date: Mon, 28 Apr 2008 16:01:55 -0700 (PDT)
I have an index organized table on which i'll be carrying out a select of the following type...
select value from table
where key between 1 and 4 or key between 9 and 11 ....... or key between 100 and 201
The current issue is, that the amount of range selects is arbitrary and in worst case this query could end up awfully long. All that comes to my mind right now is gluing a string up dynamically in pl/sql and executing it... However.. Makes my stomach turn over big time as I'm guessing this involves serious parsing and processing overhead eliminating the win-win on doing range selects on an index organized table...
I'd appreciate if anyone could point me in the direction of a cleaner approach which i might have overlooked :)
Regards :) Received on Mon Apr 28 2008 - 18:01:55 CDT