|
|
Archives of the TeradataForum
Message Posted: Mon, 21 Apr 2003 @ 12:23:44 GMT
Subj: | | Re: Stored procedure warning.. |
|
From: | | Jaganathan, Rameshkumar |
I believe this will help you
REPLACE PROCEDURE spsample4()
BEGIN
DECLARE v_num INTEGER;
DECLARE v_empcode varchar(6);
DECLARE v_basic DEC(10,2);
FOR CustCursor AS c_customer CURSOR FOR
SELECT num,empcode,basic FROM EMPLOYEE
DO
SET v_num = CustCursor.num;
SET v_empcode = CustCursor.empcode;
SET v_basic = CustCursor.basic;
INSERT INTO test_emp (num,empcode,basic) VALUES
(:v_num,:v_empcode,:v_basic);
END FOR;
END;
Ramesh
| |