Quantcast
Viewing all articles
Browse latest Browse all 20

Re: dynamic Filter ( Using multiple drop down list)

Montadar

do you have any idea how to change the declaration of (@segment varchar(50) = null ) to accept single or multiple values that are passing from
code behind.

See one of my earlier replies (copied below)

A select query that return records for a comma separated list of specified employee names

DECLARE @names NVARCHAR(MAX)= N'roma,davinia,vivian';select*from tblEmployees where name in(select item from dbo.SplitStrings_CTE(@names, N','))

An insert query to insert new employees (name only) from a comma separated list specified employees

DECLARE @names NVARCHAR(MAX)set@names= N'eulender,pontsho,tumelo,piotr'
insert into tblEmployees (name)select item from dbo.SplitStrings_CTE(@names, N',')

Note: do not use spaces because the will be added to the name (segment in your case)


Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>