I'm using Toad 17.0.341.1977
If I open a script file with PL/SQL and run it in the Editor the file is now marked as modified even though the file has no changes. This only happens for scripts with PL/SQL.
If I save the file with a different name and do a file compare with original file they are the same.
After a bit more testing it looks like it doesn't matter if the script is PL/SQL or plain SQL. What matters is whether there is trailing whitespace at the end of any lines. It just happens that the file compare plugin I was using was set to ignore whitespace.
So the Toad editor is trimming whitespace in the file when it runs. I've turned off the setting to trim trailing whitespace on execute/compile to address the issue. I didn't even know there was a setting for that.
How are you executing? I just tried with a simple script of select user from dual;
The script has 3 trailing blank lines. I saved it to file and executed using both F5 (Execute Script) and F9 (Execute Statement at Caret) and in both cases the statement is executed and the file remains unmodified.
What do you have for this setting?
I unchecked it and it addressed the issue.
I had the setting cleared. I missed that you found that option in your second reply.
1 Like