Carmageddon
Carmageddon

Reputation: 2849

Inserting a ≤ character gets converted into = sign

We have a SQL server running on Azure RDS, We have a problem where a stored procedure is doing some ETL work parsing JSON value, ultimately I tracked down the problem to this minimal reproducible scenario:

CREATE TABLE [dbo].[conditions_test] (
    [condition_notation] nvarchar(max),
    [condition_id] nvarchar(max)
);

insert into conditions_test (condition_id, condition_notation) values('25271','≤');

The problem is that this character, gets converted into =and results in:

condition_notation condition_id
= 25271

I've tried changing the schema collation using alter table column collate Latin1_General_100_CI_AI_SC and no change.

The source of the JSON is actually from another DB running MySQL and the CHARSET function on the original JSON shows utf8mb4 - this data is copied over the the MS SQL DB for further ETL work.

Why is this happening and how to fix it?

Upvotes: 0

Views: 37

Answers (0)

Related Questions