Re: Reports 3.0 : Turn Off Outer Join Between Q_1 and Q_2

From: <rtproffitt_at_my-deja.com>
Date: Thu, 08 Jul 1999 16:58:46 GMT
Message-ID: <7m2lbt$gpd$1_at_nnrp1.deja.com>


Salam Syed,
Can you restructure the query into one query with 3 or 4 groups and then your parent and child repeating groups connect to different groups of the one query?
Then there is no outer join.

Or...if you must have two queries, can you re-write the first query to include, or reference, the table used in the second query so that you guarantee that no rows will return in the first query when there are no matching rows in the second table?

Old way:
1) Select a,b,c,d, custnum from TableA
2) Select e,f,g, custnum from TableB

   (datalink = where custnum=custnum)

New Way:
1) Select a,b,c,d,custnum from TableA a,

       (select distinct custnum
        from TableB) b

   Where a.custnum=b.custnum

2) query 2 stays the same, with the same datalink...

Query 1 could also be written as:
1) Select a,b,c,d,custnum from TableA a

   Where EXISTS (select b.custnum from TableB b

                 Where a.custnum=b.custnumn)

Robert Proffitt
Beckman Coulter
Brea California

Sent via Deja.com http://www.deja.com/
[Quoted] Share what you know. Learn what you don't. Received on Thu Jul 08 1999 - 18:58:46 CEST

Original text of this message