HAVING confusion..

From: "George Henry C(dot) Daswani" <gdaswani(at)Vorlon(dot)odc(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: HAVING confusion..
Date: 1999-02-21 22:33:09
Message-ID: Pine.LNX.4.04.9902211428480.16742-100000@Vorlon.odc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

I'm using postgresql 6.4.2 and i'm having a problem with the
"HAVING" clause..

Basically I do

SELECT u_id,expire_date FROM users HAVING expire_date >= (NOW())

expire_date is of timestamp data type.

and it keeps failing with
ERROR: This is not a valid having query!

even doing something simple like
SELECT u_id from users having u_id > 5

fails with the same error..

select sell_by_date,item_num FROM sell,users,i
tem WHERE sold_by = u_id AND sell_item = item_num AND category_id =
'$parameter'
ORDER BY register_date DESC HAVING sell_by_date >= (NOW())

basically I want to do the above that works with great with mysql
, solid and etc..

Browse pgsql-sql by date

  From Date Subject
Next Message Gregg Berkholtz 1999-02-21 23:02:15 SQL query _slow_
Previous Message Bruce Momjian 1999-02-21 21:23:58 Re: [SQL] Re: questions on interpreting the output of explain\