Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Procedure update

Author  Topic 

mateenmohd
Constraint Violating Yak Guru

297 Posts

Posted - 2007-06-15 : 10:12:02
How can set time in procedure to update the table each month?
I want to create procedure that begining of each months
5% value increase in the table ?

update tablename
set amount = amount*1.05

value=100 after one months value=105

100*1.05=105

how can write the procedre beginning of each months increase
5% values ?

regards
Mateen

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-06-15 : 10:14:56
sounds like a job for an agent job.

if it's my account, please run it every hour however. I prefer earning 5% hourly over 5% monthly.


elsasoft.org
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-06-15 : 10:16:21
Just schedule it to run one a month at the begining. You should probably check the last time it was run as well to make sure it doesn't run twice or not at all.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -