|Use retrieved selected column into Windows cmd variable [message #173315]
||Sun, 21 May 2006 14:35
Registered: April 2005
I need some help on the following.
I am working on a Windows command file that does the following:
- Start sqlplus, connect to a database to collect a password for a specific user
- Put this password into a variable
- Start sqlplus again (in the same cmd file) and connect with that user and the retrieved password.
I don't know how to code it in the cmd file.
Can i use a selected column as variable into a cmd file?
Something like this:
sqlplus -s system@xe/%SQLPASSWORD% @%SQLFILE% > %SQLPLUS_OUTPUT%
After here i want to use the collected password in the next command
sqlplus -s jan@xe/%PASSWORD% (password should be retrieved from the sql beneath)
select password from schema.pwd where user= 'JAN';
Any help is appreciated.
Thanks in advance,