问题的续集
define a='eee"dd'
prompt &a -- eee"dd OK
host powershell.exe echo '&a'; -- eeedd not OK
host powershell.exe echo &a; -- eeedd not OK正如您所看到的,我无法在powershell中打印来自sql的引号。有什么办法可以做到吗?
我已经尝试过Alex的解决方案,当值来自一个query.But时,如果有多个引号字符串,它就不能工作。
column a new_value a
select replace('eee"d"d', '"', '""') as a from dual;
prompt &a -- eee""d""d Ok as expected
host powershell.exe echo '"&a"'-- eee"dd instead of eee"d"d发布于 2022-06-07 09:31:59
column a new_value a
select replace('eee"d"d', '"', '\"') as a from dual;
host powershell.exe echo '&a'为我工作
https://stackoverflow.com/questions/72527899
复制相似问题