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 |
lake63
Starting Member
2 Posts |
Posted - 2015-03-04 : 03:54:03
|
at my workplace we have a system that shows active and closed calls and other things but today i tried logging in but i got this error "Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation."it does this whenever i go to active or closed calls so i dont know how to resolve this issue. please advice me on this issue |
|
sz1
Aged Yak Warrior
555 Posts |
Posted - 2015-03-04 : 10:39:12
|
What collation is the db, is it the same db you are querying? you can also change the query to change the collation like this:select[column1] Collate SQL_Latin1_General_CP1_CI_AS as column1name, [column2] Collate SQL_Latin1_General_CP1_CI_AS as column2nameFrom mytableWhere column1 = column2Post sample code!We are the creators of our own reality! |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2015-03-04 : 14:10:19
|
Are you using a temp table or a table variable?These kind of tables are using the tempdb collation, not the application database collation.CREATE TABLE #Temp (Col1 VARCHAR(10) COLLATE DATABASE_DEFAULT); Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA |
|
|
lake63
Starting Member
2 Posts |
Posted - 2015-03-05 : 00:46:00
|
FROM AgencyINNER JOIN AgencyStatus ON AgencyStatus.Status = Agency.StatusWHERE Agency.TypeContractor = 1 AND AgencyStatus.Active = 0UNIONselect Employee.Employeeid, COALESCE(Employee.Title + ' ' + Employee.Firstname + ' ' + Employee.Lastname, Employee.Title + ' ' + Employee.Lastname, Employee.Firstname + ' ' + Employee.Lastname, Employee.Lastname)FROM EmployeeWHERE Employee.EmployeeID in (select distinct employeeid from maintenanceassignment where employeeid is not null)"> this is the sql from active calls script its the same with the closed calls |
|
|
|
|
|
|
|