| |

VerySource

 Forgot password?
 Register
Search
View: 1290|Reply: 7

Unable to resolve collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Chinese_PRC_CI_AS" in equal to oper

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-2 20:00:02
| Show all posts |Read mode
Create Table #a (Sonum char (10))
Insert Into #a (Sonum)
select '05 / 6525 '
 
select a. * from sohead a inner join #a on a.so_num = # a.Sonum

Could not resolve collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Chinese_PRC_CI_AS" in equal to operation.
Ask how to solve
Reply

Use magic Report

0

Threads

114

Posts

69.00

Credits

Newbie

Rank: 1

Credits
69.00

 China

Post time: 2020-5-15 23:00:01
| Show all posts
Can only be changed like this
select * from sohead where so_num in (select Sonum as so_num from #a)
Reply

Use magic Report

0

Threads

28

Posts

25.00

Credits

Newbie

Rank: 1

Credits
25.00

 China

Post time: 2020-5-20 17:45:01
| Show all posts
select a. * from sohead a inner join #a on a.so_num COLLATE database_default
= # a.Sonum COLLATE database_default
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-5-23 06:45:01
| Show all posts
Tried, but this error occurred again: an expression of non-Boolean type was specified in the context where the condition should be used (near 'COLLATE').

Can you tell me why?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-5 17:15:01
| Show all posts
The collate of the table sohead field so_num is different from the default collate of the database. Create a temporary table and use the default collate of the database for the character type field. If the collate of the field of the table is different, SQL Server cannot perform the two fields. Compare

Solution: Change the collate of the sohead field so_num to be consistent with the default of the database, or change the default Collate of the database, or specify Collate when creating the temporary table
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-26 17:30:02
| Show all posts
Choose which database of yours, right-click properties, there is a sorting rule under that option setting, just change it
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-3 10:00:02
| Show all posts
Database Properties>Options>Collation>Chinese_PRC_CI_AS

OK
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-3 10:15:01
| Show all posts
It may be that the wrong character set was selected when SQL was installed, or the compatibility of SQL was set to be compatible (but it is risky, I dare not set it randomly)
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list