Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Server 2005 Report Parameters Settings

Posted on 2006-07-11
1
Medium Priority
?
617 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

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…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

636 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