in(...) clause and PreparedStatement

Поиск
Список
Период
Сортировка
От Sergey Pariev
Тема in(...) clause and PreparedStatement
Дата
Msg-id 42AD8567.10004@tnet.dp.ua
обсуждение исходный текст
Ответы timestamp & graph time scale  (santosh dwivedi <mwanaag@yahoo.com>)
Re: in(...) clause and PreparedStatement  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
Hi all.
    It may be stupid question, but is there way to use PreparedStatement
with queries like
SELECT * FROM mytable WHERE t_id IN (1,2,3) ?
    I've googled but haven't found nothing explicitly said on this topic.
    I've tried the following
    PreparedStatement st = conn.prepareStatement("SELECT * FROM mytable
WHERE t_id IN ( ? )");
    st.setObject(1,"1,2,3");

    and get error complaining on type mismatch.

    Thanks in advance, Sergey.

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Giuseppe Sacco
Дата:
Сообщение: Re: New italian translation
Следующее
От: Carl Olivier
Дата:
Сообщение: Re: DatabaseMetaData and Transactions