Re: Linking against null-fields.

From: "Stephan Szabo" <acroyear_07030(at)yahoo(dot)com>
To: <a(at)deruwe(dot)be>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Linking against null-fields.
Date: 2001-10-09 16:31:34
Message-ID: 006901c150df$e335d690$014ba8c0@myst.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> SELECT f.ID, d.NAME FROM FILE f, DRIVER d WHERE (d.ID = f.DRIVER);
>
> However, the only reason I have this query set up as this is to get the
name
> of the driver easily, if one is set.
>
> How can this be helped? Should I just get the driver ID as a field, and
then
> do a second query on that?

I think this might work:
select f.ID, d.NAME from FILE f LEFT OUTER JOIN DRIVER d ON
(d.ID=f.DRIVER);

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-10-09 21:33:11 Re: Loading current_user and current_timestamp using COPY
Previous Message Janning Vygen 2001-10-09 15:55:56 Re: Problem with n to n relation