Given the following in Query Analyzer:
DECLARE @f datetime,
@t datetime,
@c int,
@a int
SET @f = '19980801'
SET @t = '19980901'
EXEC Batch_Stuff @f, @t, @c OUTPUT, @a OUTPUT
Calling the following Stored Procedure:
CREATE PROCEDURE [dbo].[Batch_Stuff]
@fromdate datetime,
@todate...