Solved

SQL Prompt CASE STATEMNENTS

Posted on 2016-08-18
7
61 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
[X]
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
  • 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

749 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