Can I use regex in SQL Server 2014? For example I have a column mobilenumber contains 7 rows with 8 digit numbers, like 66658697, 25365869 and so on.
How can I find all rows that contains n times of 6 for example?
Can I use regex in SQL Server 2014? For example I have a column mobilenumber contains 7 rows with 8 digit numbers, like 66658697, 25365869 and so on.
How can I find all rows that contains n times of 6 for example?
If you don't have a complex pattern to search for, then you can use LIKE:
SELECT *
FROM TABLE
WHERE mobilenumber LIKE '%666%'
Although, if you have a more complicated pattern you want to search for then you can take a look at PATINDEX.