# formatter: inconsistent indentation of column declaration definition

**URL:** <https://forums.toadworld.com/t/formatter-inconsistent-indentation-of-column-declaration-definition/32424>\
**Category:** Toad for Oracle - Beta\
**Created:** [January 27, 2015, 3:06am UTC](https://forums.toadworld.com/t/formatter-inconsistent-indentation-of-column-declaration-definition/32424 "2015-01-27T03:06:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kornelis.abe](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@kornelis.abe](https://forums.toadworld.com/u/kornelis.abe)\
**Post date:** [January 27, 2015, 3:06am UTC](https://forums.toadworld.com/t/formatter-inconsistent-indentation-of-column-declaration-definition/32424/1 "2015-01-27T03:06:25Z")

</div>

All,

I've noticed the formatter is nota lways consistent in the way it indents the column declaration section of a view definition.  
Here's the sample view definition (just two columns) I'll use to demonstrate the bahaviour:

create or replace view stock\_stats.stock\_stats\_vw(partno, repl\_qty\_cost\_of\_sales\_1yr\_ext)  
as select r.partno, r.repl\_qty\_sold\_1yr + r.repl\_qty\_uninvoiced - r.repl\_qty\_returned\_1yr as repl\_qty\_cost\_of\_sales\_1yr\_ext  
from stock\_stats.results r;

With the addition of an additional term in the second column's definition this turns into:

create or replace view stock\_stats.stock\_stats\_vw(partno, repl\_qty\_cost\_of\_sales\_1yr\_ext)  
as select r.partno, r.repl\_qty\_sold\_1yr + r.repl\_qty\_uninvoiced - r.repl\_qty\_returned\_1yr as repl\_qty\_cost\_of\_sales\_1yr\_ext - r.repl\_qty\_uninvoiced\_returns  
from stock\_stats.results r;

The formatter turns these two queries into the following format:

 ![Formatter_indent_of_column_declaration.png](https://global.discourse-cdn.com/quest/original/2X/6/68eab092b649d4d3f9ce17b731ab708d13338832.png)

As you can see, in the first query the column list declaration indents after the view-name,  
whereas the second query has the column list not indented at all. It goes smack into column 1.

It seems this is caused by the line overflow in the body definition, caused by the addition  
of the fourth term in the calculation for the second column.

I don't quite understand why the indent of the column declaration section should be reduced to zero  
when a line overflow occurs in the body of the column definition. The indentation of the body is not reduced.

For completeness' sake here are my formatter settings:

 252 5.266.0 5.273 2 2 140 2 2 2 2 1 1 1 2 1 0 2 0 1 0 0 0 S 1 1 1 S 1 1 1 SO 1 1 S 1 S 1 1 1 S 1 1 1 S S 1 1 1 1 1 1 3 1 1 S S 1 1 S 1 1 S 1 1 1 1 SO 99 1 1 SO 1 1 1 2 0 by Toad formatter
# Kind regards, Abe Kornelis

---

<div class="post-metadata">

**Author:** ![avergison](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/avergison/32/66_2.png) [@avergison](https://forums.toadworld.com/u/avergison)\
**Post date:** [January 27, 2015, 10:04am UTC](https://forums.toadworld.com/t/formatter-inconsistent-indentation-of-column-declaration-definition/32424/2 "2015-01-27T10:04:17Z")

</div>

You’re right. This needs to be addressed. (QP-859)

Thanks for reporting,

Andre

---

<div class="post-metadata">

**Author:** ![avergison](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/avergison/32/66_2.png) [@avergison](https://forums.toadworld.com/u/avergison)\
**Post date:** [January 27, 2015, 10:59am UTC](https://forums.toadworld.com/t/formatter-inconsistent-indentation-of-column-declaration-definition/32424/3 "2015-01-27T10:59:00Z")

</div>

Fixed. Now the columns stay to the right until you decrease the right hand margin (140 in your setup) down to 80, then both lists will move to the left.

You’ll see the change in some future Toad drop featuring QP5 version 5.275 or later.
