Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 01 Oct 2010 @ 16:47:14 GMT


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


Subj:   Re: Macro for changing a password
 
From:   Geoffrey Rommel

This cannot be done in a macro. The reason is that an actual parameter in a macro is equivalent to a literal (in this case, a single-quoted string). Thus this:

     PASSWORD=:pswd

will be interpreted as:

     PASSWORD='mynewpw'

But the syntax for MODIFY USER requires that the password be specified as a bareword or identifier, not a literal, like so:

     PASSWORD=mynewpw  -or-  PASSWORD="mynewpw"

Therefore, you will have to use dynamic SQL, either in a stored procedure or in some other application that allows dynamic SQL (e.g. C/PP2 or Perl).

x

     
  <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: 15 Jun 2023