Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Collation Conflict Expand / Collapse
Author
Message
Posted Tuesday, October 7, 2008 9:44 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 26, 2011 11:27 AM
Points: 38, Visits: 249
where specifically in the query should i use the Collate function?

I already have it in the middle part of the query.
Post #581936
Posted Tuesday, October 7, 2008 1:37 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 8:10 PM
Points: 2,826, Visits: 8,463
SQLbeginner (10/7/2008)
where specifically in the query should i use the Collate function?

I already have it in the middle part of the query.


Anywhere you're comparing or joining between the 2 databases. Think of it like converting 1 collation to the other. So if DB_A is Collation_A, and DB_B is Collation_B then your code will be:

select DB_A.dbo.TableA, DB_B.dbo.TableB
from DB_A.dbo.tableA TbA
join DB_B.dbo.tableB TbB on TbA.FldA collate Collation_B = TbB.FldB

That converts FldA to B's collation



Post #582145
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse