Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Link tables Post Reply Post New Topic
Author Message
matt1361
Newbie
Newbie


Joined: 07 Nov 2007
Location: United States
Online Status: Offline
Posts: 17
Quote matt1361 Replybullet Topic: Link tables
    Posted: 08 Nov 2007 at 1:39pm
I am trying to link two tables in a DB2 database.  The only fields I can link them with have different data types (data in these fields is identical) and the database expert says link types not compatible. 
 
Is it possible to do this manually?
 
 


Edited by matt1361 - 08 Nov 2007 at 1:40pm
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 08 Nov 2007 at 2:07pm

I do not know DB2 but in TSQL you can convert the data type in a Select statement through CAST or CONVERT functions. If you can in DB2 (I assume you will be able to do this), then convert the data field in one table's  to match the other.

I have done this before and it does solve the problem you are seeing. 
 
Regards,
 
John W.
IP IP Logged
matt1361
Newbie
Newbie


Joined: 07 Nov 2007
Location: United States
Online Status: Offline
Posts: 17
Quote matt1361 Replybullet Posted: 20 Nov 2007 at 9:15am

That worked great once I got the syntax right. THANKS

IP IP Logged
vijayk
Groupie
Groupie


Joined: 14 Mar 2007
Location: United States
Online Status: Offline
Posts: 53
Quote vijayk Replybullet Posted: 20 Nov 2007 at 11:06am
matt:
 
Quick question.. Where did you convert it at the database level or within crystal reports..?
 
Thanks
Vijay
IP IP Logged
matt1361
Newbie
Newbie


Joined: 07 Nov 2007
Location: United States
Online Status: Offline
Posts: 17
Quote matt1361 Replybullet Posted: 20 Nov 2007 at 12:02pm
I converted it within crystal reports.  I used the add command feature in the database expert.
IP IP Logged
vijayk
Groupie
Groupie


Joined: 14 Mar 2007
Location: United States
Online Status: Offline
Posts: 53
Quote vijayk Replybullet Posted: 20 Nov 2007 at 12:33pm
Thanks.. So you wrote your own SQL/Custom SQL rather than crystal generating the SQL for you.
 
Vijay
IP IP Logged
matt1361
Newbie
Newbie


Joined: 07 Nov 2007
Location: United States
Online Status: Offline
Posts: 17
Quote matt1361 Replybullet Posted: 20 Nov 2007 at 4:50pm
Yes but it wasn't in the SQL Expression field that is in the field explorer.  I tried that first.
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.016 seconds.