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.

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!

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.

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.

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. ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.