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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 join 2 tables on 2 different data types

Author  Topic 

Trininole
Yak Posting Veteran

83 Posts

Posted - 2010-12-09 : 12:08:55
How would i join the column names sp.eprojcode char(4) to gt.grantcode char(5) where the length of the data types are different? How would i join those two column names of two different tables?

Roger DeFour

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-12-09 : 12:12:00
you can use LTRIM(RTRIM(gt.grantcode)) = sp.eprojcode

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -