JOINs in FROM...

Поиск
Список
Период
Сортировка
От ericnielsen@pop.ne.mediaone.net
Тема JOINs in FROM...
Дата
Msg-id RELAY2at4b6EyhOwlVZ00000ecb@relay2.softcomca.com
обсуждение исходный текст
Список pgsql-novice
I've been trying to use the JOIN syntax in the FROM clause instead of burying all the joins in the WHERE.  (Does
postgresactually support outer joins now? the user manual seems to imply it does, which version do I need as a
minimum?) The resulting query is much simpler than my old UNION SELECT 
cascade, but I must have done something wrong because I get a parse error.

Here's the query and the error.(formatted for monotype)
SELECT ldr.peopleid, ldr.firstname, ldr.lastname, ldr.name,
       flw.peopleid, flw.firstname, flw.lastname, flw.name
       FROM (people LEFT JOIN organizatios ON organization=orgid) AS ldr,
            (poeple LEFT JOIN organizatios ON organization=orgid) AS flw,
            couples
       WHERE ldr.peopleid=leader and flw.peopleid=follower
       ORDER BY ldr.lastname, ldr.firstname, flw.lastname, flw.firstname;
Warning: PostgreSQL query failed: ERROR: parser: parse error at or near ","

1) What is the problem with my query?
2) Is there any good way to move the last two joins into the FROM?

Thanks
Eric



--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


В списке pgsql-novice по дате отправления:

Предыдущее
От: ksprague@NRCan.gc.ca
Дата:
Сообщение: populating postgresql from tab-delimited text file
Следующее
От: Adam bultman
Дата:
Сообщение: Greetings.