Re: Help formulating multi-table SELECT statement

Поиск
Список
Период
Сортировка
От Travis Hoyt
Тема Re: Help formulating multi-table SELECT statement
Дата
Msg-id DBEMKMGOMJAGKAKEPPEGAEAMDBAA.thoyt@npc.net
обсуждение исходный текст
Ответ на Re: Help formulating multi-table SELECT statement  (Phil Mitchell <phil.mitchell@pobox.com>)
Список 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)

Вложения

В списке pgsql-novice по дате отправления:

Предыдущее
От: Phil Mitchell
Дата:
Сообщение: Re: Help formulating multi-table SELECT statement
Следующее
От: "Patrick Hatcher"
Дата:
Сообщение: COPY from on date field problem