April 23, 2013 at 7:34 am
Hi,
I am inserting value in a table Gv_storeAllocation for column STNNo i have created a stored procedure.
Can anyone tell me how to store output of that stored procedure in a variable @StnNo?
INSERT INTO GV_StoreAllocation (StoreId, STNNo, FirstVoucherNo, LastVoucherNo, Quantity)
SELECT
DISTINCT @storecode,
EXEC @STNNo = dbo.GetSTNValue @storecode , 0 ,'',
@FirstVoucherID,
@lastvoucherID,
@quantity
FROM GV_Voucher gv
JOIN GV_VoucherStatus gvs ON gv.VoucherStatusId = gvs.VoucherStatusId
WHERE gvs.VoucherStatus = 'Active at HO
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
April 23, 2013 at 7:41 am
yess I can do it 🙂
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
April 24, 2013 at 6:52 am
please share
April 24, 2013 at 6:59 am
aaron.reese (4/24/2013)
please share
Declare @STNno varchar(10)
EXEC dbo.GetSTNValue @storecode , 0 ,@stnno OUT
INSERT INTO GV_StoreAllocation (StoreId, STNNo, FirstVoucherNo, LastVoucherNo, Quantity)
SELECT
DISTINCT @storecode,
@STNno,
@FirstVoucherID,
@lastvoucherID,
@quantity
FROM GV_Voucher gv
JOIN GV_VoucherStatus gvs ON gv.VoucherStatusId = gvs.VoucherStatusId
WHERE gvs.VoucherStatus = 'Active at HO
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply