Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Problem in Linking Tables Post Reply Post New Topic
Author Message
Selimse
Newbie
Newbie
Avatar

Joined: 11 Feb 2010
Location: Turkey
Online Status: Offline
Posts: 4
Quote Selimse Replybullet Topic: Problem in Linking Tables
     Posted: 27 Feb 2010 at 7:54am
Dear friends,
 
I have two tables. In the first table a field contains two different type of values such as "A1234xxxxx..." and "1234xxx..." (where x is a random number) and a field in other table contains values such as "A1234"
 
I want to link these two tables in order to get same results in table 2 for the both types of values such as "A1234xxxxx..." and "1234xxx..." in my formulas. Can you help me to do it?
 
For example
 
Table1
field1:
A123411
A1234690737
A12343973
123456
1234090832323
A987611
A98768307297
98763237829
987632735
 
Table2
field1   -  field2
1234   -    VALUE1
9876   -    VALUE2   
4566   -    VALUE3
 
And after linking i want to use such a formula to get the field2 values
 
IF RIGHT (LEFT ({TABLE1.FIELD1}, 5), 4) = {TABLE2.FIELD1} THEN
    FORMULA = {TALBE2.FIELD2}
END IF
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Mar 2010 at 6:30am
I'm not sure, but I don't think that you can accomplish this by linking the tables in CR as it doesn't really give that option. 
 
You can accomplish this in a stored proc with ease, as it is more flexible with join conditions.
 
HTH
IP IP Logged
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