Iam abhilash ..
suppose we have 4 fields .. like Empid ,Name,Salary,NetPay..
who's employees earn < 5000 salary those people get 10% comission so that employees salary +comission ..updated into NetPAy column in same table four fields..
i need stored procedure ....
this is my mail id ..
thank you...
Pankaj PandeyPosted Jul 24, 2013, 12:52 AM
as
begin
update tablename
set salary= case
when salary< 5000 then salary * 1.1
else salary
end
end
Jignesh TrivediPosted Jul 23, 2013, 11:00 PM
I think this duplicate so please mark asd close
http://www.c-sharpcorner.com/Forums/Thread/220269/need-help-about-stored-procedure.aspx
Sanjeeb LenkaPosted Jul 23, 2013, 4:07 PM
CREATE PROCEDURE hike
AS
BEGIN
UPDATE yourtablename
SET NetPay = CASE
WHEN Salary < 5000 THEN Salary * 1.1
ELSE Salary
END
END