Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

SQL Prompt CASE STATEMNENTS

Posted on 2016-08-18
7
58 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 43

Accepted Solution

by:
zephyr_hex (Megan) 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
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
table joins in qry 17 60
Get Next number from Stored Procedure 8 21
Parse this column 6 23
SQL Find Carriage Return and Delete it. 3 11
In this article I will describe the Copy Database Wizard 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.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

790 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