In SQL SERVER 2014 how to use regex to extract string ? example:
CN=John Lee 709123,ou=Users,OU=LA-US1242,OU=US,OU=nam,DC=DIR,DC=ABB,DC=com
SQL will return John Lee
The regex is ^CN=([^0-9]+) but how to applied this regex is SQL ?
In SQL SERVER 2014 how to use regex to extract string ? example:
CN=John Lee 709123,ou=Users,OU=LA-US1242,OU=US,OU=nam,DC=DIR,DC=ABB,DC=com
SQL will return John Lee
The regex is ^CN=([^0-9]+) but how to applied this regex is SQL ?
RegEx
and SQL Server are not the best friends...You might try it like this:
The result
UPDATE A more straight approach...
Another very efficient way to solve this: