Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / July 2005

Tip: Looking for answers? Try searching our database.

Entering calculated results into table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dennis A. - 16 Jul 2005 11:12 GMT
Can I enter the results from a calculation into a field in a table?  For
example, if my table has three fields: Price, Cost, and Profit, how can I get
the profit to be calculated and inserted automatically into the Profit Field?
I can do it easily in a query and/or form, but I can't seem to capture the
result in a table.  Thanks.
Rick Brandt - 16 Jul 2005 13:49 GMT
> Can I enter the results from a calculation into a field in a table?
> For example, if my table has three fields: Price, Cost, and Profit,
> how can I get the profit to be calculated and inserted automatically
> into the Profit Field? I can do it easily in a query and/or form, but
> I can't seem to capture the result in a table.  Thanks.

That's because it doesn't belong in the table.  You know how to do it in a query
so use a query.  Going through extra steps to push the result into the table is
incorrect thinking in a database application.  You store base data and you
"calculate" calculated data when you need it.

This is what computers are good at so let them do it.

Signature

I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com

peregenem@jetemail.net - 18 Jul 2005 10:43 GMT
> > Can I enter the results from a calculation into a field in a table?
>
> it doesn't belong in the table.
> incorrect thinking in a database application.  You store base data and you
> "calculate" calculated data when you need it.

"You are not supposed to put a calculated column in a table in a pure
SQL database ...too bad the real world is not as nice as the
theoretical world. There are many types of calculated columns. The
first are columns which derive their values from outside the database
itself. The most common examples are timestamps, user identifiers, and
other values generated by the system or the application program. This
type of calculated column is fine and presents no problems for the
database... The third type of calculated data uses data in the same
table, but not always in the same row in which it will appear. The
fourth type uses data in the same database. These last two types are
used when the cost of the calculation is higher than the cost of a
simple read. In particular, data warehouses love to have this type of
data in them to save time."

http://www.dbazine.com/ofinterest/oi-articles/celko4
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.