Using Multi Valued Parameters with the SqlDataSource component

1 Answer 92 Views
DataSource SQL
Mario
Top achievements
Rank 1
Mario asked on 30 Jun 2021, 10:57 AM

Hi,

I'm trying to pass a parameter value to the sql query like described in the KB article. Sample:

SELECT * FROM Person.Contact WHERE FirstName = @FirstName

This works fine, but if I try with a multi valued parameter, the query gives no results:

SELECT * FROM Person.Contact WHERE FirstName IN (@FirstName)

Any ideas? Thanks in advance.


1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 05 Jul 2021, 07:38 AM

Hello Mario,

Indeed, you need to use the IN operator. You can take a look at the following articles:

- Using Multivalue Parameters

- How to use MultiValue Report Parameter in a SQL query

 

Regards,
Neli
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
DataSource SQL
Asked by
Mario
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or