Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    1

    Talking Unanswered: How do I perform a calculation in a Table Field?

    I have a table and one of the columns has a price running thru it (Currency Formatted). I have another field in the Table which is empty.

    How do I populate the empty field with a calculation done on the price field? Say: Price field X 110%. I don't want the answer in a query. I want the answer in the same table.
    Is there a way to do this?

    Thanks for the help

  2. #2
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    228
    is this a one time action or do you need to update the data constantly (inserts/updates)?
    an update query (UPDATE some_table set empty_field = price*1.1) can easily do it once or multiple times but obviously it won't update the field automatically when new records are inserted or the price is updated.
    if your data changes a lot what about using a query with a computed column? you can even do that transparently to your exising app by renaming the the table and naming the query like the old table.

    access does not support transparently computed colums in tables. if you _really_ need that feature you need to upgrade to one of the "real" rdbms out there although i couldn't see why you would.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •