0

I'm kind of new in using SQL Server and I have this problem. I don't know how do I have to concatenate in order to insert into one column table multiple values.

INSERT INTO Table (Column) 
VALUES ('Name'+','+' Last name',);,('Name'+','+'Last name',);

And I get this error:

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ','.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Possible duplicate of [How do I insert multiple rows WITHOUT repeating the "INSERT INTO dbo.Blah" part of the statement?](http://stackoverflow.com/questions/2624713/how-do-i-insert-multiple-rows-without-repeating-the-insert-into-dbo-blah-part) – Michael Freidgeim Jun 09 '16 at 01:06

2 Answers2

0
INSERT INTO Table (Column) 
VALUES ('Name'+','+ 'Last name')  --<-- no comma required inside the paranthesis
      ,('Name'+','+ 'Last name');  --<-- only need semi-colon here
M.Ali
  • 67,945
  • 13
  • 101
  • 127
0

Use should use || symbols for concatenate. Example: SELECT first_name || ' ' || last_name FROM hr.employees;

nzeshka
  • 9
  • 2