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...
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL