Subject Re: [ib-support] firebird client crash with select
Author Arno Brinkman
Hi,

> the correct syntax is:
>
> SELECT
> r.cod_hermes,
> r.nom_rev
> FROM
> revendedora r
> WHERE
> EXISTS(SELECT r1.cod_hermes FROM revendedora r1
> WHERE r1.cod_hermes = r.cod_hermes
> group by r1.cod_hermes
> HAVING count(*) > 1)
> order by 1

Well the asterisk was indeed wrong!
You can use also a constant instead, what you want ;-)

SELECT
r.cod_hermes,
r.nom_rev
FROM
revendedora r
WHERE
EXISTS(SELECT 1 FROM revendedora r1
WHERE r1.cod_hermes = r.cod_hermes
HAVING count(*) > 1)
ORDER BY 1

Regards,
Arno