Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Outer join with the concatenated fields Post Reply Post New Topic
Author Message
beeanotai
Newbie
Newbie


Joined: 16 Sep 2009
Online Status: Offline
Posts: 2
Quote beeanotai Replybullet Topic: Outer join with the concatenated fields
     Posted: 17 Mar 2010 at 5:55pm
Hi,

I really need your help.

I am creating a SQL Command in crystal report.

Says that I have 2 tables A and B and I want to join this two tables using left outer join. The field that need to join from table B have to concatenate. The SQL will be like this:-

Select A.Field1, B.Field1
from A left outer join B on (A.ID = B.ID1||B.ID2) 

I tried to use (+) as an outer join instead of the word "left outer join" but it does not work. Confused
Somebody please lead me how to outer join with the concatenated fieds.

Thanks
Bee
IP IP Logged
razzak
Newbie
Newbie
Avatar

Joined: 03 Mar 2010
Location: India
Online Status: Offline
Posts: 34
Quote razzak Replybullet Posted: 17 Mar 2010 at 7:59pm
if your ID1 and ID 2 columns are varchar then
 
Select A.Field1, B.Field1
from A left outer join B on (A.ID = B.ID1+''+B.ID2) 

 
Razzak Sayyed
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