This topic is locked

subtract two fields

2/14/2004 5:32:31 PM
ASPRunnerPro General questions
L
longhorn author

I have two fields that I want to subtract. Then display the result in a new field.
Let's say that I have a field named "SalePrice" and a field named "PurchaseCost". I want to return the value (SalePrice - PurchaseCost) as Profit. How can I display that result as a third field calculated for each record?

Sergey Kornilov admin 2/14/2004

You can modify default SQL query in ASPRunner to add calculated field:

select ...,

SalePrice - PurchaseCost as Profit

from TableName


This is all you need to do to display profit for each record.