SQL Regex函数类似于MySql REGEX函数 [英] SQL Regex function that is similar to the MySql REGEX Function
问题描述
我正在寻找一个能够与TSQL的MySQL REGEX函数做相同事情的函数. 基本上我需要我的查询看起来像以下内容:
I am looking for a function that would be able to do the same thing as the MySQL REGEX function for TSQL. Basically i need my Query to look something like the following:
SELECT * FROM Routing WHERE (@Message REGEX RouteRegex);
我目前不希望使用CLR.
I am not to keen to use CLR at this point in time.
有什么想法吗?
推荐答案
此链接是通过服务器上的VBScript.Regex库编写正则表达式的文章:
This link is an article to writing Regular Expressions via VBScript.Regex library on your server: http://www.sqlteam.com/article/regular-expressions-in-t-sql
它通过 OLE自动化与Regex库进行通信由于存在安全隐患,因此默认情况下处于关闭状态.
It communicates with the Regex library via OLE Automation which is turned off by default since it is a security risk.
我的观点是通过CLR使用 Regex .
My opinion is go with Regex via the CLR.
这篇关于SQL Regex函数类似于MySql REGEX函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!