All,
I’m on Toad 12.11.0.39.
The formatter seems to be trying to align the => signs in my list of named parameters.
But it is breaking lines when it should not.
E.g. it breaks p_debug => ‘Nodebug’ into two separate code lines
This is the sample query:
select category_old as category_economical
, category_new as category_physical
, count() as aantal
from (select r.partno
, r.compno
, substr(r.category_with_repl_reason, 1, 1)
as category_new
, substr(stock_stats.summarize.determine_category( / turnover = sales (of parts+kits) - returns, include turnover of replaced parts */
p_partno =>
r.partno
, p_synonym_of =>
r.synonym_of
, p_value_lines =>
coalesce(r.value_lines, 0) + coalesce(r.repl_value_lines, 0)
, p_qty_on_stock =>
coalesce(r.qty_on_stock_economical, 0) + coalesce(r.repl_qty_on_stock_economical, 0)
, p_turnover_12m =>
coalesce(r.qty_sold_1yr, 0)
+ coalesce(r.qty_uninvoiced, 0)
- coalesce(r.qty_returned_1yr, 0)
- coalesce(r.qty_uninvoiced_returns, 0)
+ coalesce(r.repl_qty_sold_1yr, 0)
+ coalesce(r.repl_qty_uninvoiced, 0)
- coalesce(r.repl_qty_returned_1yr, 0)
- coalesce(r.repl_qty_uninvoiced_returns, 0)
, p_turnover_24m =>
coalesce(r.qty_sold_2yr, 0)
+ coalesce(r.qty_uninvoiced, 0)
- coalesce(r.qty_returned_2yr, 0)
- coalesce(r.qty_uninvoiced_returns, 0)
+ coalesce(r.repl_qty_sold_2yr, 0)
+ coalesce(r.repl_qty_uninvoiced, 0)
- coalesce(r.repl_qty_returned_2yr, 0)
- coalesce(r.repl_qty_uninvoiced_returns, 0)
, p_qty_reserved =>
coalesce(r.qty_reserved, 0) + coalesce(r.repl_qty_reserved, 0)
, p_create_mon =>
case
when r.linetype = ‘G’
then
coalesce(r.created_global, 200301)
else
coalesce(r.created_psbase
, r.created_local
, r.created_global
, 200301
)
end
, p_current_period =>
r.mon_code
, p_debug =>
‘Nodebug’
)
, 1
, 1
)
as category_old
from results r
where r.mon_code = 201612
and r.linetype = ‘D’
and r.redundancy_code = ‘N’
and r.compno > 0)
group by category_old, category_new
order by category_old, category_new;
As you can see, some parameter values are calculated using a lengthy expression.
Those are formatted okay, but the short ones that should fit on a single code line
are broken into two lines as well.
I would like the => symbols to be aligned, but rather not this way!