Achref Laayouni
Achref Laayouni

Reputation: 15

integrating data into DB shows question marks as value

I have a dataset named "supplier_dim" in an excel sheet, and one of the columns "SUPPLIER NAME" has names in Russian supplier_name_data_input

So when I tried creating a table to integrate data into:

create table supplier_DIM 
(
    ID_supplier int primary key identity (1,1),
    supplier_name nvarchar(50),
    supplier_code varchar(50)
)

Then I inserted data into this table:

insert into supplier_DIM (supplier_name, supplier_code) 
values ('Шпаркасе Лизинг ДОО', 'DC000325')

I get this result when I select all columns:

out_put

How can I fix the question mark value problem?

Upvotes: 0

Views: 45

Answers (1)

David Browne - Microsoft
David Browne - Microsoft

Reputation: 89091

'Шпаркасе Лизинг ДОО' is a varchar literal, and will not preserve the characters in a database without a special collation. Instead use an nvarchar literal, eg

supplier_DIM (supplier_name,supplier_code) values (N'Шпаркасе Лизинг ДОО','DC000325')

Upvotes: 1

Related Questions