Set / at the end of package

Daniele

Member³
Hello to all,
is there a way to insert backslach (/) at the end of the package (header and body) without the error:
Error: PLS-00103: Encountered the symbol "/" The symbol "/" was ignored.
 
That's not a backslash. Backslash is: \
If you are using PL/SQL Developer's "Program Window", then it will save the forward slash character ("/") for you when you'll save it to file.
The slash character is NOT part of header or body (it's simply a mean to tell the application, whether it's SQL*Plus or PL/SQL Developer or anything else, where the object's definition ends and it does not have to be the slash character - SQL*Plus has this configurable) and that's probably why PL/SQL Developer does not show it.
If you are using "SQL Window" or "Command Window" (the editing tab), then PL/SQL Developer will save the window contents as is, including slash character.
The "Test Window" handles only one command so it does not accept command/block separator (like slash) nor does it need to save it.

I hope that helps.
 
Thanks for the response
If the slash is automatically saved in the package when using the program window, because you can not add it manually?
I think it's handy to be able to insert the slash especially if you have to create separate copies of the header and the body and then launch them with sql plus in an automated manner.
 
I'm not sure if I understood you correctly.
You can save package header and body in one file (the PL/SQL Developer will insert the slash character after the header and after the body) and in two separate files (each one will have the slash at the end). In the second case you have to either open separate windows for header and body or use a plug-in called "Save separate" from "BAR Solutions".
In all cases you can use such files from PL/SQL Developer as a script in SQL*Plus without having to add any slashes manually.

We do use PL/SQL Developer to save package headers and bodies separately (also type headers and bodies) and do launch them with SQL*Plus from automated scripts and it works without any manual editing.
 
Back
Top