Elnaz
Elnaz

Reputation: 2890

Insert string of comma seperated strings in sql server

I want to Insert "'765','76','70','70','80','82','11'" into nvarchar column in sql-server. How it's possible?

Upvotes: 0

Views: 59

Answers (1)

Ilyes
Ilyes

Reputation: 14928

Here you go:

DECLARE @N NVARCHAR(MAX);
SET @N = '''765'',''76'',''70'',''70'',''80'',''82'',''11''';
SELECT @N AS Result;

Result:

+-------------------------------------+
|               Result                |
+-------------------------------------+
| '765','76','70','70','80','82','11' |
+-------------------------------------+

Upvotes: 1

Related Questions