Print Thread
update beautifier bug?
#32930 12/08/08 12:08 PM
Joined: Nov 2005
Posts: 17
UK
P
Phil W Offline OP
Member
OP Offline
Member
P
Joined: Nov 2005
Posts: 17
UK
Hi

I have set all options to break on new lines but the following statement refuses to budge the list of columns (at the *) into new lines. Does anyone know of a workaround please?

Phil

* update table set (col1,col2,col3,col4,col5)=
(select col1,
col2,
col3,
col4,
col5
from table2)
where col1=123;

Re: update beautifier bug?
Phil W #32932 12/08/08 06:16 PM
Joined: Dec 2002
Posts: 491
Wellington, NZ
Member
Offline
Member
Joined: Dec 2002
Posts: 491
Wellington, NZ
i believe it is this way due to the brackets you are using. if you change it to : update table set col1 = col1, col2 = col2, col3 = col3 etc it will beautify as you want it to.


... suck in your lips and frown like a werewolf ...
Re: update beautifier bug?
rbrooker #32944 12/10/08 04:30 AM
Joined: Sep 2008
Posts: 10
Melbourne, Australia
Member
Offline
Member
Joined: Sep 2008
Posts: 10
Melbourne, Australia
Me too.

PL/SQL Developer 7.1.5.1398 doesn't beautify correlated update statements of this form correctly - The initial col1,col2,col3 etc. string doesn't get split at the commas.

I don't think such statements can be converted to the form that the previous poster suggests, and probably not in a readable form if it can.

In my situation the beautifier sticks the body of the UPDATE out at column 503 of the editor!

That said, the beautifier is the best feature of PL/SQL Developer.

Thanks,
Peter Smith.


Re: update beautifier bug?
petesmith #32945 12/10/08 05:01 AM
Joined: Sep 2008
Posts: 10
Melbourne, Australia
Member
Offline
Member
Joined: Sep 2008
Posts: 10
Melbourne, Australia
I've worked around my issue by placing a '--' and a manual line break wherever I want to force the beautifier to break the line.

The comment notation means that the beautifier cannot place anything after the '--' on the same line otherwise it will turn the code into a comment, so it has to line break.

Re: update beautifier bug?
petesmith #33734 04/01/09 01:35 PM
Joined: Nov 2005
Posts: 17
UK
P
Phil W Offline OP
Member
OP Offline
Member
P
Joined: Nov 2005
Posts: 17
UK
Any news on improving this? I Can't believe I raised it in 2005 and just did a search for a solution and it is still outstanding!

Phil


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.116s Queries: 13 (0.040s) Memory: 2.5167 MB (Peak: 3.0420 MB) Data Comp: Off Server Time: 2024-05-18 08:52:02 UTC
Valid HTML 5 and Valid CSS