Hi,
I am doing a select in a procedure with a cursor, I would to know If I could do the same select without using a cursor.
The code is this:
Code |
---|
PROCEDURE "DOUGLAS"."tmp.douglas.yahoo::testando" ( ) LANGUAGE SQLSCRIPT SQL SECURITY INVOKER DEFAULT SCHEMA DOUGLAS AS BEGIN /***************************** procedure logic *****************************/
declare R varchar(50);
declare cursor users FOR select * from USERS WHERE CREATE_TIME between ADD_SECONDS (CURRENT_TIMESTAMP , -7200 ) and CURRENT_TIMESTAMP;
FOR R AS users DO CALL _SYS_REPO.GRANT_ACTIVATED_ROLE('dux.health.model.roles::finalUser',R.USER_NAME);
END FOR;
END; |
Thank's;