I'm using SQL Server 2000.
My SP produces the follwing output:
It sums up all Taxable Earnings
(top result) and subtract it by the sum of Deductible Expenses
(middle result) to get the Net Taxable Income
of an employee.
How will I get the value of Net Taxable Income only?
Here's my SP
/*
DECLARE @NET_TAXABLE_INCOME AS NUMERIC(19, 2)
EXEC NET_TAXABLE_INCOME '000001', '10/15/2010', @NET_TAXABLE_INCOME OUTPUT
SELECT @NET_TAXABLE_INCOME
*/
CREATE PROC [dbo].NET_TAXABLE_INCOME
(
@EMPLOYEENO AS VARCHAR(10),
@PAYROLLPERIOD_INPUT AS DATETIME,
@NET_TAXABLE_INCOME AS NUMERIC(19, 2) = NULL OUTPUT
)
AS
BEGIN
DECLARE @TAXABALEEARNINGS AS NUMERIC(18, 2)
EXEC TAXABLE_EARNINGS_BREAKDOWN @EMPLOYEENO, @PAYROLLPERIOD_INPUT, @TAXABALEEARNINGS OUTPUT
DECLARE @DEDUCTIBLEEXPENSES AS NUMERIC(18, 2)
EXEC DEDUCTIBLE_EXPENSES_BREAKDOWN @EMPLOYEENO, @PAYROLLPERIOD_INPUT, @DEDUCTIBLEEXPENSES OUTPUT
SET @NET_TAXABLE_INCOME = @TAXABALEEARNINGS - @DEDUCTIBLEEXPENSES
SELECT @NET_TAXABLE_INCOME AS [NET_TAXABLE_INCOME]
END
Is there a SQL statement that will cause to not to print the result of EXEC
?