Skip to Main Content

SQL Developer for VS Code

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bug: Syntax Error When Using Script Command with Arguments

The script command accepts arguments for a called script. This is not documented for SQLcl 24.3, but the global variable args is documented on the Oracle GitHub repo and an example of how to use args is provided here. So, IMO the intent to support arguments for the script command is clear.

Here's the screenshot showing a syntax error when using the script command with arguments in SQL Developer Extension for VSCode 24.4.1:

In the lower-left corner, you see that the statement works in SQLcl.

Here are the sources:

script hello.js World
ctx.write('Hello, ' + args[1] + '!' + '\n');

It would be cool if the documentation for SQLcl regarding the script command could be updated and the syntax error fixed.

Thx.

Comments
Post Details
Added on Dec 27 2024
3 comments
229 views