Collation conflict between “SQL_Latin1_General_CP1_CI_AS” and “Modern_Spanish_CI_AS” in the equal to operation

后端 未结 3 1401
天命终不由人
天命终不由人 2021-01-20 10:35

I was creating this SQL function from SQL SERVER 2008 R2 to WINDOWS AZURE, but I don\'t how to resolve this problem.

Msg 468, Level 16, State 9, Proce

3条回答
  •  终归单人心
    2021-01-20 11:08

    You have a collation mismatch between the database collation (@RtnValue.Data) and the collation used in Objectives.LearningSysten.

    Quickest solution may be to explicitly declare the collation in @RtnValue:

    DECLARE @RtnValue table
    (
        ColumnName VARCHAR(50),
        Data VARCHAR(50) COLLATE [insert required collation name]
    )
    

    This is a quick fix, however, you should check correct use of collations on database and table column level.

提交回复
热议问题