One way is to use an operating command or batch file to dynamically generate a SQL script (using the environment variables as you wish) that can be executed by SQL*PLUS.
For instance (Windows cmd file):
Code:
ECHO select * from filename > script.sql
ECHO where columnname = '%xxx%' >> script.sql
ECHO exit >> script.sql
%orclhome%\BIN\SQLPLUS.EXE -silent sys/password @script.sql
DEL script.sql
While there are clever ways to get information from
the operating system (pipes, extproc, etc), there is a lot of information in v$parameter and v$session that may be of use to you as well...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.