Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Join Question Post Reply Post New Topic
Author Message
calsoft
Newbie
Newbie


Joined: 17 Feb 2010
Online Status: Offline
Posts: 3
Quote calsoft Replybullet Topic: Join Question
    Posted: 17 Feb 2010 at 1:07am
I wonder if someone could point me in the right direction: -

I am linking from TableA to TableB

There is an index on Table B of
Field1
Field2

Field2 exists on both tables so that's the easy bit.

The problem is TableB.Field1 is a value that I know but I don't know how to get it into the query NB It doesn't exist on any other table.

In short I want the SQL to look something like
Where TableB.Field1 = "Fred"             /* Not sure how to do this bit */
     and TableB.Field2 = TableA.Field2 /* This is the easy bit */

I've not explained it very well but any hello would be much appreciated.

If I've posted in the wrong section, let me know.

Thanks.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Feb 2010 at 7:24am

In the DB Expert inner join the 2 tables together on Field2 set as "enforced both".

In the report designer go into the Record Select and add your other condition there....
TableB.Field1 = "Fred"
 
IP IP Logged
calsoft
Newbie
Newbie


Joined: 17 Feb 2010
Online Status: Offline
Posts: 3
Quote calsoft Replybullet Posted: 17 Feb 2010 at 7:47am
Thanks, I'll give it a try.
IP IP Logged
calsoft
Newbie
Newbie


Joined: 17 Feb 2010
Online Status: Offline
Posts: 3
Quote calsoft Replybullet Posted: 17 Feb 2010 at 8:51am
Works a treat, thanks.

Edited by calsoft - 17 Feb 2010 at 8:51am
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.