Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: String to number then join Post Reply Post New Topic
Author Message
Jloyd666
Newbie
Newbie


Joined: 18 Mar 2011
Location: United Kingdom
Online Status: Offline
Posts: 7
Quote Jloyd666 Replybullet Topic: String to number then join
     Posted: 31 Oct 2011 at 3:14am
Good Morning All,
 
I have an issue
 
I have two tables I need to Joing. One has a field called "FOREIGN_KEY" (String) and the other is "CARTITEMID"(NUMBER). These two need to be linked in crystal. Thye contain examples of the following
 
FOREING_KEY  (STRING)                   CARTITEMID (NUMBER)
456                                                   456.00
471                                                   471.00
492
CM10000
KP21012
RS12312
 
Any idea how I can join these.
 
Thanks
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Nov 2011 at 10:55am
probably you'll need to join in a stored.  It's been a long time since I manually joined tables in CR, but I don't think that it will allow the joining on different field types...but I've been wrong before.
 
HTH
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Nov 2011 at 4:32am
as far as I you are correct lockwelle. Data type mismatches are not allowed for joining.
you can also use a crystal command (if you cannot use a stored proc) to cast the data from one type to another and join that way.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 02 Nov 2011 at 10:14am
hadn't thought about the command...that would be a nifty trick to remember
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