Use of LIKE in BAQ with a parameter

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%’)

You can use an expression with a parameter

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

Thank you that worked!