Subject | Re: [firebird-support] Firebird 2.1 : left join right join full join outer join dont' work ! |
---|---|
Author | Philipp Franzos |
Post date | 2010-09-01T10:33:26Z |
Danke Hannes
Klappt super !
Gruss Philipp
2010/9/1 Hannes Streicher <hstreicher@...>
Klappt super !
Gruss Philipp
2010/9/1 Hannes Streicher <hstreicher@...>
> Guten Tag Philipp Franzos,[Non-text portions of this message have been removed]
>
> > Hi HTH
>
> > who ever you are, thank you it works !
> > Bit how do I get blank instead of NULL in the result table ?
>
> check the coalesce function
>
>
>
> > Regards
> > Philipp
>
> > 2010/9/1 Svein Erling Tysvær <svein.erling.tysvaer@...>
>
> >>
> >>
> >> Two things:
> >>
> >> 1) Don't mix SQL-89 (implicit JOIN) and SQL-92 (explicit JOIN).
> >> 2) Referring to KO.TYP in the WHERE clause in reality changes the left
> join
> >> to an inner join.
> >>
> >> So, assuming you really want a left join, change to:
> >>
> >> SELECT DISTINCT
> >> PR.SUCHBEGRIFF as Liegenschaft,
> >> AD.VORNAME,
> >> AD.NAME1,
> >> KO.NUMMER,
> >> KO.TYP
> >> FROM ADRESSE ad
> >> JOIN ADRESSE_ADRESSKATEGORIE aa on AA.ADRESSE_ID = AD.ID
> >> JOIN ADRESSKATEGORIE ak on AK.ID = AA.ADRESSKATEGORIE_ID
> >> JOIN VERTEILEREINTRAG ve on VE.ADRESSE_ID = AD.ID
> >> JOIN PROJEKT pr on VE.VERTEILER_ID = PR.BETEILIGTEVERTEILER_ID
> >> left join KOMMUNIKATION ko on AD.ID = KO.ADRESSE_ID and KO.TYP =
> 'Privat'
> >> WHERE
> >> AK.SUCHBEGRIFF = 'Hauswart'
> >>
> >> And see if that eliminates your problem.
> >>
>
> --
> Mit freundlichen Grüssen
> Hannes Streicher mailto:HStreicher@...
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>