Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Null Records and Left Outer Join Post Reply Post New Topic
Author Message
aeckaren
Newbie
Newbie
Avatar

Joined: 24 Jul 2012
Online Status: Offline
Posts: 26
Quote aeckaren Replybullet Topic: Null Records and Left Outer Join
    Posted: 02 Oct 2012 at 5:35am
I have two tables with a left outer join. Table 1 contains invoice line items and table 2 contains serial numbers for those items. Not all lines on the invoice have serial numbers, so there are some null records in the second table.

I cannot join the tables based on the order number because the field in the second table contains extra characters.

Example:

Table 1: 0118465
Table 2: 0118465 / 00

The only field that I can join the tables on is the part #. Because of this, I have to do a selection based on the order number to return only those serial numbers for that particular order. My selection formula:

{oep65.ordn65}=left({inp95.refn95},7)

When I include the selection, the invoice lines from table 1 with no data in table 2 are excluded. I think this means that it's converting this to an inner join, but I don' t know how to get around this.

Any ideas?



Edited by aeckaren - 02 Oct 2012 at 5:36am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Oct 2012 at 6:06am

not sure if this will work as I can't quite visualize your end result of data but you can add in an isnull portion to your select statement

isnll({inp95.refn95})
or
{oep65.ordn65}=left({inp95.refn95},7)


Edited by DBlank - 02 Oct 2012 at 6:06am
IP IP Logged
aeckaren
Newbie
Newbie
Avatar

Joined: 24 Jul 2012
Online Status: Offline
Posts: 26
Quote aeckaren Replybullet Posted: 02 Oct 2012 at 8:43am
I did try this but for some reason it's really bogging down the server (CR freezes up while trying to run). 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Oct 2012 at 10:04am
can you write a stored proc or crystal command to get your data?
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.031 seconds.