Update format like select

1 Posts
1 Users
0 Likes
240 Views
(@george)
Member
Joined: 1 year ago
Posts: 2
Topic starter  

I recently got SQLinForm and love it, its the first time in years I have found a formatter that meets the majority of my requirements, so thank you 🙂

Unless I failed to see it, I believe you should be able to format an update statement in the same manner as a select statement. In particular indenting

The output of my code with current setup

UPDATE tab
SET
col1 = '1'
, col2 = '2'
, col3 = CASE
   WHEN 1 = 1
   THEN '3'
   ELSE NULL
END
FROM TABLE tab

 

How I believe i would like it formated

UPDATE tab
SET
   col1 = '1'
 , col2 = '2'
 , col3 = CASE
      WHEN 1 = 1
      THEN '3'
      ELSE NULL
   END
FROM TABLE tab

 

How a similar select statement formats with my current setup

SELECT
   col1
 , col2
 , CASE
      WHEN 1 = 1
      THEN '3'
      ELSE NULL
   END
FROM TABLE tab

 

 

 


   
Quote
Share: