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.
Author |
Topic |
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2005-05-10 : 10:48:46
|
Hopefully you SQL or Reporting Services expert can help. I have a query in Reporting Services, that has 2 drop down parameter. I want to be able to add in a 3rd drop down that says "ALL", which uses both of the other 2 parameter. SELECT ID, DESCRIPTION, BUYER, QTYFROM WAREHOUSEWHERE WAREHOUSE.ID = @WAREHOUSEThe 2 Parameters I'm using are "PARTS" and "TOOLS". I want to have a third that says "ALL" which uses both parameter. Any ideas? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-05-10 : 12:31:35
|
Please post all 3 queries.Tara |
 |
|
jhermiz
3564 Posts |
Posted - 2005-05-10 : 16:59:18
|
Not sure why you have three queries, seems to me you would need to UNION SELECT 'All', NULLBut then again sample data of those parameters would help us out a bit more. Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]Imperfection living for perfection -- [url]http://jhermiz.blogspot.com/[/url] |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2005-05-10 : 17:02:49
|
Thanks guys, but I got helped from T-SQL forum. Here's the example incase if anyone needs it later on.SELECT [ID], [DESCRIPTION], BUYER, QTYFROM WAREHOUSEWHERE WAREHOUSE.ID = CASE @WAREHOUSE WHEN 'TOOLS' THEN 'TOOLS'WHEN 'PARTS' THEN 'PARTS'WHEN 'ALL' THEN WAREHOUSE.IDENDFrom the drop down list of Reporting Services, the user has the option to pick either "TOOLS" or "PARTS" to be use as the value for the parameter. I needed to have both as parameter values as an option. So the select case here works for what I'm trying to do. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-05-10 : 17:19:36
|
Chris,If you are going to post in more than one forum (which isn't allowed btw), please at least put a link to the other thread.Tara |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2005-05-11 : 12:31:02
|
Sorry Tara. After posting it from the Reporting Services forum, I thought that it is more appropriate if I post at the Transact-SQL forum since it's more related to SQL than Reporting Services. Not sure if I can delete post after I post my message.I was going to provide link to this post from the Transact-SQL, but thought that since the query is small, it wouldn't hurt if I just post it up directly with my msg. I just thought it will make it easier to read and more convenient for the reader than having to click on a link to this post.I know that double posting isn't allowable, but sometimes it's just easier to copy and paste than having to retype and reword the problem from anothe forum. |
 |
|
|
|
|
|
|