Subject | RES: [ib-support] firebird client crash with select |
---|---|
Author | Marcelo Pitanga |
Post date | 2003-04-07T19:37:37Z |
Hi Arno,
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
Thanks
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
Thanks
> ----- Mensagem original -----
> De: Arno Brinkman [SMTP:firebird@...]
> Enviada em: segunda-feira, 7 de abril de 2003 16:33
> Para: ib-support@yahoogroups.com
> Assunto: Re: [ib-support] firebird client crash with select
>
> Hi,
>
> > I´ve installed firebird 1.0 and when i execute the following command my
> > client crash.
>
> Are you sure it crashed ? or was it taking to long berfore you saw results
> ?
>
> > select r.cod_hermes, r.nom_rev from revendedora r
> > where
> > r.cod_hermes in
> > ( select r1.cod_hermes from revendedora r1
> > group by r1.cod_hermes
> > having count(*)>1 )
>
> Use EXISTS() instead :
>
> SELECT
> r.cod_hermes,
> r.nom_rev
> FROM
> revendedora r
> WHERE
> EXISTS(SELECT * FROM revendedora r1
> WHERE r1.cod_hermes = r.cod_hermes
> HAVING count(*) > 1)
>
> Regards,
> Arno Brinkman
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>