Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

change parameter to 'ALL' when is NULL

Posted on 2011-03-21
1
Medium Priority
?
260 Views
Last Modified: 2012-06-27
I want to change the nulls to 'All' instead of showing NULL in the parameter.  I have 'Allow NULL values option selected'

This is my dataset for a parameter I am using for the parameters
--this data set shows null and works fine when rpt is exec
select distinct  Terr from dimcustomer
order by Terr
--this does not work, it thinks 'All' is not null
select distinct  isnull(Terr,'All') as Terr from dimcustomer
order by Terr

Any suggestions
0
Comment
Question by:elucero
[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
1 Comment
 
LVL 41

Accepted Solution

by:
Sharath earned 2000 total points
ID: 35185387
Do you have blank values in Terr instead of NULL? try this.
select distinct  isnull(nullif(ltrim(rtrim(Terr)),''),'All') as Terr 
  from dimcustomer 
 order by Terr

Open in new window

0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Have you ever had to extract data from a Microsoft SQL Server database and export it to an Excel file, but did not want to use a DTS package? The concept in this article is not new, but it is the answer and will also work on 64-bit SQL boxes.   …
Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

704 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