Re: stored proc RETURN_VALUE.... there it is, I want to use it !!!
- From: "Ron" <noone@xxxxxxxxxxx>
- Date: Wed, 27 Apr 2005 20:42:28 +0100
Hi Betsy,
I have just looked at your latest SQL code, and I think you need:
CREATE PROCEDURE dbo.getPayments
@meetingCode char(6),
@guestid char(10),
@total int OUTPUT
AS
SELECT @total = SUM(amount)
FROM dbo.payments
WHERE meetingCode = @meetingCode and guestid = @guestID
GO
Then you can read the value of @total after closing the query.
HTH
Ron.
"Betsy" <betsy.a.tainer@xxxxxxxxxxxxx> wrote in message
news:426fdc0b$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> forgot my stuff:
>
> here's the stored proc as it exists at this moment:
> CREATE PROCEDURE dbo.getPayments @meetingCode char(6), @guestid char(10)
AS
> select sum(a.amount) as total from dbo.payments a
> where (A.meetingCode= @meetingCode) and (a.guestid = @guestid)
> GO
>
<snip>
.
- References:
- stored proc RETURN_VALUE.... there it is, I want to use it !!!
- From: Betsy
- Re: stored proc RETURN_VALUE.... there it is, I want to use it !!!
- From: Brian Bushay TeamB
- Re: stored proc RETURN_VALUE.... there it is, I want to use it !!!
- From: Betsy
- stored proc RETURN_VALUE.... there it is, I want to use it !!!
- Prev by Date: Re: stored proc RETURN_VALUE.... there it is, I want to use it !!!
- Next by Date: Re: Cannot Connect ADOConnection at Run-Time
- Previous by thread: Re: stored proc RETURN_VALUE.... there it is, I want to use it !!!
- Next by thread: Re: stored proc RETURN_VALUE.... there it is, I want to use it !!!
- Index(es):
Relevant Pages
|