?
Solved

SQL Prompt CASE STATEMNENTS

Posted on 2016-08-18
7
Medium Priority
?
73 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 44

Accepted Solution

by:
zephyr_hex (Megan) earned 2000 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

839 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