Capturing a Compute Sum
I have a stored proc:
SELECT PayTotal, PayAmount
Where Client='DEMO CLIENT'
ORDER BY PayTotal
COMPUTE SUM(PayAmount) BY PayTotal
which returns the following in SQL Query Analyzer:
I would like to return only the sum value to a textbox on an asp page
Can anybody help me please...
Re: Capturing a Compute Sum
Make a modified copy of the stored proc so it only returns your sum. From
the ASP page instantiate and open your DB connection and instantiate a
recordset object. Then use the stored proc name as your argument in the open
method of the recordset object.
In your html use this code...
<input type="text" name="mySumDisplay" value="<%= myRS(0)%>">
"Spidermake" <firstname.lastname@example.org> wrote in message
> I have a stored proc:
> Procedure test_sum
> SELECT PayTotal, PayAmount
> FROM escrowPay
> Where Client='DEMO CLIENT'
> ORDER BY PayTotal
> COMPUTE SUM(PayAmount) BY PayTotal
> which returns the following in SQL Query Analyzer:
> PayTotal PayAmount
> Null 732.2500
> Null 192.4500
> I would like to return only the sum value to a textbox on an asp page
> Can anybody help me please...
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center