Forums
This topic is locked
Im New Calculation Help!!!
Posted 02 Oct 2007 18:59:21
1
has voted
02 Oct 2007 18:59:21 Graham Hefford posted:
HiIm new to ASP, so excuse the simple question.
I am using Dreamweaver to and I need to subtract the Valve from one database field from another databse field, and show this calcualtion on the same page. basically PLAN V ACTUAL = GAP. The page refeshes every 60 secs to display the refreshed production figures
Can any help me with the code needed..
Thanks Graham
Replies
Replied 05 Oct 2007 18:55:49
05 Oct 2007 18:55:49 Lee Diggins replied:
Hi Graham
Welcome to DMXZone.
You can do this in two places, either at the database when processing the SQL statement or in the asp page.
SQL would be something like:
SELECT id, plan, value, plan - value AS [Total]
In the asp page something like:
<%= rs.item("plan".value - rs.item("value".value %>
You need to post more details if you get stuck.
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
Welcome to DMXZone.
You can do this in two places, either at the database when processing the SQL statement or in the asp page.
SQL would be something like:
SELECT id, plan, value, plan - value AS [Total]
In the asp page something like:
<%= rs.item("plan".value - rs.item("value".value %>
You need to post more details if you get stuck.
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>