TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mohammed shamsheer
NA
394
143.6k
error in stored procedure 'x' not permitted int his context
Jul 30 2013 8:33 AM
error : The name "EmpBenefitDeductID" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
CREATE PROCEDURE InsertEmployeeBenefitsDeducts
(
@BranchID bigint,
@EmployeeID bigint,
@BenefitDeductionID bigint,
@AffectOnLeave bit,
@Amount decimal(18,4),
@CreatedUserID bigint,
@CreatedDate datetime,
@ModifiedUserID bigint,
@ModifiedDate datetime
)
AS
DECLARE @EmpBenefitDeductID as bigint
SELECT @EmpBenefitDeductID=ISNULL(MAX(EmployeeBenefitsDeducts.EmpBenefitDeductID),0)FROM EmployeeBenefitsDeducts
SET @EmpBenefitDeductID=@EmpBenefitDeductID+1
INSERT INTO EmployeeBenefitsDeducts VALUES
(
EmpBenefitDeductID,
BranchID,
EmployeeID,
BenefitDeductionID,
AffectOnLeave,
Amount,
CreatedUserID,
CreatedDate,
ModifiedUserID,
ModifiedDate
)
VALUES
(
@EmpBenefitDeductID
@BranchID ,
@EmployeeID ,
@BenefitDeductionID ,
@AffectOnLeave ,
@Amount (18,4),
@CreatedUserID ,
@CreatedDate ,
@ModifiedUserID ,
@ModifiedDate
)
SELECT @EmpBenefitDeductID
Reply
Answers (
5
)
how to select top 7th and 10th marks from two tables
Remove duplicate entry