# IllegalArgumentException: The argument 'pattern' of Function 'like' has to be constant!

**URL:** <https://community.dremio.com/t/illegalargumentexception-the-argument-pattern-of-function-like-has-to-be-constant/4643>\
**Category:** Uncategorized\
**Created:** [November 25, 2019, 9:22pm UTC](https://community.dremio.com/t/illegalargumentexception-the-argument-pattern-of-function-like-has-to-be-constant/4643 "2019-11-25T21:22:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hatshex](https://avatars.discourse-cdn.com/v4/letter/h/7feea3/32.png) [@hatshex](https://community.dremio.com/u/hatshex)\
**Post date:** [November 25, 2019, 9:22pm UTC](https://community.dremio.com/t/illegalargumentexception-the-argument-pattern-of-function-like-has-to-be-constant/4643/1 "2019-11-25T21:22:37Z")

</div>

Hello everybody

I am trying to run the next query:

SELECT  
nested\_0.name,  
nested\_0.address,  
join\_country.name AS name1,  
join\_country.names  
FROM (  
SELECT name, address  
FROM DataBase  
) nested\_0  
INNER JOIN country AS join\_country  
ON (nested\_0.name LIKE CONCAT(’%’,join\_country.names[0], ‘%’) )

Somebody have had the same issue?

There is a way to sove it?

---

<div class="post-metadata">

**Author:** ![Muffex](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/muffex/32/4687_2.png) [@Muffex](https://community.dremio.com/u/Muffex)\
**Post date:** [January 16, 2021, 11:53pm UTC](https://community.dremio.com/t/illegalargumentexception-the-argument-pattern-of-function-like-has-to-be-constant/4643/2 "2021-01-16T23:53:16Z")

</div>

Hi @hatshex,

how did you resolve your issue?  
I’m having the same issue when using LIKE within JOIN.

regards

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [January 18, 2021, 3:21am UTC](https://community.dremio.com/t/illegalargumentexception-the-argument-pattern-of-function-like-has-to-be-constant/4643/3 "2021-01-18T03:21:43Z")

</div>

@Muffex

Please send the Dremio query profile

> **[How To Share A Query Profile](https://www.dremio.com/tutorials/share-query-profile-dremio/)**
>
> Tutorial explaining how to share a query profile in Dremio.

Thanks  
Bali
