I have one table in sql db where I store sentences in three languages: Arabic , English , and Japanese
scheme
CREATE TABLE [dbo].[Buns]
(
[ID] INT NOT NULL PRIMARY KEY IDENTITY,
[ENTRY] NVARCHAR(50) NULL,
[LEVEL] NCHAR(10) NULL,
[JAPANESE] NVARCHAR(MAX) NULL,
[ARABIC] NVARCHAR(MAX) NULL,
[ENGLISH] NVARCHAR(MAX) NULL,
)
sample data
https://i.imgur.com/ARL1PmL.png
I can query the English sentences only
The commented statements don’t yield any result
https://i.imgur.com/6KOZV2y.png
SELECT ARABIC, JAPANESE , ENGLISH
FROM dbo.Buns
--WHERE JAPANESE = '私は良子に花をあげた。'
--WHERE ARABIC = 'أعطيت لهاناكو زهرة';
WHERE ENGLISH = 'I gave Yoshiko flowers';
appreciate your support with clear steps as am still a beginner
thanks
>Solution :
To specify an nvarchar string literal, you need to prefix it with N:
SELECT ARABIC, JAPANESE, ENGLISH
FROM dbo.Buns
WHERE ARABIC = N'قيمة للبحث عنها'