0

I want to execute a powershell script from sqlplus which use a the variable a. As you can see if you execute this code, a isn't recognized. I would like this code to print 22, not a or :a

variable a varchar2;
a='22'
host powershell.exe echo :a
host powershell.exe echo a

:a

a

1 Answer 1

1

You could use a substitution variable:

define a=22

host powershell.exe echo &a

If you already have the bind variable defined and populated by a process you don't want to change, you can set the substitution variable value using a dummy query and column ... new_value syntax.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.