0

I can use the regex comparing a comma delimited list of GUID against a column that is a string, but I am having trouble doing it with an integer like the one below. Am I doing something wrong or is this not possible?

select * from sims_role where organization_id REGEXP '4929,4930'

1 Answer 1

1

Perhaps you want:

select * from sims_role where organization_id REGEXP '^(4929|4930)$'

What you've used is identical to:

select * from sims_role where organization_id LIKE '%4929,4930%'
Sign up to request clarification or add additional context in comments.

1 Comment

Yep it was the pipe I was missing doh!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.