Skip to Main Content

SQLcl: MCP Server & SQL Prompt

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!

How to run a script with a dollar sign in the file name from SQLcl?

I have a file named test$file.sql and I like to run it from SQLcl (22.4.0.342.1215) from Linux (and macOS). I tried the following:

SQL> @test$file.sql

Error starting at line : 1 in command -
@test$file.sql
Error report -
SP2-0310: Unable to open file: "test.sql"
SQL> @test\$file.sql

Error starting at line : 1 in command -
@test\$file.sql
Error report -
SP2-0310: Unable to open file: "test\.sql"
SQL> @"test$file.sql"
SQL> @"test$file.sql"

Error starting at line : 1 in command -
@"test$file.sql"
Error report -
SP2-0310: Unable to open file: "test.sql"

Has anyone an idea how to escape the $ from SQLcl?

Thanks!

This post has been answered by User_3ABCE on Feb 28 2023
Jump to Answer
Comments
Post Details
Added on Feb 28 2023
11 comments
825 views