General discussion

Locked

Stored procedures in SQL Query Analyzer

By wdmeyer ·
How do I see an output total when I run a stored procedure in SQL Query Analyzer. The procedure sums an amount field into an OUTPUT field but when I run it in the Query Analyzer I dodn't see the result.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by michaeltan In reply to Stored procedures in SQL ...

If i'm not misunderstand you... you can try below stmt

--------------------
use Northwind
go

CREATE PROCEDURE Northwind_Order_Sum @OrderID char(6) AS
SET NOCOUNT ON
BEGIN
select sum(unitPrice*quantity) as Total from [order details] where OrderID=@OrderID
group by OrderID
END

-------------------------
exec Northwind_Order_Sum 10248

Collapse -

by wdmeyer In reply to

Poster rated this answer.

Collapse -

by wdmeyer In reply to Stored procedures in SQL ...

This question was closed by the author

Back to Networks Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums