简体   繁体   English

如何在代码中设置sql developer中的工作目录

[英]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.

相关问题 如何在SQL Developer中将替换变量设置为查询结果? - How do I set a substitution variable to the result of a query in SQL Developer? SQL 开发人员我如何设置或比较基于月份的日期列 - SQL Developer how do i set or compare a date column based on month 如何比较两个查询的执行时间是 SQL Developer? - How do I compare execution time of two queries is SQL Developer? 如何在SQL Developer的查询的WHERE子句中使用unicode? - How do I use unicode in the WHERE clause of a query in SQL Developer? 如何在 Oracle Sql developer 中查看 Explain Plan? - How do I view the Explain Plan in Oracle Sql developer? 如何在Oracle SQL Developer中编辑BLOB(包含JSON)? - How do I edit BLOBs (containing JSON) in Oracle SQL Developer? 如何在 Oracle SQL Developer 中使用变量? - How do I use variables in Oracle SQL Developer? 如何通过在 SQL 工作表上运行脚本在 SQL Developer 上创建表? - How do I do create a table on SQL Developer by running a script on the SQL Worksheet? SQL Developer:如何将“ SQL数组提取大小”增加到大于最大值。 500? - SQL Developer: How do I increase the 'SQL Array Fetch Size' greater than the max. 500? 如何在 SQL DEVELOPER 的表中设置主键的自动递增? - How can I set auto increment of a primary key in the table in SQL DEVELOPER?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM