|Subject||Re: [firebird-support] Cannot use distinct together with subselect|
> SELECT TABKOMMUNIKATION.KOMMIDDaniel,
> , KOMARTID
> , (Select KomArtDesc from tabKomart where
> tabKommunikation.KomArtID=tabKomArt.KomArtID) AS Art
> , KOMMDETAIL
> , KOMMREMARK
> FROM TABKOMMUNIKATION
> JOIN TABUSERXKOMMUNIKATION ON
> Where (TABUSERXKOMMUNIKATION.PersID<> :PersID)
> Also, EXISTS only returns true if at least one record is returned in
> the subselect, and doesn't look at the result set.
This is true and I have changed it. Thanks.
But what I meant was the subquery for the 3rd field.
As so often, the sparking idea comes to mind right after one hits the send button.
Instead of the subselect I now use a second join. With this, distinct cause the error.