Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Full Outer Join

Status
Not open for further replies.

onwiththeshow11

Technical User
Apr 3, 2008
10
US
Hi,

I have three tables that have records that in exist in all three tables, some in both, some in just one, etc.

I would like to use full outer join so that all records will appear on the report no matter what table they are in but the option is always greyed out.

Thanks in advance for any help.
 
For records that may or may not be there, you need a left-outer link, not a full outer join. That assumes that records will always be there is one table, with the others linking from that.

If that's not the case then it would be beyond Crystal's capabilities, as far as I know. Or would be unless there is some other table that will contain all records, you could then link from there. Please give more details.

It always helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Depending upon what you are trying to do overall, you could consider using a command with a union all statement that would basically "merge" corresponding fields from each table into one field. You could label each part of the union statement so that you could tease out the table which is populating the field, as in:

select 'A' as whichtable, A.field1, A.field2
from A
union all
select 'B' as whichtable, B.field1, B.field2
from B
union all
select 'C' as whichtable, C.field1, C.field2
from C

You could then use {command.whichtable} to identify the table which is the source of each record, while all records would appear in the report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top