sql stored procedure for insert

Mar 13 2010 7:33 AM

Hi,
Iam creating stored procedure for insert statement but it is giving error that
must declare scalar varialbe empno (i am not understanding) please help me onthis
create
procedure proc
(

@empno
varchar(50) not null,
@leaveappdate
varchar(50) not null,
@leavetype
varchar(50) not null,
@balance
varchar(50) not null,
@fromdate
varchar(50) not null,
@todate
varchar(50) not null,
@fromduration
varchar(50) not null,
@toduration
varchar(50) not null,
@noofdays
varchar(50) not null,
@sanctionauthority
varchar(50) not null
)

as
insert
into CasualRestrictedLeaves values(@empno ,@leaveappdate ,@leavetype varchar(50),@balance ,@fromdate ,@todate ,@fromduration ,@toduration ,@noofdays ,@sanctionauthority );

Answers (2)