Thanks for pointing out that the problem is not missing support for
=ANY but the r.h.s. data type. If I understand you correctly, you
suggest to write a stored procedure ARRAY_TO_RESULT_SET which takes an
array and returns a SimpleResultSet and then do:

"SELECT * FROM T WHERE ID = ANY (ARRAY_TO_RESULT_SET(?))"

I'll give that a try.

On Aug 3, 12:31 am, bob mcgee <[email protected]> wrote:
> On Aug 2, 4:44 pm, TerryG <[email protected]> wrote:> If storing the array 
> in a separate table is an option, you could use
> > the syntax [...]
>
> The grammer says H2 DOES support the ANY operator -- 
> see:http://www.h2database.com/html/grammar.html#condition_right_hand_side
>
> Unfortunately, the implementation of the ARRAY type limits its
> usefulness here, and it just behaves like a more flexible form of IN
> (...).
>
> I wish H2 had a way to treat an array as a list of values (without
> converting it to a SimpleResultSet) -- I imagine that something like
> this is in the development pipeline but tricky to implement safely.
> You *can* write a user-defined function that converts an array to a
> SimpleResultSet, of course.  I've been thinking of adding this to my
> utility functions, but it may not perform that well.
>
> Cheers,
> Bob McGee
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to