Subject Re: AW: [firebird-support] Problem Select sum .. in select
Author Doug Chamberlin
On 1/29/2010 11:25 AM, Olaf Kluge wrote:
> select sum(value) from tableB where person-id in ( FOR select id from
> tableA where group = 1) - the "for" doesn't work

Just remove the "for":
select sum(value) from tableB where person-id in (select id from tableA
where group = 1)

or try
select sum(value) from tableB where exists (select id from TableA where
TableA.person-id = TableB.id and TableA.group = 1)

--
Doug C.
-----
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?