How to return a value from a select procedure?

Jul 15 2008 2:38 AM

Dear All,

I need ur help regarding calling the SQL procedure given below. I need to asign the value "Amount" to a new variable call "SalaryWages". When I executed this procedure using this command below but How can you assign that amount to the new variable-    ACMEERP.Execute "exec sp_GetLabourRate"

CREATE PROCEDURE sp_GetLabourRate  AS

SELECT    sum( AC_OHTYPEDET.total_value) AS Amount
FROM         AC_OHTYPE INNER JOIN
                      AC_OHTYPEDET ON AC_OHTYPE.ohtype_code = AC_OHTYPEDET.ohtype_code
WHERE     (AC_OHTYPE.ohsubcat_code = 'DL')
GO


Answers (1)