Active Batch - Using variable inside a SQL active variable

680 Views Asked by At

I am trying to set up automation for a process in which I want to use SQL variables. There is no problem with this part of it as long as I use this script, I can run the jobs in one environment.

SELECT DatabaseServer FROM v_view WHERE Profile = 'Profile1' AND Environment = 'TEST'

However, I would like to solve it by putting a variable in the variable I grab from SQL, and depending on which "folder" in Active Batch it is in, it will utilize that variable.

SELECT DatabaseServer FROM v_view WHERE Profile = '$Variable' AND Environment = 'TEST'

Is there any way to do this? Maybe using a Powershell script and inserting the SQL query into it?

0

There are 0 best solutions below