Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Left join Post Reply Post New Topic
Author Message
ckreds
Newbie
Newbie


Joined: 24 Sep 2007
Location: Malaysia
Online Status: Offline
Posts: 16
Quote ckreds Replybullet Topic: Left join
    Posted: 15 Nov 2007 at 3:11am

If im using Left Join to join 2 tables( table_A and table_B)

In my record selection formula editor, i have this criteria {table_A.EmployeeID} = {?empid}
 
my question is, if i enter an employee id that does not match the data in table_A, does this linking return any value? or can i still display value for a particular field in table_B?
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 15 Nov 2007 at 6:13am
A left join specifically will show everything in table A, and any matching records in table B. When you restrict table A to showing no records, then there is no way to have matching records in table B. So, no, there will be no values in table B.

You may want to look into full outer joins. That may give you what you are looking for. Not all databases support them, however.

Also keep in mind that Crystal does not really do conditional joins natively. As a general rule, if you want to do fancy joins, you're better off creating a view in your database, and basing the report off of that.
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.