PowerCenter
- PowerCenter 10.5.1
- All Products
CREATE PROCEDURE get_name_using_id ( IN id_in int, OUT emp_out char(18), OUT sqlcode_out int) LANGUAGE SQL P1: BEGIN -- Declare variables DECLARE SQLCODE INT DEFAULT 0; DECLARE emp_TMP char(18) DEFAULT ' '; -- Declare handler DECLARE EXIT HANDLER FOR SQLEXCEPTION SET SQLCODE_OUT = SQLCODE; select employee into emp_TMP from doc_employee where id = id_in; SET emp_out = EMP_TMP; SET sqlcode_out = SQLCODE; END P1