SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 increment the value of an entity in period of time
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jonekim
Starting Member

Nepal
35 Posts

Posted - 04/04/2012 :  10:34:36  Show Profile  Reply with Quote
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 - 04/04/2012 :  10:54:50  Show Profile  Reply with Quote
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

Nepal
35 Posts

Posted - 04/04/2012 :  11:53:30  Show Profile  Reply with Quote
@ 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
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 04/04/2012 :  12:53:49  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
SQL Agent and a scheduled job.

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

X002548
Not Just a Number

15586 Posts

Posted - 04/04/2012 :  12:58:40  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000