Subject | Calcualtion of a formula within a database |
---|---|
Author | paultugwell |
Post date | 2005-02-23T13:58:40Z |
I have an application written in Delphi using an FB1.5 database. One
table in the database contains a formula which is used in Delphi to
perform a calculation by subsituting numbers for the symbols in the
formula and then calcualting the answer as a float. It is used to
calculate a weight from dimesions and densities for materials of
different shapes, each entry in the table having a formula
appropriate to its shape. For example the formula might be A * B / C.
The Delphi code would substitue numbers for A, B and C then calculate
the resulting numberic expression. Is ther a way of performing this
type of operation inside a stored procedure passed values for the
symbols which would return a numeric result?
table in the database contains a formula which is used in Delphi to
perform a calculation by subsituting numbers for the symbols in the
formula and then calcualting the answer as a float. It is used to
calculate a weight from dimesions and densities for materials of
different shapes, each entry in the table having a formula
appropriate to its shape. For example the formula might be A * B / C.
The Delphi code would substitue numbers for A, B and C then calculate
the resulting numberic expression. Is ther a way of performing this
type of operation inside a stored procedure passed values for the
symbols which would return a numeric result?