| Author |
Topic |
|
monfu
Yak Posting Veteran
81 Posts |
Posted - 2008-08-22 : 14:26:28
|
| Dear AllI am trying to transfer some data from an old database to a new database, however I am getting the following error:-Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.My code is like this:-INSERT INTO #temp_OldMatches( matchID,matchDate,matchType,cupName,TeamB,clubName,Venue,HTScore,FTScore,FormTeamA,FormTeamB,Scorers,Ref,RedCards,Commentary)SELECT TOP 10 matchID,matchDate,matchType,(SELECT cupName FROM hamrunMatchesSQL.dbo.Cups WHERE cupID = hamrunMatchesSQL.dbo.Matches.matchType), TeamB,(SELECT clubName FROM hamrunMatchesSQL.dbo.Clubs WHERE clubID = hamrunMatchesSQL.dbo.Matches.TeamB), Venue,HTScore,FTScore,FormTeamA,FormTeamB, Scorers,Ref,RedCards, CommentaryFROM hamrunMatchesSQL.dbo.Matches Can you please tell me what I have to do to get it to workThanksJohann |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-08-22 : 14:34:17
|
| Looks like database are in diferent collation.You need to explicitly specify desired collation in your insert statement. |
 |
|
|
monfu
Yak Posting Veteran
81 Posts |
Posted - 2008-08-22 : 14:37:10
|
| Hi sodeepCan you give me an example how to achieve that pleasethks |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-08-22 : 14:45:50
|
Maybe this:quote: Originally posted by monfu Dear AllI am trying to transfer some data from an old database to a new database, however I am getting the following error:-Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.My code is like this:-INSERT INTO #temp_OldMatches( matchID,matchDate,matchType,cupName,TeamB,clubName,Venue,HTScore,FTScore,FormTeamA,FormTeamB,Scorers,Ref,RedCards,Commentary)SELECT TOP 10 matchID,matchDate,matchType,(SELECT cupName FROM hamrunMatchesSQL.dbo.Cups WHERE cupID collate SQL_Latin1_General_CP1_CI_AS = hamrunMatchesSQL.dbo.Matches.matchType collate SQL_Latin1_General_CP1_CI_AS ), TeamB,(SELECT clubName FROM hamrunMatchesSQL.dbo.Clubs WHERE clubID collate SQL_Latin1_General_CP1_CI_AS = hamrunMatchesSQL.dbo.Matches.TeamB collate SQL_Latin1_General_CP1_CI_AS ), Venue,HTScore,FTScore,FormTeamA,FormTeamB, Scorers,Ref,RedCards, CommentaryFROM hamrunMatchesSQL.dbo.Matches Can you please tell me what I have to do to get it to workThanksJohann
|
 |
|
|
monfu
Yak Posting Veteran
81 Posts |
Posted - 2008-08-22 : 14:56:10
|
| excellent!Thanks sodeep!much appreciated |
 |
|
|
|
|
|