Re: IN clause with PreparedStatement - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: IN clause with PreparedStatement
Date
Msg-id Pine.BSO.4.64.0707181708370.14666@leary.csoft.net
Whole thread Raw
In response to IN clause with PreparedStatement  (Ingmar Lötzsch <iloetzsch@asci-systemhaus.de>)
Responses Re: IN clause with PreparedStatement  (Ingmar Lötzsch <iloetzsch@asci-systemhaus.de>)
List pgsql-jdbc

On Wed, 18 Jul 2007, Ingmar Lötzsch wrote:

> SELECT *
> FROM table1
> WHERE id IN (1, 2, 3);
>
> whereas the list 1, 2, 3 must be created dynamically. The goal is to
> avoid n queries for single objects instead of one query. I can
> concatenate the statement and use Statement. But I can't figure out, how
> to use PreperedStatement. Can you help me?
>

This identical thread concluded with a perl example that is relevant.

http://archives.postgresql.org/pgsql-jdbc/2007-06/msg00015.php

Kris Jurka

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: jdbc supports struct?
Next
From: "roman"
Date:
Subject: Using bytea with ResultSet.getBytes("..."). Problem. Help!!