RE: [HACKERS] Should the following work...?

Поиск
Список
Период
Сортировка
От The Hermit Hacker
Тема RE: [HACKERS] Should the following work...?
Дата
Msg-id Pine.BSF.4.05.9903301425400.55565-100000@thelab.hub.org
обсуждение исходный текст
Ответ на RE: [HACKERS] Should the following work...?  ("Jackson, DeJuan" <djackson@cpsgroup.com>)
Ответы RE: [HACKERS] Should the following work...?  (The Hermit Hacker <scrappy@hub.org>)
Список pgsql-hackers
Using:

select id from clientswhere id = ( select id               from clients              group by id              having
count(id)= 1 ) ;
 


I get:

ERROR:  rewrite: aggregate column of view must be at rigth side in qual



On Tue, 30 Mar 1999, Jackson, DeJuan wrote:

> > select id 
> >   from clients 
> >  where id = ( select id 
> >                 from clients 
> >                where count(id) = 1 ) ;
> > The error I get is that you can't do the AGGREGATE int he 
> > WHERE clause,
> > but this is with a pre-v6.5 server too...technically, should 
> > the above be
> > possible?
> I believe instead of WHERE that should be a HAVING clause.
> But I'm not sure PostgreSQL can handle a HAVING in a sub-select.
> 
>     -DEJ
> 

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 



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

Предыдущее
От: Andrew Merrill
Дата:
Сообщение: Re: [SQL] indexing a datetime by date
Следующее
От: Clark Evans
Дата:
Сообщение: Re: [HACKERS] Should the following work...?