NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

Replies are listed 'Best First'.
•Re: SQL Question: joining on 3 tables?
by merlyn (Sage) on Jun 19, 2002 at 19:51 UTC
(jeffa) Re: SQL Question: joining on 3 tables?
by jeffa (Bishop) on Jun 19, 2002 at 19:58 UTC
    This is not a Perl question, but would something like this help?
    select C.foo from C 
    inner join B on C.id   = B.C_id
    inner join A on B.A_id = A.id
    where A.bar = 'baz'; 
    

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)