Problem with LEFT JOIN - Mailing list pgsql-sql

From Thomas Wegner
Subject Problem with LEFT JOIN
Date
Msg-id bu8bg5$15oo$1@news.hub.org
Whole thread Raw
Responses Re: Problem with LEFT JOIN
List 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




pgsql-sql by date:

Previous
From: "Chris Travers"
Date:
Subject: Re: Is it possible in PostgreSQL?
Next
From: Colin Fox
Date:
Subject: Left joins with multiple tables