Incorrect syntax near the keyword 'SELECT'.
Hej Nogen der kan hjælpe med denne fejl..Declare
--Resource/Resourcegruppe
@RES_ID as varchar(40),
@RES_Name as varchar(40),
@RES_type as varchar(30),
@RES_CalName as varchar(40),
--Resource insert
SELECT @RES_ID ='2' --Den fejler her ved SELECT
SELECT @RES_Name = 'Sitma'
SELECT @RES_type ='Group'
SELECT @RES_CalName ='Generel'
INSERT INTO dbo.Resource (resId,touchExt,name,type,resGroupId,genCalName)
VALUES (@RES_Id,CURRENT_TIMESTAMP,@RES_Name,@RES_type,@RES_GroupID,@RES_CalName)
Msg 137, Level 15, State 1, Line 12
Must declare the scalar variable "@RES_ID".
Msg 137, Level 15, State 1, Line 13
Must declare the scalar variable "@RES_Name".
Msg 137, Level 15, State 1, Line 14
Must declare the scalar variable "@RES_type".
Msg 137, Level 15, State 1, Line 15
Must declare the scalar variable "@RES_GroupID".
Msg 137, Level 15, State 1, Line 16
Must declare the scalar variable "@RES_CalName".
Msg 137, Level 15, State 2, Line 18
Must declare the scalar variable "@RES_Id".
Hilsen Pejsen