Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 2A77E9FBDDF for ; Wed, 18 Jul 2007 13:05:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 00951-05 for ; Wed, 18 Jul 2007 13:05:51 -0300 (ADT) X-Greylist: delayed 00:22:53.788366 by SQLgrey-1.7.5 Received: from mail.asci-systemhaus.de (port-83-236-232-74.static.qsc.de [83.236.232.74]) by postgresql.org (Postfix) with ESMTP id 94A169FB537 for ; Wed, 18 Jul 2007 13:05:51 -0300 (ADT) Received: from mail.asci-systemhaus.de (localhost [127.0.0.1]) by mail.asci-systemhaus.de (Postfix) with ESMTP id 1A35D29841 for ; Wed, 18 Jul 2007 17:42:55 +0200 (CEST) Received: from [192.168.200.83] (unknown [192.168.201.253]) by mail.asci-systemhaus.de (Postfix) with ESMTP id E5A6529840 for ; Wed, 18 Jul 2007 17:42:54 +0200 (CEST) Message-ID: <469E34E6.3010002@asci-systemhaus.de> Date: Wed, 18 Jul 2007 17:42:30 +0200 From: =?ISO-8859-15?Q?Ingmar_L=F6tzsch?= User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: IN clause with PreparedStatement X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.101 tagged_above=0 required=5 tests=BAYES_50=0.001, RDNS_DYNAMIC=0.1 X-Spam-Level: X-Archive-Number: 200707/81 X-Sequence-Number: 17255 Hello, I want to submit a query like 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? Thank you, Ingmar