I need to write a query to get a list of users where their fullname is in an attribute named description. User names are kept in that attribute in any of the format:-
- LASTNAME Firstname
- LASTNAMEFirstname (without space)
- FirstnameLastname
In such a scenario if I need to search a given list of users(around 100) in that attribute, I have to write query like
select * from dm_user where UPPER("description") like '%FIRSTUSER_FIRSTNAME%' OR UPPER("description") like '%SECONDUSER_FIRSTNAME%' and so on..
Is their a way I can do things more simply.I hate writing *UPPER("description") like* 100 times.(Please suggest standard sql query).
I need to run this query on Documentum and MSSQL.
I just want to have something like
{
select * from dm_user
where UPPER("description")
like IN ('%FIRSTUSER_FIRSTNAME%','%SECONDUSER_FIRSTNAME%');
but its not available in documentum}
Can use use dynamic queries and let SQL Server to write those strings 100 times?
Result: