Start New Discussion within our Databases Community

Good Morning,

Hopefully someone can help me with a quick answer.

I have a transaction table with a 'description' column that contains a combination of the members name and some static information i.e. "'username' PURCHASE" or "'username' PAYMENT"

and a 'type' column that contains various types of transactions i.e. 'FEE' or 'EARN'

I have a list of usernames, and I need to get the transaction number from each of these records where the 'description' contains a username from the list and the 'type' ='FEE'.

I don't know how to use the LIKE with the % wildcard along with the IN (using a list)

Any help would be greatly appreciated.


select * from table
where DESCRIPTION LIKE "%searchterm1%" or
DESCRIPTION LIKE "%searchterm2%" or
DESCRIPTION LIKE "%searchterm3%" or
DESCRIPTION LIKE "%searchterm4%"

Thank you both for your responses...

Sorry for the long delay, but I got sidetracked again and emursed in another project.

On this question, I concluded it wasn't worth the time or struggle to find a cure for it, because it would be a one time use and the total number of records effected was under 100, so I just went through them one by one manually and made the necessary adjustments.

Thanks again for the responses, but I'm going to mark this as solved .

This question has already been answered. Start a new discussion instead.