Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Cousboy
Starting Member
7 Posts |
Posted - 2012-04-05 : 07:19:29
|
Hi,I am having difficulty joining 2 tables in a SELECT statement where the datatypes of the 2 columns being joined are different.An example of my SELECT statement is as follows.-----------------------------SELECT t1.column1, t2.column1FROM table1 t1JOIN table2 t2 ON (t1.column1 = t2.column1)-----------------------------t1.column1 is datatype CHAR(8)t2.column1 is datatype VARCHAR(60)I understand that there is an Implicit Conversion between these 2 datatypes and I have also tried a variety of CAST & CONVERT statements.Please let me know if you need any further info. Any help would be greatly appreciated.Many thanksCousboy |
|
parody
Posting Yak Master
111 Posts |
Posted - 2012-04-05 : 10:10:25
|
Are you suggesting the data conatined in these columns does not produce the output you expect when joined?Do you have examples of the data in each table? |
 |
|
vinu.vijayan
Posting Yak Master
227 Posts |
Posted - 2012-04-09 : 07:56:30
|
Please post the DDL of your tables and some sample data.Vinu Vijayan |
 |
|
|
|
|