| From: | Michael Fuhr <mike(at)fuhr(dot)org> |
|---|---|
| To: | Steven Adams <swadams3(at)comcast(dot)net> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #2553: Outer join bug |
| Date: | 2006-07-28 15:52:31 |
| Message-ID: | 20060728155231.GA95933@winnie.fuhr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
[Please copy the mailing list on replies so others can participate
in and learn from the discussion.]
On Fri, Jul 28, 2006 at 09:54:42AM -0500, Steven Adams wrote:
> I wanted the row to show whether or not there was a matching row in the
> other table, but I wanted to return exactly 1 row.
As Tom Lane already pointed out, you're probably needing a WHERE
clause. Does this do what you want?
SELECT ia.name, iac.internal
FROM information_assets AS ia
LEFT OUTER JOIN information_asset_categories AS iac ON ia.category_id = iac.id
WHERE ia.id = 21;
--
Michael Fuhr
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jonas Bruhn | 2006-07-28 23:54:23 | BUG #2555: runtime error 80040e21 |
| Previous Message | Richard Huxton | 2006-07-28 13:34:40 | Re: Query returned unhandled type 16411 |