How to create SQL IN filter using XQuery FLWOR
868034Nov 8 2011 — edited Nov 9 2011Is it possible to create such FLWOR expression that will be pushed down to SQL using "SQL IN" filtering?
Assuming following function declaration:
declare function tns:filterOnLevels($levels as xs:double+) { ...
I'd like to create FLWOR expression that will be pushed down to such SQL:
select * from LEVELS where level IN ($levels)
And executing tns:filterOnLevels(1,2,3) should execute statement with "where level IN (1,2,3)". SQL IN-like filtering have to be pushed down to SQL because executing unconstrained query could result with too many records.
Is such expression possible to do in XQuery/XQSE or maybe other fn-bea extensions?
I'm working on ODSI/Workshop 10.3 and Oracle 10g.