Solved

SQL Prompt CASE STATEMNENTS

Posted on 2016-08-18
7
48 Views
Last Modified: 2016-08-19
Where is the option to keep all column data on one line? but each column on a new line?

When formatting SQL in SQL Prompt it is wrapping my case statements

Example... it is doing this
MAX(CASE WHEN p.PhoneNumberTypeID = 1 THEN p.PhoneNumber
                  ELSE ''
      END) AS HomePhone ,

When I want this to be the default formatting
MAX(CASE WHEN p.PhoneNumberTypeID = 1 THEN p.PhoneNumber ELSE '' END) AS HomePhone ,
0
Comment
Question by:lrbrister
  • 3
  • 3
7 Comments
 
LVL 42

Accepted Solution

by:
zephyr_hex earned 500 total points
ID: 41761153
There isn't a setting that controls the wrapping of a CASE statement in SQL Prompt.  If you look at the formatting options for CASE, it's pretty limited, and there is nothing for wrap control.

It looks like there was some discussion regarding some format options about a year ago.
0
 

Author Closing Comment

by:lrbrister
ID: 41761235
thanks
0
 

Expert Comment

by:Grant Fritchey
ID: 41762324
We've just released a new version of SQL Prompt, 7.3, into beta which has radically enhanced formatting capabilities. It will absolutely be able to do exactly what you're looking for here.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:lrbrister
ID: 41762327
Gary
Is that an auto update of my software?
0
 

Expert Comment

by:Grant Fritchey
ID: 41762374
It will be after it gets released. It's in beta right now, but will be out the door within a week or so.
0
 

Author Comment

by:lrbrister
ID: 41762383
Grant,
 Its a bit pricy.
My company allowed the license to lapse and no way they are spending the funds for that "renew"
0
 

Expert Comment

by:Grant Fritchey
ID: 41762396
Sorry. Can't help you there. I just wanted to let you know that we have the functionality you're looking for available now.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now