| From: | Frank Bax <fbax(at)sympatico(dot)ca> |
|---|---|
| To: | Brian <Brrrian(at)Excite(dot)com> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: Three table query |
| Date: | 2001-12-23 03:19:37 |
| Message-ID: | 3.0.6.32.20011222221937.022e45c0@pop6.sympatico.ca |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)postgresql(dot)org)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | sheila timp | 2001-12-29 22:26:12 | cast int to float |
| Previous Message | Brian | 2001-12-23 00:58:42 | Three table query |