technoknow
Technical User
Hi,
I want to multiply order_price * quantity for each record in a recordset
and them get the sum of all records.
Here is my query.
<% strQuery ="Select order_price, orderid, quantity " & _
"FROM orderline " & _
"WHERE orderid = " & intOrderID %>
Here is how I'm trying to multiply the records and get the sum in sglSubTotal
<% Do While Not rsOrderTotal.EOF %>
<% sglSubTotal =rsOrderTotal("ORDER_PRICE" * rsOrderTotal("QUANTITY" %>
<% rsOrderTotal.MoveNext %>
<% Loop %>
Can someone lead me in the right direction? Do I need to make a static
variable?
Thanks,
Jim
I want to multiply order_price * quantity for each record in a recordset
and them get the sum of all records.
Here is my query.
<% strQuery ="Select order_price, orderid, quantity " & _
"FROM orderline " & _
"WHERE orderid = " & intOrderID %>
Here is how I'm trying to multiply the records and get the sum in sglSubTotal
<% Do While Not rsOrderTotal.EOF %>
<% sglSubTotal =rsOrderTotal("ORDER_PRICE" * rsOrderTotal("QUANTITY" %>
<% rsOrderTotal.MoveNext %>
<% Loop %>
Can someone lead me in the right direction? Do I need to make a static
variable?
Thanks,
Jim