We finally launched a very important web site yesterday.
The web application logs all of it errors in a sql server 2000 database, which is neat as we can review the logs and see what script produced the error, what specific query string was sent to that page, the exception it caused and the end user only sees a nice looking message of “We’re sorry, please try again” kind of thing.
I’ve been trying to isolate a pretty random error, trying to nail down the cause. I reviewed the error log table and need to filter an nvarchar field.
My T-sql sentence looks like this:
SELECT *
FROM dbo.ErrorLog
WHERE
(datestamp = ‘9/19/2005’) AND (error LIKE ‘Object reference %’)
Reviewing the help, I found there are very few wildcards and zero support for regular expressions.
So, here’s my formal complain, how are we going to do decent querying without regular expressions. I know MSSQL 2005 will include the .NET Framework inside and that means it will include the Regex namespace, but, wouldn’t it be more efficient to have reg exps on the T-sql level, instead of having the overload of creating objects just for using regexps?
I’ve been told we should avoid using the Framework on our SQL 2005 sprocs whenever we can accomplish the same task with T-SQL…
Regexps, regexps!