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
 Transact-SQL (2005)
 Issue with multi selection option in dropdown list

Author  Topic 

atlachar123456
Starting Member

33 Posts

Posted - 2011-11-17 : 10:54:09
Hi,
I have a procedure with two input parameters @bank and another one is @productid,for these two parametrs i want to write a code
in the procedure that option to seelct multi selction;for this i will put in the report properties change to single select to multi select
but in the procedure we need to handle...
i have a code for single selction and for ALL in my procedure
for single selection
IF(@productid IS NOT NULL) AND (@productid <> 0)
BEGIN
DELETE FROM #Rpt22036WorkTable
WHERE ISNULL(productid,0) <> @productid
END

and for ALL means here 0 for this i have..
IF (@productid IS NULL)
SELECT @productid = 0
ELSE
SELECT @productid = @productid
and i need a code here for @bank and @productid how to multi select the list in the drop down.... can anyone help me..



atlaaaaaaaa

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2011-11-17 : 11:04:41
Well there are lots of ways to do this: Parse a sring, Pass XML, Dynamic SQL, etc.. Here is a link that covers the various options:
http://www.sommarskog.se/arrays-in-sql-2005.html
Go to Top of Page
   

- Advertisement -