Subject Re: [IBO] FULL JOIN
Author Svein Erling Tysvær
>I have a master/detail query and want to do a full join from two tables in the detail part:
>
>SELECT R.COMMENTS
> , R.REPORTID
> , REPORT_REQUEST.STATUS
> , R.REPORTNUM
>FROM REPORT R
>FULL JOIN REPORT_REQUEST
>ON R.KEY_VAL = REPORT_REQUEST.KEY_VAL
>
>KeyLinksAutoDefine is checked and the KeyLinks value is
>
>R.REPORTNUM
>
>I can't seem to get the full join to work. If the MasterLinks is R.KEY_VAL=MASTER.KEY_VAL I get the entries in the REPORT table, if it is >REPORT_REQUEST.KEY_VAL=MASTER.KEY_VAL I get the entries in REPORT_REQUEST table. How do I get both?

Unfortunately, I don't have the opportunity to try this before answering, but my guess is that you want your MasterLinks to be something like

COALESCE(R.KEY_VAL,REPORT_REQUEST.KEY_VAL)=MASTER.KEY_VAL

I've never tried anything similar (You may or may not have to add the COALESCE to your SELECT or preface it with some prefix (don't remember if it was :sql: or something else). Please tell us if this works, I'm curious.

HTH,
Set