From: | "Josh Berkus" <josh(at)agliodbs(dot)com> |
---|---|
To: | Leandro Fanzone <leandro(at)hasar(dot)com>, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Multiple IN |
Date: | 2001-12-11 16:45:59 |
Message-ID: | web-525488@davinci.ethosmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Leandro,
> Maybe this is a silly question. I have a table t with two fields f1
> and
> f2. Those fields together form the primary key. I want to select a
> list
> of pairs from that table. The simplest SQL clause would be
>
> SELECT * FROM t WHERE (f1 = v1 AND f2 = v2) OR (f1 = v3 AND f2 = v4)
> ...;
We'll need database schema (table designs) if you want us to help you.
The above isn't enough information to go on. For example, where did
"v1" come from? Is this a field? An interface language variable?
Please be explicit! Also, consider picking up Joe Celko's SQL for
Smarties, reviewed at http://techdocs.postgresql.org/bookreviews.php
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Luis Amigo | 2001-12-11 17:03:31 | trouble with query |
Previous Message | Josh Berkus | 2001-12-11 16:37:17 | Re: Storing number '001' ? |