pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <acroyear_07030@yahoo.com>
To: a@deruwe.be
To: pgsql-sql@postgresql.org
Subject: Re: Linking against null-fields.
Date: Tue, 9 Oct 2001 09:31:34 -0700
Message-ID: <006901c150df$e335d690$014ba8c0@myst.com> (raw)
References: <20011009112958.074132178C9@tartarus.telenet-ops.be>

> 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




view thread (3+ messages)

Message-ID: <006901c150df$e335d690$014ba8c0@myst.com>
Permalink:  ../006901c150df$e335d690$014ba8c0@myst.com/
Also on:    postgresql.org/message-id/006901c150df$e335d690$014ba8c0@myst.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: acroyear_07030@yahoo.com, a@deruwe.be
  Subject: Re: Linking against null-fields.
  In-Reply-To: <006901c150df$e335d690$014ba8c0@myst.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox