Im rightly used to use MySQL, but not particularly familiar with SQL Server. Hard luck, the database that I come across here is on SQL Server 2014.
I have a table with a column whose values โโare integers with leading, separating, and end semicolons, like these three dummy lines:
Now I am trying to select all rows in which this column displays more than one number taken from a list of numbers. So, for example, given the three lines above, if I have a group 905,467,4767
, the Im statement, trying to figure out how to build, should return the first two lines: the first line contains 905 and 467; the second line contains 905 and 4767. The third line contains only 4767, so the line should not be returned.
As far as I can tell , SQL Server actually doesn't support regex (and I don't even know what managed code is), which doesn't help. Even with regex, I donโt know where to start. Oracle seems to have a feature that will be very useful , but it is Oracle.
( ) . , , , " 15 , SELECT
. , (, , , 29, 29 , 290 ), , REPLACE
, . .
, , - :
SELECT * FROM table WHERE REGEXP_COUNT(column, ';(905|467|4767);') > 1
- , , ( REGEXP_COUNT
Oracle).
, ?