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 |
RMH1972
Starting Member
11 Posts |
Posted - 2010-08-17 : 08:56:11
|
Hello,I have a problem with an "insert into" and a collation conflict.I created a T-sql script >>>use marval_Produktieinsert into dbo.CONTACT_DIVISION([Name], Descrip, Fulong, SLA)(select costcenter, definition, 0, costcenterfrom server2.INT_COMMON.dbo.kplwhere parent = 'VVVVVV'and costcenter <> '000000'and costcenter not in(select [Name] from dbo.CONTACT_DIVISION))<<<I run this on server 1 and i get the data from a database on server2but SQL on server1 is the server collation Latin1_General_CI_ASand on SQL on server2 is the server collation Latin1_General_BINI know that i can use the collate statment but, i just don't know howi had to place COLLATE Latin1_General_CI_AS somware in the script, but i just forgot the correct way to do this.Can someone help me?Greetings |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-08-17 : 10:25:01
|
the syntax is likecolumnname COLLATE Latin1_General_CI_AS = someothercolumn COLLATE Latin1_General_CI_AS------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-08-17 : 11:16:48
|
If its a comparison I think you only need to put it in once? It then forces both sides to be that way aboutIf it is an assignment I put it on the right hand end - convert THAT side to be suitable for assignment. |
 |
|
RMH1972
Starting Member
11 Posts |
Posted - 2010-08-18 : 07:37:16
|
Thanx all for your help.i changed the script touse marval_Produktieinsert into dbo.CONTACT_DIVISION([Name], Descrip, Fulong, SLA)(select costcenter, definition, 0, costcenterfrom server2.INT_COMMON.dbo.kplwhere parent = 'VVVVVV'and costcenter <> '000000'and costcenter not in(select [Name]collate Latin1_General_CI_AS from dbo.CONTACT_DIVISION));and this did the trick.So again thanx,Greetings |
 |
|
|
|
|
|
|