Re: ANY subquery and PreparedStatements

Поиск
Список
Период
Сортировка
От Felipe Schnack
Тема Re: ANY subquery and PreparedStatements
Дата
Msg-id 1045670419.24757.63.camel@desenv1.ritterdosreis.br
обсуждение исходный текст
Ответ на Re: ANY subquery and PreparedStatements  (awc <awc@drytel.net>)
Список pgsql-jdbc
  I Guess you don't understand my problem.. my problem is that I would
like to use preparedstatements with this query, but I would like to set
a list of values for the any parameter... In other words I would like to
execute, in the end a query like that:
  select * from <table> where <field> any (1,2,3)
  But I don't think I can do that using prep. statements... am i wrong?

On Wed, 2003-02-19 at 11:56, awc wrote:
> how about
>
> public String setCommand(String table,String filedName1)
> {
>     StringBuffer sb = new StringBuffer("Select * from table ");
>     sb.append(table);
>     sb.append(" where ");
>     sb.append(filedName1);
>     sb.append(" any (?)");
>     return sb.toSting();
> }
>
> Felipe Schnack wrote:
>
> >   I'm afraid it kind of impossible to use PreparedStatements with the
> > "ANY" subquery keyword... For example, if I take this query and prepare
> > it:
> >   "select * from <table> where <field> any (?)"
> >   How can I set my parameter as a list of values, so my query searches
> > for for different values of the specified field?
> >
> > --
> >
> > Felipe Schnack
> > Analista de Sistemas
> > felipes@ritterdosreis.br
> > Cel.: (51)91287530
> > Linux Counter #281893
> >
> > Centro Universitário Ritter dos Reis
> > http://www.ritterdosreis.br
> > ritter@ritterdosreis.br
> > Fone/Fax.: (51)32303341
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
>
--

Felipe Schnack
Analista de Sistemas
felipes@ritterdosreis.br
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
ritter@ritterdosreis.br
Fone/Fax.: (51)32303341


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

Предыдущее
От: Felipe Schnack
Дата:
Сообщение: Re: ANY subquery and PreparedStatements
Следующее
От: Felipe Schnack
Дата:
Сообщение: Re: ANY subquery and PreparedStatements