agora inbox for pgsql-general@postgresql.org
help / color / mirror / Atom feedFrom: Harald Fuchs <hf@colibri.de>
To: pgsql-general@postgresql.org
Subject: Re: SQL help...
Date: 16 May 2001 13:12:25 +0200
Message-ID: <y297kzh1rae.fsf@dorando.intern.colibri.de> (raw)
References: <1F3774AB3688D4118B1300508BD9641528A7E0@CHINA>
In article <1F3774AB3688D4118B1300508BD9641528A7E0@CHINA>,
Alex Hochberger <alex@feratech.com> writes:
> To any SQL wizards out there,
> I have finally exhausted my SQL knowledge.
> I have 3 tables that I need to do a fancy join on...
> 1 stores the users
> 1 stores the questions
> 1 stores the user's answers to the questions (based on foreign keys to the
> answers table)
> I would like to create a result with the following columns:
> some fields from the users, each of the questions
> in each row should be the results from the users, and their user answers
> Here is the tricky thing, people may have not answered each question, so I
> would like to either leave that blank or put in a 0...
Sounds like a LEFT OUTER JOIN.
view thread (15+ messages) latest in thread
Message-ID: <y297kzh1rae.fsf@dorando.intern.colibri.de>
Permalink: ../y297kzh1rae.fsf@dorando.intern.colibri.de/
Also on: postgresql.org/message-id/y297kzh1rae.fsf@dorando.intern.colibri.de
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-general@postgresql.org
Cc: hf@colibri.de
Subject: Re: SQL help...
In-Reply-To: <y297kzh1rae.fsf@dorando.intern.colibri.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox