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 2008 Forums
 Transact-SQL (2008)
 Cascading Paramater

Author  Topic 

NickC
Yak Posting Veteran

68 Posts

Posted - 2013-02-19 : 11:17:02
Hi

Im looking to see if I can make a paramater dependenet on another in SQL (AND SSRS)

Basicaly we currently have a look up where people put part of a name in and it takes all of them and searches
"
WHERE
Contact_Name LIKE '%' + @BrokerLookup + '%'
"

so if it was like nic

it would pick out nick, nicholas, nic from the contact name

what I then want is a second paramater that goes okay heres all the contact names liek nic, now in ssrs I want just nick and nicholas and to exclude nic...

how would I do this in SQL? I think SSRS bit is just a case of adding a paramater which is hidden until someone types in something in to first paramater am i right?

Many Thanks

Nic, Nick, NIcholas :)

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-19 : 12:01:56
nope. in SSRS you need to create second parameter and add first parameter as a parameter for dataset query in it. By doing so,SSRS interprets them as related and makes them cascading so that param2 will get enabled only when you enter/select a value in param1

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -