Re: Help formulating multi-table SELECT statement - Mailing list pgsql-novice

From Travis Hoyt
Subject Re: Help formulating multi-table SELECT statement
Date
Msg-id DBEMKMGOMJAGKAKEPPEGAEAMDBAA.thoyt@npc.net
Whole thread Raw
In response to Re: Help formulating multi-table SELECT statement  (Phil Mitchell <phil.mitchell@pobox.com>)
List pgsql-novice
What values in your tables are unique?  Are there many keyID's for the
same key or the reverse?  And the same question for the keys_sigs table.
Can you give an example of your data?  I would guess that the two inner
selects should not return multiple rows.  Maybe I'm not getting the
picture.

-----Original Message-----
From: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Phil Mitchell
Sent: Tuesday, February 26, 2002 3:39 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Help formulating multi-table SELECT statement


At 02:53 PM 2/26/02, you wrote:
>Hey Phil,
>
>Not sure if this will work..don't have any tables like that to test this
>on but try this:
>
>SELECT sig FROM sigs WHERE sigID=(SELECT sigID FROM keys_sigs WHERE
>keyID=(SELECT keyID FROM keys WHERE key = X));

Travis, I had tried nesting the selects like that, but postgres apparently
complains when subselects return multiple values.


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Attachment

pgsql-novice by date:

Previous
From: Phil Mitchell
Date:
Subject: Re: Help formulating multi-table SELECT statement
Next
From: "Patrick Hatcher"
Date:
Subject: COPY from on date field problem