I have a table in my database that contains information like this:
activity: R1A1, R1A2, R1A2_2
My problem is where I'm trying to get all the activities that do not contain the second part (_2).
I'm trying this query: SELECT activity FROM table_name WHERE activity NOT LIKE '%_2'
but I'm getting only the activity R1A1. This is because R1A2 contains a number two on its name. How can I solve it? What is the correct query to do that? I want to get all the activities without _2 or something like that on its name.
If I do in an inverse method (SELECT activity FROM table_name WHERE activity NOT LIKE 'R1%'
I get the correct results.
How can I get what I need? Thanks for your answers!