Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 22 Feb 2008 @ 20:11:21 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

Subj:   Re: Stored Procedure error SPL1031
From:   Fred W Pluebell

You can't reference a non-aliased cursor expression within the loop, so add an alias in your cursor specification

e.g. SELECT UserName AS UserName

To pass the name as a parameter, you'll have to use Dynamic SQL (and of course observe the restrictions for doing so)

e.g. CALL DBC.SysExecSQL('REVOKE Logon ON ALL TO '||userid)

And you probably need to declare USERID larger than 8

e.g DECLARE userid CHAR(30)

  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020