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!

One to many join

Status
Not open for further replies.

pkohli88

Programmer
Oct 25, 2006
30
US
Hi,
is it a way to join a main table to secondary table.
like this WITHOUT using COMMAND feature.
Code:
select
*
from table_A A
left join table_B B on A.field1 = B.Field1 and B.field2 = 'ABC'

so my objective is to get all records from table A and I want to show only those fields from table B where B.Field2 ='ABC' rest will be shown as null.

I can't use command because i am already using multivalue parameter in the record selection formula.
and i tried to use command and created a link between normal table and command table but the processing is really really slow.

so is there any other way for this problem.

I am using crystal version 10 and oacle 10g as a database
Thanks
 
You might create a View...

Crystal would suggest a subreport, which is also slow.

-k
 
You need to use the left join without the selection criteria on Table B in order to return all Table A records. Then write a formula like the following to return the "ABC" value:

if isnull({tableB.field2}) or
{tableB.field2} <> "ABC" then "" else
{tableB.field2}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top