Beautifier on updates

when I have an update statement like this:


Code:
update mytable
set (     col1
   ,      col2
   ,      col3
   ,      col4
   ,      col5
   ,      col6
   ,      col7
   ,      col8
   ,      col9 ) = (
   select col1
   ,	  col2
   ,      col3
   ,      col4
   ,      col5
   ,      col6
   ,      col7
   ,      col8
   ,      col9
   from myothertable
   where x = y
)
and I run the beautifier the statement is formatted like this:


Code:
update mytable
set    (col1, col2, col3, col4, col5, col6, col7, col8, col9) = (select col1
                                                                       ,col2
                                                                       ,col3
                                                                       ,col4
                                                                       ,col5
                                                                       ,col6
                                                                       ,col7
                                                                       ,col8
                                                                       ,col9
                                                                 from   myothertable
                                                                 where  x = y)
Is it possible to configure the beautifier so that the items in parenthesis stay on their own line?

Thanks,
Thijs
 
Not a solution but a work-around. In certain occations it is possible to use comments to change the beautifiers behaviour to give a slightly more pleasing result


Code:
update mytable
   set (col1, col2, col3, col4, col5, col6, col7, col8, col9) = --
        (select col1,
                col2,
                col3,
                col4,
                col5,
                col6,
                col7,
                col8,
                col9
           from myothertable
          where x = y)
Bo Pedersen
 
The beautifier does not yet explicitly support this type of update statement. It's on the to-do list though.
 
Back
Top