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

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: "'Steve Murphy'" <smurphy(at)intorrent(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: What is *wrong* with this query???
Date: 2011-11-05 18:57:03
Message-ID: 004701cc9bec$b55a4180$200ec480$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

See embedded note after “as bld”

Dave

From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Steve Murphy
Sent: Saturday, November 05, 2011 12:51 AM
To: pgsql-general(at)postgresql(dot)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';

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2011-11-05 19:13:38 Re: What is *wrong* with this query???
Previous Message Scott Marlowe 2011-11-05 18:55:02 Re: What is *wrong* with this query???