I'm wondering if there is a way to utilize environment variables in a tsql script that will be run from both a vortex script using exec, as in:
<$scriptFile="/somepath/myscript.sql">
<exec FROMFILE=$scriptFile BKGND -- tsql -d $masterDb>
</exec>
as well as from the command line, as in:
tsql < /somepath/myscript.sql
and where a line in myscript.sql might look something like:
SELECT * FROM %TABLEVAR%;
Also, if something like this *is* possible, where and how do I set the environment variable TABLEVAR?
Thanks.
<$scriptFile="/somepath/myscript.sql">
<exec FROMFILE=$scriptFile BKGND -- tsql -d $masterDb>
</exec>
as well as from the command line, as in:
tsql < /somepath/myscript.sql
and where a line in myscript.sql might look something like:
SELECT * FROM %TABLEVAR%;
Also, if something like this *is* possible, where and how do I set the environment variable TABLEVAR?
Thanks.