Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 null conditon - sql server 2005 report

Author  Topic 

BCJ
Starting Member

42 Posts

Posted - 2008-06-24 : 16:42:51
Hi,

Here the requirement is, if the parameter is null still the report should display all the data, the quey is like,

select field1,field2,field3 from table1 where
field1 = isnull(@p_id,field1)

when i tried to run the report with this query and without the parameter value , it didn't work. asked for enter the value for p_id , the parameter cannot be blank.


Any suggestions please...

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-24 : 16:58:29
Duplicate, locking thread.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -