mistektips
Programmer
Hi,
I am trying to run this stored procedure, but I am getting an error saying:
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near ')'.
The stored procedure is as follows:
CREATE PROCEDURE usp_Insert_Met_File_New
@GUID uniqueidentifier,
@Class_Code char(5),
@Sap_Class_Code char(8),
@Effective_Date numeric(8),
@Eff_Amend_No char(4),
@Class_Title char(50),
@Abolish_Date numeric(8),
@Abol_Amend_no char(4),
@Nxt_Low_Class1 char(5),
@Nxt_Low_Class2 char(5),
@Nxt_Low_Class3 char(5),
@Nxt_Low_Class4 char(5),
@Sap_Nxt_Low_Class1 char(8),
@Sap_Nxt_Low_Class2 char(8),
@Sap_Nxt_Low_Class3 char(8),
@Sap_Nxt_Low_Class4 char(8),
@Central_Class char(1),
@Probation_Period numeric(2),
@Coll_Brg_Unit char(1),
@Coll_Brg_Sup char(1),
@Coll_Brg_Code char(2),
@Pay_Range char(2),
@Min_Pay_Step char(2),
@Min_Annual_Sal numeric(6),
@Max_Pay_Step char(2),
@Max_Annual_Sal numeric(6),
@Pay_Sched char(2),
@Leave_Part_Code char(1),
@Age_50_Ret_Code char(1),
@Occupation_Code char(4),
@Trainee_Code char(1),
@Deactivate_Code char(1),
@Pms_Overide_Code char(1),
@Residency_Waived char(1),
@Job_Category_Code char(1),
@Tdd_Unit_Code char(1),
@Position_Coverage_1 char(1),
@Position_Coverage_2 char(1),
@Cs_Coverage_Date numeric(8),
@Class_Creation_Date numeric(8),
@Record_Status char(1),
@Amend_Reason_Code char(2)
AS
INSERT INTO Met_File_New
(
Guid,
Class_Code,
Sap_Class_Code,
Effective_Date,
Eff_Amend_No,
Class_Title,
Abolish_Date,
Abol_Amend_no,
Nxt_Low_Class1,
Nxt_Low_Class2,
Nxt_Low_Class3,
Nxt_Low_Class4,
Sap_Nxt_Low_Class1,
Sap_Nxt_Low_Class2,
Sap_Nxt_Low_Class3,
Sap_Nxt_Low_Class4,
Central_Class,
Probation_Period,
Coll_Brg_Unit,
Coll_Brg_Sup,
Coll_Brg_Code,
Pay_Range,
Min_Pay_Step,
Min_Annual_Sal,
Max_Pay_Step,
Max_Annual_Sal,
Pay_Sched,
Leave_Part_Code,
Age_50_Ret_Code,
Occupation_Code,
Trainee_Code,
Deactivate_Code,
Pms_Overide_Code,
Residency_Waived,
Job_Category_Code,
Tdd_Unit_Code,
Position_Coverage_1,
Position_Coverage_2,
Cs_Coverage_Date,
Class_Creation_Date,
Record_Status,
Amend_Reason_Code
)
VALUES
(
@Guid,
@Class_Code,
@Sap_Class_Code,
@Effective_Date,
@Eff_Amend_No,
@Class_Title,
@Abolish_Date,
@Abol_Amend_no,
@Nxt_Low_Class1,
@Nxt_Low_Class2,
@Nxt_Low_Class3,
@Nxt_Low_Class4,
@Sap_Nxt_Low_Class1,
@Sap_Nxt_Low_Class2,
@Sap_Nxt_Low_Class3,
@Sap_Nxt_Low_Class4,
@Central_Class,
@Probation_Period,
@Coll_Brg_Unit,
@Coll_Brg_Sup,
@Coll_Brg_Code,
@Pay_Range,
@Min_Pay_Step,
@Min_Annual_Sal,
@Max_Pay_Step,
@Max_Annual_Sal,
@Pay_Sched,
@Leave_Part_Code,
@Age_50_Ret_Code,
@Occupation_Code,
@Trainee_Code,
@Deactivate_Code,
@Pms_Overide_Code,
@Residency_Waived,
@Job_Category_Code,
@Tdd_Unit_Code,
@Position_Coverage_1,
@Position_Coverage_2,
@Cs_Coverage_Date,
@Class_Creation_Date,
@Record_Status,
@Amend_Reason_Code
)
GO
I am executing the stored proc as follows:
exec usp_Insert_Met_file_New
newid(),null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null
I am getting an error saying:
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near ')'.
When I try to insert into the table directly without using stored proc, it works correctly,
but when i use the stored proc, i get the above mentioned error...
Could you suggest where is the mistake?
I am trying to run this stored procedure, but I am getting an error saying:
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near ')'.
The stored procedure is as follows:
CREATE PROCEDURE usp_Insert_Met_File_New
@GUID uniqueidentifier,
@Class_Code char(5),
@Sap_Class_Code char(8),
@Effective_Date numeric(8),
@Eff_Amend_No char(4),
@Class_Title char(50),
@Abolish_Date numeric(8),
@Abol_Amend_no char(4),
@Nxt_Low_Class1 char(5),
@Nxt_Low_Class2 char(5),
@Nxt_Low_Class3 char(5),
@Nxt_Low_Class4 char(5),
@Sap_Nxt_Low_Class1 char(8),
@Sap_Nxt_Low_Class2 char(8),
@Sap_Nxt_Low_Class3 char(8),
@Sap_Nxt_Low_Class4 char(8),
@Central_Class char(1),
@Probation_Period numeric(2),
@Coll_Brg_Unit char(1),
@Coll_Brg_Sup char(1),
@Coll_Brg_Code char(2),
@Pay_Range char(2),
@Min_Pay_Step char(2),
@Min_Annual_Sal numeric(6),
@Max_Pay_Step char(2),
@Max_Annual_Sal numeric(6),
@Pay_Sched char(2),
@Leave_Part_Code char(1),
@Age_50_Ret_Code char(1),
@Occupation_Code char(4),
@Trainee_Code char(1),
@Deactivate_Code char(1),
@Pms_Overide_Code char(1),
@Residency_Waived char(1),
@Job_Category_Code char(1),
@Tdd_Unit_Code char(1),
@Position_Coverage_1 char(1),
@Position_Coverage_2 char(1),
@Cs_Coverage_Date numeric(8),
@Class_Creation_Date numeric(8),
@Record_Status char(1),
@Amend_Reason_Code char(2)
AS
INSERT INTO Met_File_New
(
Guid,
Class_Code,
Sap_Class_Code,
Effective_Date,
Eff_Amend_No,
Class_Title,
Abolish_Date,
Abol_Amend_no,
Nxt_Low_Class1,
Nxt_Low_Class2,
Nxt_Low_Class3,
Nxt_Low_Class4,
Sap_Nxt_Low_Class1,
Sap_Nxt_Low_Class2,
Sap_Nxt_Low_Class3,
Sap_Nxt_Low_Class4,
Central_Class,
Probation_Period,
Coll_Brg_Unit,
Coll_Brg_Sup,
Coll_Brg_Code,
Pay_Range,
Min_Pay_Step,
Min_Annual_Sal,
Max_Pay_Step,
Max_Annual_Sal,
Pay_Sched,
Leave_Part_Code,
Age_50_Ret_Code,
Occupation_Code,
Trainee_Code,
Deactivate_Code,
Pms_Overide_Code,
Residency_Waived,
Job_Category_Code,
Tdd_Unit_Code,
Position_Coverage_1,
Position_Coverage_2,
Cs_Coverage_Date,
Class_Creation_Date,
Record_Status,
Amend_Reason_Code
)
VALUES
(
@Guid,
@Class_Code,
@Sap_Class_Code,
@Effective_Date,
@Eff_Amend_No,
@Class_Title,
@Abolish_Date,
@Abol_Amend_no,
@Nxt_Low_Class1,
@Nxt_Low_Class2,
@Nxt_Low_Class3,
@Nxt_Low_Class4,
@Sap_Nxt_Low_Class1,
@Sap_Nxt_Low_Class2,
@Sap_Nxt_Low_Class3,
@Sap_Nxt_Low_Class4,
@Central_Class,
@Probation_Period,
@Coll_Brg_Unit,
@Coll_Brg_Sup,
@Coll_Brg_Code,
@Pay_Range,
@Min_Pay_Step,
@Min_Annual_Sal,
@Max_Pay_Step,
@Max_Annual_Sal,
@Pay_Sched,
@Leave_Part_Code,
@Age_50_Ret_Code,
@Occupation_Code,
@Trainee_Code,
@Deactivate_Code,
@Pms_Overide_Code,
@Residency_Waived,
@Job_Category_Code,
@Tdd_Unit_Code,
@Position_Coverage_1,
@Position_Coverage_2,
@Cs_Coverage_Date,
@Class_Creation_Date,
@Record_Status,
@Amend_Reason_Code
)
GO
I am executing the stored proc as follows:
exec usp_Insert_Met_file_New
newid(),null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null
I am getting an error saying:
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near ')'.
When I try to insert into the table directly without using stored proc, it works correctly,
but when i use the stored proc, i get the above mentioned error...
Could you suggest where is the mistake?