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
 Database Design and Application Architecture
 increment the value of an entity in period of time

Author  Topic 

jonekim
Starting Member

35 Posts

Posted - 2012-04-04 : 10:34:36
I am designing a database in which the value of an item should be auto increased after continuous time.

suppose I've an entity; interestRate whose value is initially 15 initially. Now after 10 days it should be 16 and go on increasing by unit value within the interval of 10 days.

Can I do it with sql code?

X002548
Not Just a Number

15586 Posts

Posted - 2012-04-04 : 10:54:50
ummm...yes...sql and a scheduled job....

BUT...why the arbitrary updates???

Sounds dangerous and misleading...got a good reason why you want to do this?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

jonekim
Starting Member

35 Posts

Posted - 2012-04-04 : 11:53:30
@ X002548.
Thanks for the reply.
ya sometimes it is tedious to manually update the values.
in my case, the value of interestRate is increasing periodically not arbitrarily. Its increasing with time, unit increase in 10 days.
Can i do it from sql or I've to use servlet programing(i am using C# and asp.net)?
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2012-04-04 : 12:53:49
SQL Agent and a scheduled job.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-04-04 : 12:58:40
quote:
Originally posted by jonekim
in my case, the value of interestRate is increasing periodically



I have never heard of such a thing.

Are you sure this is not derived data?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -