# Use of LIKE in BAQ with a parameter

**URL:** <https://www.epiusers.help/t/use-of-like-in-baq-with-a-parameter/39996>\
**Category:** Epicor ERP 10\
**Created:** [August 23, 2017, 4:40pm UTC](https://www.epiusers.help/t/use-of-like-in-baq-with-a-parameter/39996 "2017-08-23T16:40:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![razgriz989](https://www.epiusers.help/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@razgriz989](https://www.epiusers.help/u/razgriz989)\
**Post date:** [August 23, 2017, 4:40pm UTC](https://www.epiusers.help/t/use-of-like-in-baq-with-a-parameter/39996/1 "2017-08-23T16:40:41Z")

</div>

Hello,

We are wanting to search through the ICE.Security table EntryList Column for specific group codes. This query works when we set a constant wild card but when we set it with a parameter (that returns exactly the same thing as we type in the constant) the user can select, no rows are returned.

The parameter is a separate BAQ that also when ran returns the results we want. Are there any ideas on how to use like with a parameter? Here is the code that returns no rows:

select distinct  
[Security].[Description] as [Security\_Description]  
from Ice.Security as Security  
where (Security.EntryList like ‘%@SecurityGroup%’)

---

<div class="post-metadata">

**Author:** ![danbedwards](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/9f8e36/32.png) [@danbedwards](https://www.epiusers.help/u/danbedwards)\
**Post date:** [August 23, 2017, 4:51pm UTC](https://www.epiusers.help/t/use-of-like-in-baq-with-a-parameter/39996/2 "2017-08-23T16:51:05Z")

</div>

You can use an expression with a parameter

![](https://epiusers.help/uploads/default/original/2X/c/c918f3104b597029a9fd9b208c1cfd8c8e288dc0.png)

```cs
select 
	[Security].[SecCode] as [Security_SecCode]
from Ice.Security as Security
 where (Security.EntryList like '%' + @Test + '%')
```

---

<div class="post-metadata">

**Author:** ![razgriz989](https://www.epiusers.help/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@razgriz989](https://www.epiusers.help/u/razgriz989)\
**Post date:** [August 23, 2017, 5:02pm UTC](https://www.epiusers.help/t/use-of-like-in-baq-with-a-parameter/39996/3 "2017-08-23T17:02:40Z")

</div>

Thank you that worked!
