|
|
Archives of the TeradataForum
Message Posted: Tue, 01 Jun 2010 @ 09:33:47 GMT
Subj: | | Re: Performance of a procedure using Cursor |
|
From: | | Dmitriy.Boyko |
Hi!
Try this
WHILE (SQLCODE = 0 and newvar < 1000)
DO
FETCH cur1 into v_the_date , v_dim_loan, v_load_id,v_active ;
-- To Test , how much time it will take to update 1000 rows, I have put
this IF condition
IF newvar < 1000 THEN
UPDATE WORKDATABASE.fct1
SET RECORD_LOAD_DTTM=current_timestamp(0)
WHERE dim_loan = v_dim_loan
AND load_id = v_load_id
and the_date =v_the_date
and active =v_active;
SET newvar = newvar + 1;
END IF ;
Best regards,
Dmitriy Boyko
| |