943,691 Members | Top Members by Rank

Ad:
Nov 3rd, 2003
0

Auto update columns?

Expand Post »
Hi! Can anyone please provide me with a little bit of information regarding this subject? I think I've heard from a lecturer that there is a command to auto-update the entries of a table. For example, when a new record is inserted, the salary column would be auto-inserted with (rough_salary - tax_rate) without having the user to key in the salaries. In case, it is trigger you are thinking of, I don't think that is it. Anyone get me? Thanks.
Similar Threads
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
Nov 4th, 2003
0

Re: Auto update columns?

Well to my knowledge of SQL or Access for that matter. It would be a trigger that does something like that. There is no other way to update a column automatically via a calculation without using a trigger.

So I would be extremely surprised that there is another way. Stored Procedures or Triggers is the only method I know of.

Sorry if that was of no help!
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
Nov 4th, 2003
0

Re: Auto update columns?

Umm...thanks a lot anyway. Actually, I am supposed to create a data warehouse. Knowing that data warehouse has all the following characteristics: non-volatile, time variant, integrated, subject-oriented; which is why trigger was not allowed by my lecturer.
Reputation Points: 53
Solved Threads: 1
Posting Whiz
red_evolve is offline Offline
313 posts
since Jun 2003
Nov 4th, 2003
0

Re: Auto update columns?

OK...but how does that affect the use of Trigger?

You say time variant (trigger is not), non-volatile (huh?), subject oriented (nothing to do with a trigger). So I am confused as to how else you can do it.

For interest sake, I would love to know...truly love to know, how else you would ever do it.
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
Nov 16th, 2003
0

Re: Auto update columns?

My only idea would be to perform your calculations using a web based (PHP, CGI, ASP, etc) script to re-evaluate any fields that may need adjusting due to changing data in another field.

I guess it would all depend on the DB, the interface, and options available. The only ones I've worked with have been SQL systems that are accessable to a web-based script.

As far as a field that is automatically updated by the db itself by simply updating another field... I'm clueless.
Reputation Points: 11
Solved Threads: 0
Junior Poster in Training
himerus is offline Offline
82 posts
since Aug 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: dell.com shopping cart save feature
Next Thread in Database Design Forum Timeline: Rebus





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC