Archives of the TeradataForum
Message Posted: Fri, 01 Oct 2010 @ 16:47:14 GMT
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
|