the "having" clause
From: toylet (toylet_at_mail.hongkong.com)
Date: 03/08/04
- Next message: Paulo Morgado: "Re: TEXT parameter in stored procedure"
- Previous message: Uri Dimant: "Re: locking a record explicitly"
- Next in thread: Vishal Parkar: "Re: the "having" clause"
- Reply: Vishal Parkar: "Re: the "having" clause"
- Reply: Tibor Karaszi: "Re: the "having" clause"
- Reply: Uri Dimant: "Re: the "having" clause"
- Reply: Amy: "Re: the "having" clause"
- Reply: toylet: "Re: the "having" clause"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 08 Mar 2004 17:54:57 +0800
Why did SQL Server complain about "invalid column recno" in the
following query? It worked in another database tool I am using.
select xx.pk, xx.amount, count(*) as recno
from tx xx, tx yy
where xx.pk>=yy.pk
group by xx.pk, xx.amount
having recno = 1
-- .~. Might, Courage, Vision. In Linux We Trust. / v \ http://www.linux-sxs.org /( _ )\ Linux 2.4.22-xfs ^ ^ 5:52pm up 2 days 2:02 load average: 0.99 0.97 0.96
- Next message: Paulo Morgado: "Re: TEXT parameter in stored procedure"
- Previous message: Uri Dimant: "Re: locking a record explicitly"
- Next in thread: Vishal Parkar: "Re: the "having" clause"
- Reply: Vishal Parkar: "Re: the "having" clause"
- Reply: Tibor Karaszi: "Re: the "having" clause"
- Reply: Uri Dimant: "Re: the "having" clause"
- Reply: Amy: "Re: the "having" clause"
- Reply: toylet: "Re: the "having" clause"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|