Toad World® Forums

11.0.0.116 - Auto Replace - Replace With entries getting lowercased on insertion

View > Toad Options > Editor > Behavior > Auto Replace button

After some trial and error, I was able to troubleshoot an issue I had with
Replace With text strings containing upper case literals ( ex. … where
language = ‘US’ … ) which were repeatedly getting “lower-cased” ( ex. …
where language = ‘us’ … ) during the substitution replacement.

I was finally able to stop this unwanted behavior with the (counter-intuitive,
at least to me) UNchecking (i.e. disabling) of the Maintain case on replace
option.

Just wondering about the label / intended behavior of this checkbox option ?
Seems “reversed” to my thinking.

Still love working with Toad. Keep up the great work

This checkbox could be better worded and I’m open to suggestions, but it needs
to be concise. It also doesn’t appear to be in the help.

If the option is checked it looks at the replace string you’ve entered and
attempts to make a best guess regarding the desired case of the replacement.

Assume that you have a replacement setup to replace ndf with NO_DATA_FOUND.

The option is checked:

ndf=no_data_found

NDF=NO_DATA_FOUND

nDF=no_data_found

Ndf=No_data_found

NdF=No_data_found

In the last 3 examples since the typed characters are in mixed case it uses the
case of the first character as the template for the first character’s case in
the replacement string. Characters 2-N will always be lower case.

The option is unchecked:

ndf, NDF, nDF, Ndf, and NdF all map to NO_DATA_FOUND. The case of the
replacement string as defined in options is used.

Hope this helps,

Michael