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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Server Collation

Author  Topic 

gavinjb
Starting Member

34 Posts

Posted - 2009-11-09 : 09:22:42
Hi,

I have been asked to write a report pulling data from 2 servers, only problem is that the Web Development Team have decided to go against policy and use a different collation on their server, does anyone know if and if so how I can write a query to join tables on 2 different servers using differnet correlations.

Thanks,



Gavin,

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-11-09 : 09:31:24
An example:
join ... on a.column = b.column collate SQL_Latin1_General_CP1_CI_AS


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-11-09 : 11:24:29
Or better:
join ... on a.column COLLATE DATABASE_DEFAULT = b.column COLLATE DATABASE_DEFAULT

Then it is using the database default collation from active database.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -