Styling is lost when creating script


I’m new in the forum. I’ve searched through it looking for an answer to my question, with no results.

I don’t know if this is a bug or a feature: styling is lost when creating script in Toad for Oracle version 12 and 13 (already tested in versions,

I am currently working along with 20 people, and we want to unify the style of our PL scripts. For example, keywords and datatypes will always be in capital letters, identifiers will be in lowercase, and so on. In order to do that, we make use of the Font and Styling option (View - Toad Options… - Editor - Font and Styling).

This way, while typing a script in lowercase, the Editor will automatically change the keywords to uppercase if necesary. It works well, but, if we export the script from the PL (right click on the package - Create - Script…), the resulting file won’t be affected by the formatting rules previously configured.

The strangest thing about it is that it worked in Toad version 9. I mean, if you export the script in Toad version 9, all the keywords and datatypes will be in uppercase, and identifiers in lowercase (following the example I mentioned before). But in Toad version 12 and 13, the resulting script will be the same as the user typed.

This is the reason I don´t know if this is a bug or the opposite, a correction of a bug in older versions.

Is there any way to export the scripts following this kind of formatting rules?

Thanks in advance.


When you export a script from Schema Browser, pl/sql objects (packages, functions, procedures) will be exported using the same formatting that they are stored in the database.

If you want Toad to format them, check the "format pl/sql objects" box here in the "export DDL dialog".

Hi, jdorlon.

Thanks for your reply :grinning: It fits what we need in part, but not completely.

Checking the “format pl/sql objects” box in the “export DDL dialog” formats the script, but following the rules defined in the Formatter (View - Toad Options… - Formatter). It is capable of exporting keywords in uppercase (which is OK), but it does some text indentations we do not want.

What we want is to export the script following the rules defined in Font and Styling. What we want to export is the same as we can get in the Editor panel, I don’t know if I’m explaining very well.

The problem resides in the fact that some teammates of the company use Toad version 9 (which do not include Formatter options), and some other use Toad version 12 and above. So, defining formatting rules in the Formatter is not an option for us.

We also tried to copy and paste already formatted Editor contents in a text file (for example, in Notepad++). But despite of having it formatted in the Editor panel, once pasted into the Notepad format is lost.

I don’t know if what we need is possible, but for us would be very useful.

Thanks in advance.


Oh, well, to get the same formatting for everyone, you’ll probably need all coworkers to be on the same Toad version (or at least close).

The Font and Styling should be the same in Editor as in Schema Browser Script tabs, but of course, that only applies to Toad. it doesn’t copy/paste out to other applications like Notepad++…(it might copy/paste out to MS Word), But as soon as you paste the text from Notepad++ back into Toad, the styling should reappear. Font and Styling is a function of the edit control that we display scripts in. It is really only for display - that font/styling info is not saved with the text itself. And to complicate things,we had a different syntax memo component in Toad 9 than we do now, so that’s another reason to get everyone on the same Toad version (or close) if you want font/styling to match for everyone.

Regarding indentation - is that due to the use of tabs instead of spaces?

Thanks for your reply. So, it's what I thought, but i wanted to ask for some advice in this forum, just in case. I don't know if it's in my manager's agenda to upgrade all the old licenses to Toad 12+...

No, i didn't mean that (I don't want to start a fight about indentation right now, but I prefer tabs :sweat_smile: ). The point is that the formatter automatically splits queries in several lines, and we'd rather leave the line breaks untouched.

Thanks a lot