Hello all –
Using: UDB DB2 V8 & CR 9
Really appreciate your help!
I am trying to set-up an SP with input parameters to accept multiple values from the CR front-end.
The input parm is string.
The user has an option to choose from the list of values (FUND), could select one, two or all.
Using: UDB DB2 V8 & CR 9
Really appreciate your help!
I am trying to set-up an SP with input parameters to accept multiple values from the CR front-end.
The input parm is string.
The user has an option to choose from the list of values (FUND), could select one, two or all.
Code:
CREATE PROCEDURE BASYS.WITHD_LIAB ( IN EMPLOYER VARCHAR(9),
[COLOR=red]??? IN INCLUDE_FUND VARCHAR(250),[/color red]
IN FROM_DATE DATE,
IN TO_DATE DATE )
DYNAMIC RESULT SETS 1
------------------------------------------------------------------------
-- SQL Stored Procedure
-- EMPLOYER
-- FUND
------------------------------------------------------------------------
P1: BEGIN
-- Declare cursor
DECLARE p_employer VARCHAR(9);
DECLARE p_incl_fund VARCHAR(250);
DECLARE p_exl_fund VARCHAR(250);
DECLARE cursor1 CURSOR WITH RETURN FOR
SELECT
CONT_DETAIL.EMPLOYER_NUMBER
,CONTRACTS_FUND_TO_FUND.TO_RATE AS RATE
,CONT_DETAIL.CONT_DETAIL_KEY
FROM
CONT_DETAIL,
CONT_DETAIL_FUND,
WHERE
[COLOR=red] AND ltrim(RTrim(CONTRACTS_FUND_TO_FUND.TO_FUND)) in
( 'CTP'
'WFP' , ‘LFP’) [/color red]