| From: | awc <awc(at)drytel(dot)net> |
|---|---|
| To: | Felipe Schnack <felipes(at)ritterdosreis(dot)br>, pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: ANY subquery and PreparedStatements |
| Date: | 2003-02-19 14:56:24 |
| Message-ID: | 3E539B18.6540683A@drytel.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
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(at)ritterdosreis(dot)br
> Cel.: (51)91287530
> Linux Counter #281893
>
> Centro Universitário Ritter dos Reis
> http://www.ritterdosreis.br
> ritter(at)ritterdosreis(dot)br
> Fone/Fax.: (51)32303341
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jason S. Friedman | 2003-02-19 14:57:21 | Re: ANY subquery and PreparedStatements |
| Previous Message | Nick Fankhauser | 2003-02-19 14:40:22 | Re: pg73jdbc3.jar ClassNotFoundException |