Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Right Outer Join Post Reply Post New Topic
Author Message
Michael_PMC
Newbie
Newbie


Joined: 12 Nov 2012
Online Status: Offline
Posts: 1
Quote Michael_PMC Replybullet Topic: Right Outer Join
    Posted: 12 Nov 2012 at 2:29am
I have two similar reports, the first one in CR 8 and the other in CR XI. They both address the same kind of Oracle DBases (in a one to many relationship), but in two different office locations.

Here's the SQL Query for the first report:

SELECT
     "NCAANGL1"."CONTAINERNUMMER",
     "NCAANGH0"."INTERNNUMMER"
FROM
     "NCTS"."NCAANGL1" "NCAANGL1",
     "NCTS"."NCAANGH0" "NCAANGH0"
WHERE
     "NCAANGL1"."INTERN_VOLGNUMMER" = "NCAANGH0"."INTERNNUMMER" AND
     "NCAANGH0"."DATUM_AANVAARDING_25_28" >= '20121001' AND
     "NCAANGH0"."DATUM_AANVAARDING_25_28" <= '20121031'


The second report is made with CR XI and shows following SQL Query:

SELECT
     "NCAANGL1"."CONTAINERNUMMER",
     "NCAANGH0"."INTERNNUMMER"
FROM     "NCTS"."NCAANGL1" "NCAANGL1" RIGHT OUTER JOIN "NCTS"."NCAANGH0" "NCAANGH0" ON "NCAANGL1"."INTERN_VOLGNUMMER"="NCAANGH0"."INTERNNUMMER"

WHERE     ("NCAANGH0"."DATUM_AANVAARDING_25_28">='20121001' AND "NCAANGH0"."DATUM_AANVAARDING_25_28"<='20121031')

Both reports have parameterfields for selection of the perioddates.

Now, the first report (in CR 8) does not show records in the main table that have no related record, while the second report (in CR XI) does!

Anybody any idea how to have the first report act as the second one?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 12 Nov 2012 at 10:39am
Right-click on the join between NCAANGL1 and NCAANGH0.  If the link is FROM NCAANGL1 to NCAANGH0, make it a right outer join.  If it's the other direction, make it a left outer join.
 
-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.