Solved

change parameter to 'ALL' when is NULL

Posted on 2011-03-21
1
242 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
1 Comment
 
LVL 40

Accepted Solution

by:
Sharath earned 500 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

895 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

12 Experts available now in Live!

Get 1:1 Help Now