Re: Three table query

Поиск
Список
Период
Сортировка
От Frank Bax
Тема Re: Three table query
Дата
Msg-id 3.0.6.32.20011222221937.022e45c0@pop6.sympatico.ca
обсуждение исходный текст
Ответ на Three table query  (Brian <Brrrian@Excite.com>)
Список pgsql-novice
select travh.*, travd.*, op.* from travh, travd, op where travd.travh_id =
travh.travh_id and op.op_id = travd.op_id and travh.travh_id = 'whatever';

At 04:58 PM 12/22/01 -0800, Brian wrote:
>Sorry, first post with no topic.
>
>Given 3 tables:
>---------------
>Table Operations(Op)
>Op_ID, Op_Name,...
>
>and
>
>Table TravelerHEADER(TravH)
>TravH_ID, TravName, Part_ID,...
>
>and
>
>Table TravelerDETAIL(TravD)
>TravD_ID, TravH_ID, Op_ID, TravOrder,...
>
>How can I retrieve the OP RecordSet
>associated with the subset of TravD records
>given a single TravH_ID?
>
>That is to say:
>There are a finite set of travd records that relate to a singular travh
record...
>for each of those travd records I want the related Op record.
>
>Stumped again,
>Brian
>
>
>---------------------------(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 по дате отправления:

Предыдущее
От: Brian
Дата:
Сообщение: Three table query
Следующее
От: "sheila timp"
Дата:
Сообщение: cast int to float