调用脚本时如何使用SQL Plus变量?
我想从SQLPlus执行使用变量a的powershell脚本。 如您所见,如果您执行此代码,则A尚未识别。我希望此代码打印22,而不是:
variable a varchar2;
a='22'
host powershell.exe echo :a
host powershell.exe echo a
:a
a
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用替换变量:
如果您已经通过不想更改的过程定义和填充了绑定变量,则可以使用虚拟查询和
列设置替换变量值... new_value 语法。
You could use a substitution variable:
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.