Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

CAN WE USE "CONTAINS" OR "LIKE" OPERATOR IN WHERE CLAUSE OF DATABASE VIEW

sajan0192
Giga Expert

I have written following query

q_search.search_term = interaction.short_description

q_search.search_term(this field is from "ts_query_kb" table)

interaction.short_description(This field is from my custom table)

7 REPLIES 7

NS21
Giga Contributor

Hi,

Will it be possible to share how you called script from Report conditions

christianmehrin
Tera Contributor

For future reference:

 

"LIKE" can be used - but when creating string for comparing you have to use SQL functions. String operators are not working.

Example: prefix2.name LIKE CONCAT(prefix1.name, '%')

Doug25
Kilo Contributor

When you say string operators are not working, what do you mean?  Are you saying '%' in your example below does not work?

Example: prefix2.name LIKE CONCAT(prefix1.name, '%')

So if prefix2.name is Test User and prefix1.name is Test User2, would that be a match?

 

Thanks