Problem with LEFT JOIN

From: "Thomas Wegner" <tomaten(at)t-online(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Problem with LEFT JOIN
Date: 2004-01-16 09:39:17
Message-ID: bu8bg5$15oo$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christoph Haller 2004-01-16 10:01:08 Re: Email function using c instead of tclu
Previous Message denis 2004-01-16 05:31:13 Re: Initially Deffered - FK