Hi Anil,

This might be PreparedStatement restriction.
In that case you need to generate query by hand.
Look at the stackoverflow[1].

[1]:
http://stackoverflow.com/questions/3107044/preparedstatement-with-list-of-parameters-in-a-in-clause

On Sat, Oct 29, 2016 at 4:44 PM, Anil <[email protected]> wrote:

> second try.
>
> On 28 October 2016 at 15:24, Anil <[email protected]> wrote:
>
>> Any inputs please ?
>>
>> On 28 October 2016 at 09:27, Anil <[email protected]> wrote:
>>
>>> Hi Val,
>>>
>>> the below one is multiple IN queries with AND but not OR. correct ?
>>>
>>> SqlQuery with join table worked for IN Query and the following prepared
>>> statement is not working.
>>>
>>> List<String> inParameter = new ArrayList<>();
>>> inParameter.add("8446ddce-5b40-11e6-85f9-005056a90879");
>>> inParameter.add("f5822409-5b40-11e6-ae7c-005056a91276");
>>> inParameter.add("9f445a19-5b40-11e6-ab1a-005056a95c7a");
>>> inParameter.add("fd12c96f-5b40-11e6-83f6-005056a947e8");
>>> PreparedStatement statement = conn.prepareStatement("SELECT  p.name
>>> FROM Person p join table(joinId VARCHAR(25) = ?) k on p.id = k.joinId");
>>> statement.setObject(1, inParameter.toArray());
>>> ResultSet rs = statement.executeQuery();
>>>
>>> Thanks for your help.
>>>
>>
>>
>


-- 
Vladislav Pyatkov

Reply via email to