Hello Experts,
I am getting this error on SQL Server 2000:
CREATE PROCEDURE dbo.AcpReport_HR_CoilProduction
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Braze1Shift TABLE(SNo INT NOT NULL IDENTITY(1,1), JobTitle Varchar(255) NOT NULL , Name Varchar(255) NOT NULL , NUM Varchar(255) NOT NULL );
SET IDENTITY_INSERT @Braze1Shift ON;
Insert Into @Braze1Shift(JobTitle,Name,NUM )
SELECT JobTitle, LastName + ',' + FirstName as 'Name', NUM
FROM [AIO_Test_Results].[dbo].[EmployeeInfo] Where [Group] = 'PRODUCTION'
and Dept = 'BRAZE' and TRAIN IS NULL and Jobtitle <> 'LEAD' AND Shift = 1
Order By LastName
SET IDENTITY_INSERT @Braze1Shift OFF;
Select * from @Braze1Shift;
END
GO
Error:
Msg 170, Level 15, State 1, Procedure AcpReport_HR_CoilProduction, Line 14
Line 14: Incorrect syntax near '@Braze1Shift'.
Msg 170, Level 15, State 1, Procedure AcpReport_HR_CoilProduction, Line 21
Line 21: Incorrect syntax near '@Braze1Shift'.