[英]How do i set working directory in sql developer in code
I'm using sql developer. 我正在使用sql developer。
I want to run some scripts. 我想运行一些脚本。
I don't want to have to include the folder name in the call to each script. 我不想在每个脚本的调用中包含文件夹名称。
But I also want to use a variable to include the directory to look in (the working directory). 但我也想使用一个变量来包含要查看的目录(工作目录)。
I can do this but i am having trouble with folder names with spaces (this is in windows). 我可以这样做,但我遇到了带空格的文件夹名称(这是在Windows中)。
Can anyone help me work out how to do this without having to rename my folder to remove spaces? 任何人都可以帮我解决如何做到这一点,而无需重命名我的文件夹以删除空格?
define dir="c:\Users\xx\Google Drive\Analytics\Recruitment\NSL\2. Data Understanding\Code"
@&dir\cb_nsl_impairments.sql;
Returns error 返回错误
SP2-0310: Unable to open file: "c:\Users\xx\Google.sql"
Oops. 哎呀。 Solved it. 解决了它。
Just needed double quotes around the script call: 围绕脚本调用只需要双引号:
@"&dir\cb_nsl_impairments.sql"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.