Toad World® Forums

Formatting create materialized view statement

All,

I’m on Beta 12.12.0.7.

When I format a create statement for a materizalized view it is formatted quite different than the corresponding create view statement.
Here’s an example (complete source code at end):
20170804 formatting error on create view 2.png

Looks ok to me, no complaints thus far.

However, when I make this a materialized view, I get quite a different result:
20170804 formatting error on create view 1.png

Most annoyingly, the initial name list on lines 2-5 are slammed into the left-hand border
without any indentation.

Is this fixable, please?

Kind regards,
Abe Kornelis

[View:/cfs-file/__key/communityserver-discussions-components-files/86/4201.wcsprd_5F00_catentpart.sql:320:240]

can you try to delete commented part (on the first picture) and reformat again?
comments sometimes can do the problem.
:slight_smile:

Damir,

the create view statement (which has the comment) is formatted ok, as far as I’m concerned.
The create materialized view, however, contains no comments and is formatted rather awkwardly.

I’m sorry for the confusion - hope this helps.

Kind regards,
Abe

ah...see now, sorry.

Here it is the same source formatted on Toad b 12..0.11

Damir,

please see initial submission, right below my name… :wink:

Kind regards,
Abe

Damir,

thanks for the preview. Looks a lot better to me.

Would youplease give it a try with the settings we use over here?
[View:/cfs-file/__key/communityserver-discussions-components-files/86/8004.FmtPlus.txt:320:240]

Thanks in advance,
Abe

with your fmt options:

Apparently the formatting of both “normal” and materialized view where was done by different code blocks. I unified them to yield the normal view output (1st snippet). (QP-2556)

Thanks for reporting,
Andre

Andre, Damir,

you’re welcome. I’m glad it’s been fixed - and code simplification as a bonus!
Happy coincidence.

Kind regards,
Abe