?
Solved

SQL Server 2005 Report Parameters Settings

Posted on 2006-07-11
1
Medium Priority
?
607 Views
Last Modified: 2008-03-03
Greetings,

When setting values in SQL Server 2005 Reporting parameter setting, how do you go about setting a multiple values where one of the values is NULL. For example:


select emp_name,title,emp_id
from emp
where emp_id=@emp_id



In this example I want to have the luxury to select all values, including the values that are null in the emp_id field or select only the null values in the emp_id field. When setting this up in SQL Server 2005 Reporting parameter section, it allows you to set each value separately but I want to know what is the proper syntax to set a value to NULL in SQL Server 2005 Reporting parameter section?
0
Comment
Question by:Omega002
[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 14

Accepted Solution

by:
simon_kirk earned 750 total points
ID: 17081908
Could you not change your SQL statement to convert the NULL before passing the data to RS?

e.g.

select emp_name,title,COALESCE(Cast(emp_id AS VARCHAR),'No Value')
from emp
where COALESCE(CAST(emp_id AS VARCHAR),'No Value')=@emp_id

or

select emp_name,title,COALESCE(emp_id,0)
from emp
where COALESCE(emp_id,0)=@emp_id
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

765 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