Carl

You old diehard, do you ever do anything other than an inner join?

My Version

SELECT
     p.project_name, s.staff_name, m.staff_name
FROM
     project p JOIN
     staff s ON s.staff_id = s.staff_id JOIN
     staff m ON on m.staff_id = s.staff_id

How else do you express an OUTER?

Neven



----- Original Message -----
From: Carl Reynolds <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Monday, 29 January 2001 18:43
Subject: RE: [DUG]: Join SQL?


> From: Neven MacEwan [mailto:[EMAIL PROTECTED]]
> > also clearer if you use ansi join syntax (which we all should do),
>
> Personally I think that ansi join syntax sucks the big kumera.  All that
> JOIN...ON stuff is such bollocks!  I've never yet encountered an SQL
dialect
> so poorly constructed that it couldn't work out inner joins without such
> syntax, and it's all less readable anyway.  In fact I can hardly make the
> given example readable no matter how I try:
>
> SELECT
>     p.project_name, s.staff_name, m.staff_name
> FROM
>     project p
> JOIN
>     staff s
>         on s.staff_id = s.staff_id
> JOIN
>     staff m
>         on m.staff_id = s.staff_id
>
> was my best effort (11 lines).  Conversely, consider the following four
> lines:
>
> select p.project_name, s.staff_name, m.staff_name
> from project p, staff s, staff m
> where p.staff_id = s.staff_id
>   and m.staff_id = s.staff_id
>
> You might not notice, but it wasn't until I formatted the statement this
way
> and could actually read it that I noticed and fixed the syntax error (left
> as an exercise for the reader, compare the two statements).  ("But strict
> ansi joins are part of our methodology!" I hear you cry.  Well I suggest
you
> read what Joel Spolsky says about your methodology then:
> http://joel.editthispage.com/stories/storyReader$287)
>
> Cheers,
> Carl
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to