November 5, 2014 at 9:55 am
I am trying to create a report with multiple value parameters which has individual names as well as "ALL Select"
In order to implement this. I need to pass the parameter in the where clause with an IN.
At the same time , I am looking to pass wildcard. How can I implement this.
If I don't use IN , my report will not display as mufti value so IN is required...
Query is :
Select Device_Name
from Servers
where Manager in ('%' + @Manager + '%')
This gives incorrect results.
Any other idea?
November 5, 2014 at 4:04 pm
;with LikeList (string) as
(
select 'Bob' union all
select 'Jane' union all
select 'Bill'
), sourceTable (string) as
(
select 'Happy' union all
select 'Bill Posters' union all
select 'Jane Doe'
)
select st.String
from sourceTable st
inner join likeList ll
on st.string like '%' + ll.String + '%'
November 6, 2014 at 3:08 am
This was removed by the editor as SPAM
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply