I have a stored procedure that returns (outputs) data. I need the procedure to 1) accept input date from VB front end and 2) return the results into a flexgrid. Here is the stored procedure:
CREATE PROCEDURE [DBO].[CHKREC] AS
DECLARE @VDD1 CHAR(1)
DECLARE @VDD0 CHAR(1)
SET @VDD0 = ''
SET @VDD1 = 'C'
CASE WHEN SRCDOCTYP = '6' THEN '00' END AS RC,
CASE WHEN RECONUM = '0' THEN 'NOT CLEARED' END AS NOT_CLEARED,
CASE WHEN CHEKBKID like 'KEY BANK FLA' THEN ('00000'+'XXXXXXXXXX') END AS AcctNum,
RTRIM('000'+ CMTRXNUM) as CheckNum,
Right('0000000000' + Replace(Cast(TRXamnt as varchar), '.', ''), 10) AS AMOUNT,
CASE WHEN VOIDED = '1' THEN @VDD1 ELSE @VDD0 END AS VOIDED
WHERE SRCDOCTYP =6 AND CHEKBKID = 'KEY BANK FLA' AND POSTEDDT >= '08/25/05' and reconum = '0' and CMTRXNUM LIKE '0%'
order by CMTRXNUM
I just created this procedure (first time) and the syntax checks out. How do I test to make sure the procedure works?