Loic, thanks for answer. My situation is that: I use on production Oracle
database. Now, I'm trying to use H2 in integration tests. In application on
production I use exacly this query: SELECT * FROM TABLE(GET_NUMBERS()) and
its not good idea to change it. So I'am asking, is there any way to handle
exacly this query in H2? Your sugestions are ok but they will work only in
H2 and this is not solution for my problem.
LD
27-04-2012 17:24, "Loic Petit" <loic.pe...@gmail.com> napisał(a):

> Hi,
>
> You could do the following prepared statement :
> SELECT * FROM TABLE(ID NUMBER=?)
> then you can set the parameter with a setObject(1,new Object[]
> {1,2,3,4,5,6,7,8,9,10})
>
> If you really want to do an external java function (though I do not
> understand why), I suppose you could write
> SELECT * FROM TABLE(ID NUMBER=GET_NUMBERS())
> ...and the function must return an array. But I'm not sure if it is
> possible to do that.
>
> LP
>
>
> 2012/4/27 Łukasz Drumiński <drumin...@gmail.com>
>
>> Hello,
>>
>> this is working fine:
>>
>> SELECT * FROM TABLE(ID NUMBER=(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
>>
>> but I need to do something like this:
>>
>> SELECT * FROM TABLE(GET_NUMBERS())
>>
>> is this posible?
>>
>> I could create alias GET_NUMBERS for some Java method but I don't know
>> how this method should look. I will be grateful for any help.
>>
>> Regards,
>> Lukas
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "H2 Database" group.
>> To post to this group, send email to h2-database@googlegroups.com.
>> To unsubscribe from this group, send email to
>> h2-database+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/h2-database?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To post to this group, send email to h2-database@googlegroups.com.
> To unsubscribe from this group, send email to
> h2-database+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to