Re: What is *wrong* with this query???

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: What is *wrong* with this query???
Дата
Msg-id 004701cc9bec$b55a4180$200ec480$@yahoo.com
обсуждение исходный текст
Ответ на What is *wrong* with this query???  (Steve Murphy <smurphy@intorrent.com>)
Список pgsql-general

See embedded note after “as bld”

 

Dave

 

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Steve Murphy
Sent: Saturday, November 05, 2011 12:51 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] What is *wrong* with this query???

 

 

I give! I'm flummoxed!

 

select schedule.id as sched_id, bld.id as bid

    from

        schedule

        left join company on schedule.company = company.id

        left join (select * from building where building.company = company.id order by id limit 1)  as bld  ****** <-- LEFT JOIN  “ON WHAT?”

    where

        schedule.status = 'active' and company.status = 'active' and bld.status = 'active';

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: What is *wrong* with this query???
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: What is *wrong* with this query???