Archives of the TeradataForum
Message Posted: Fri, 22 Feb 2008 @ 20:12:56 GMT
| Subj: || || Re: Stored Procedure error SPL1031 |
| From: || || Mohommod.Khan |
I don't think the Revoke command will work directly here as you are trying to code. I think what you need is to look on dynamic SQL using the
SYSEXECSQL. Also notice the syntax. So some thing like this may work for you. I have not tested it but I think you got the idea....
DECLARE STR VARCHAR(1000) DEFAULT ' ';
DECLARE USERID CHAR(30) DEFAULT ' ';
--Start your Loop here ---
SET STR= 'REVOKE LOGON ALL FROM '
|| ';' ;
CALL DBC.SYSEXECSQL (:STR);
------ END -----