From: Thomas Wegner <tomaten@t-online.de>
To: pgsql-sql@postgresql.org
Subject: Problem with LEFT JOIN
Date: Fri, 16 Jan 2004 10:39:17 +0100
Message-ID: <bu8bg5$15oo$1@news.hub.org> (raw)
Hello, whats wrong with this SQL?:
SELECT L.*, A."lastname" AS firma_value, T."string_val1" AS type_value
FROM "lists" L, "typecode" T
LEFT JOIN "adressen" A ON A."id_adressen"=L."firma"
WHERE T."id_typecode"=L."lists_type"
ORDER BY L."id_lists"
I get this:
ERROR: relation "l" does not exist
This version work, but i need a LEFT JOIN (L."firma" can have NULL):
SELECT L.*, A."lastname" AS firma_value, T."string_val1" AS type_value
FROM "lists" L, "typecode" T, "adressen" A
WHERE T."id_typecode"=L."lists_type" AND A."id_adressen"=L."firma"
ORDER BY L."id_lists"
------------------------------------------
Thomas Wegner
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: tomaten@t-online.de
Subject: Re: Problem with LEFT JOIN
In-Reply-To: <bu8bg5$15oo$1@news.hub.org>
* 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