Problem with LEFT JOIN

Поиск
Список
Период
Сортировка
От Thomas Wegner
Тема Problem with LEFT JOIN
Дата
Msg-id bu8bg5$15oo$1@news.hub.org
обсуждение исходный текст
Ответы Re: Problem with LEFT JOIN
Список 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 по дате отправления:

Предыдущее
От: "Chris Travers"
Дата:
Сообщение: Re: Is it possible in PostgreSQL?
Следующее
От: Colin Fox
Дата:
Сообщение: Left joins with multiple tables