I have been searching now for hours.
Got a String like: "_1_11_19_12_17_21_41_111_100_1"
Now, I want the Output to be a single 1
When I try:
"SELECT * FROM jobs_tb WHERE position_id LIKE '%1%' "
This prints all most everything:
I tried:
SELECT *
FROM `jobs_tb`
WHERE (
`position_id` LIKE '%_1%'
)
OR (
`position_id` LIKE '%_1_%'
)
All most the same as the previous.
How do you isolate a 1 when 1s are mixed with other numbers?
Any suggestion is highly welcomed
CREATE FUNCTION) so you don't have to repeat the logic in other statements.WHEREclause (see my answer).