So I have a bunch of strings in records that include the ‘/’ character, eg:
RECORD_NAME
Foo bar
Foo/bar
Fo/o/bar
And several million records.
I’m wanting to say, count the number of records with 2 ‘/’ characters.
So to look for one, I’d do, say:
select count(*) from my_table where record_name like '%[/]%'
Which would presumably get all the ones with one ‘/’ in there.
How do I go about counting the ones with say, two forward slashes? Can you include regular expressions in a SQL query?
this should work:
This way you will always include the rows with two
//, but if got three or more, thenot likewill avoid them