Skip to content
Advertisement

How would i use a wildcard for a specific string in SQL

I have a string which I need to select in a CASE statement:

However, when I use the following string in my LIKE statement in SQL it returns null:

What would be correct syntax to use for this wildcard?

Advertisement

Answer

You should use '%LLF\_RET\_mob%' as in example below

Or you can use regexp as in below example

Obviously you can use both LIKE or REGEXP_CONTAINS as a condition in CASE statement

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement