In Borland Delphi, it's called a "calculated Field". Normally, you
would derive the results
from a set or group of fields to get the total and display them either
on the screen
or when printing them to a report, but *never* would you save the
total to the database.
Like what The_Fruitman says, check your design first.


Cheers!


Benj




On Sep 16, 10:50 pm, The_Fruitman <[email protected]> wrote:
> Try it and see if it works.
>
> On a design note though, why would you want to store a computed field
> in a database.  This is a waste of storage space.  Review your design
> to see if there is a better way to do this.
>
> On Sep 15, 11:26 pm, Carnage <[email protected]> wrote:
>
> > Can you perform logic directly with Parameters in a SQL Query?
>
> > Simple example would be something like This.  You have a database
> > based on orders for Oranges, Apples, and Pears.  A User will input the
> > Values for the three types of fruit and you want a fourth field
> > "Total_Fruit" to be filled in automatically.
>
> > Would Something like...
>
> > ' Update Orders set Oranges = @Oranges, Apples = @Apples, Pears =
> > @Pears, Total_Fruit = (@Oranges + @Apples + @Pears) where OrderID =
> > @OrderID" work?  Or do you have to manipulate the logic using a
> > script?  Or is there a completely different way to do something like
> > this that is generally better?

Reply via email to