Re: Trouble with an outer join - Mailing list pgsql-novice

From Martin Foster
Subject Re: Trouble with an outer join
Date
Msg-id 43374397.7070201@ethereal-realms.org
Whole thread Raw
In response to Re: Trouble with an outer join  (<me@alternize.com>)
List pgsql-novice
me@alternize.com wrote:
> this should work just fine:
>
> SELECT
>     t.TagName       AS "TagName",
>     t.TagType       AS "TagType",
>     d.RealmName     AS "RealmName"
>  FROM ethereal.Tag t
>  LEFT OUTER JOIN ethereal.RealmDesign d
>    ON (t.TagName=d.TagName)
>  WHERE t.TagType='template'
>  AND (t.TagName LIKE 'Realm%'
>    OR  t.TagName LIKE 'Offline%')
>  AND (d.RealmName='Horror' or d.RealmName IS NULL)
>  ORDER BY t.TagName;
>
> cheers,
> thomas
>

What's the difference versus yours above and the one I just corrected?
  Anything unexpected that I should expect from mine?

SELECT
     t.TagName       AS "TagName",
     t.TagType       AS "TagType",
     d.RealmName     AS "RealmName"
  FROM ethereal.Tag t
  LEFT OUTER JOIN ethereal.RealmDesign d
    ON (t.TagName=d.TagName AND d.RealmName='Horror')
  WHERE t.TagType='template'
  AND (t.TagName LIKE 'Realm%'
    OR  t.TagName LIKE 'Offline%')
  ORDER BY t.TagName;

    Martin Foster
    martin@ethereal-realms.org


pgsql-novice by date:

Previous
From:
Date:
Subject: Re: Trouble with an outer join
Next
From:
Date:
Subject: Re: Trouble with an outer join