SqlDbx
You are not logged in.
I noticed, that if you change case using Ctrl+Shift+U or Ctrl+Shift+L it also changes case of the text literals surrounded by single or double qutes and changes the case of comments.
Not sure about comments, but literals definetely should stay as is.
It may completely mess up the results if case of literal is a part of your predicates.
It also makes your report ugly if you use double quotes literals to make a nice headers.
Case change should only apply to code.
Most SQL editors do not change case of literals.
Last edited by garbuya (2013-12-16 11:26:23)
Offline
I am not aware of any editor which works this way.
And if editor like this exist I do not agree with the behavior.
If you explicitly select to convert something to upper / lower case everything should be converted
Offline
Try ORACLE SQL DEveloper http://www.oracle.com/technetwork/devel … index.html
Offline
In this case i agree with garbuya,
by logic, the intended and correct behavior
is to not affect the original value of
variables. Anyway, this could be
specified in a optional setting.
Offline
Here is an example: Oracle regexp_replace uses CASE SENSITIVE expressions like [:digit:] , [:alnum:], [:alpha:], [:blank:] etc
If you change case of it you are in a big trouble!
select regexp_instr('500 Oracle Pkwy, Redwood Shores, CA', '[o][[:alpha:]]{3}', 1, 1, 0, 'i') result from dual;
Try to change the case to upper and see what happends!
Offline
I would like to raise this question again - changing case SHOULD NOT impact literals! Otherwise it is absolutely useless! Otherwise it turns a nice developmnent tool into the stupid word processor!
And, BTW, many word processors today can recognize a dialect of code and live literals alone when you changing case.
I want to change case of a long script with literals in one click, but i cannot! I have to go and higlight each piece of code I want to change! Noncense!
Try to convert to upper this code and see what happends:
select regexp_instr('500 Oracle Pkwy, Redwood Shores, CA', '[o][[:alpha:]]{3}', 1, 1, 0, 'i') result from dual;
Now tell, how easy is it to convert this code to upper case and still have it work?
What if you have pages of code like this?
Offline
This question still remains unanswered
Offline
Well..
I looks like I need to open a new thread to have this discussion continued...
Offline
The way upper case conversion works will stay. We are not going to change it.
Why don't you try to use SQL Formatter option to do what you want.
Offline