SQL Complete Single-Line Case When statements

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
ori_g
Posts: 11
Joined: Thu 22 Jun 2017 17:26

SQL Complete Single-Line Case When statements

Post by ori_g » Thu 03 Aug 2017 19:39

When I am writing CASE WHEN statements in my SQLs, I often have one of 2 cases happening - Either it is a simple one-liner:

Code: Select all

CASE WHEN XXX = 1 THEN yyyy ELSE zzzz END AS Transform
Or it is a HUGE case when based upon a series of conditions.

What I would like is that if it is a huge case when to have standard formatting (indent each case, then and end etc). However, if it is a short 1-liner, to not split it into multiple lines with indentation.

I've tried playing with the margin size, but it still breaks up my one-line CASE WHENs into multiple lines.

Is there a way to accomplish what I'm asking for?

alexa

Re: SQL Complete Single-Line Case When statements

Post by alexa » Fri 04 Aug 2017 17:11

There is no such a possibility. Though, we will add the corresponding option in one of the next product versions and will notify you once it's available for downloading.

Post Reply