I'm trying to insert some values into SQL Server but I get an error message:
Line 2: Incorrect syntax near ','
I need to enter several values in 1 table so I was looking for a quicker way to not insert 1 at a time.
For some reason I always have issues with databases :(
My query is:
INSERT INTO PERSONALRH_NIVEL (SERHGCCAB, PUESTO_ID, COMPANIA_ID, REGION_ID, TIPO_EMPLEADO)
VALUES (81570, 4, 2001, 2, 'N'),
(81570, 4, 2001, 3, 'S'),
(81570, 4, 2001, 3, 'N');
Thank you in advance, David
SELECT @@Versionfrom within SSMS for server version. For DB compatability level it'sSELECT compatibility_level FROM sys.databases WHERE name = 'MyDatabase';DB Compatability level matrix is here: msdn.microsoft.com/en-us/library/bb510680.aspx