Hii ...
Iam abhilash ..
we have four feilds like Empid,name,salary,Netpay,,,
who earn <5000 salary those people get 10% hike added to salary updated into Netpay column
i nees stored procedure
this is my mail id: [email protected]
thank you
Need stored procedure
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 23, 2013, 12:05 PM EDT
CREATE PROCEDURE hike
AS
BEGIN
UPDATE yourtablename
SET NetPay = CASE
WHEN Salary < 5000 THEN Salary * 1.1
ELSE Salary
END
END
Jignesh TrivediRank #16 · 50.3K reputationPosted Jul 23, 2013, 7:11 PM EDT
I think this duplicate post of
http://www.c-sharpcorner.com/Forums/Thread/220269/need-help-about-stored-procedure.aspx
so can please close it?
Pankaj PandeyRank #642 · 3.7K reputationPosted Jul 23, 2013, 8:49 PM EDT
as
begin
update tablename
set salary= case
when salary< 5000 then salary * 1.1
else salary
end
end
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 23, 2013, 8:56 PM EDT
Try like this
update Emptable
set Netpay=CASE WHEN salary<5000 THEN Netpay+((salary*10/100))
ELSE Netpay end
Regards,
Iftikar