Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Refering multiple foreign keys. Post Reply Post New Topic
Author Message
praveen_t
Newbie
Newbie
Avatar

Joined: 28 Jul 2010
Location: India
Online Status: Offline
Posts: 1
Quote praveen_t Replybullet Topic: Refering multiple foreign keys.
     Posted: 28 Jul 2010 at 5:32am
Hi all,
  I've a strange problem. Say I've tables A and B. 3 columns of A are foreign keys of table B. When I query table B with each of the values in the 3 columns independently it gives values. But when I link these three columns to the primary key of table B it's not returning me any results. How would I get data from B in this situation? Dead
 
The key words "AND" should be replaced by "OR". Can any one help me out?

SELECT CUBE_LATTICE_.NAME, SURVEY_3D_.NAME, POSITION_.ORIGINAL_X_LONGITUDE, POSITION_.ORIGINAL_Y_LATITUDE, CUBE_LATTICE_.I_ANNOTATION_INCREMENT, CUBE_LATTICE_.J_ANNOTATION_INCREMENT                            FROM (PRJ1_SEIS.CUBE_LATTICE_ CUBE_LATTICE_                   INNER JOIN PRJ1_SEIS.POSITION_ POSITION_ ON CUBE_LATTICE_.POINT_0_0_POSITION_ID=POSITION_.ID AND CUBE_LATTICE_.POINT_0_J_POSITION_ID=POSITION_.ID AND CUBE_LATTICE_.POINT_I_0_POSITION_ID=POSITION_.ID)            INNER JOIN PRJ1_SEIS.SURVEY_3D_ SURVEY_3D_ ON CUBE_LATTICE_.SURVEY_3D_ID=SURVEY_3D_.ID                     WHERE CUBE_LATTICE_.NAME= {?surveyName}

Thanks                                                                                   T. Praveen.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jul 2010 at 7:06am
try adding the CUBE_LATTICE table to your report 3 times join each version of the table once to the PRJ1_SEIS using a sinlge foreign key field
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