Showing posts with label SQL 2005. Show all posts
Showing posts with label SQL 2005. Show all posts

Monday, July 14, 2008

SQL Tips: Using Regular Expressions in SQL Query


One more; courtesy of our greate DBA - K. Fridman:

DECLARE @RegExp VARCHAR(100)
SET @RegExp = '%[^a-zA-Z0-9._-]%'
SELECT *
FROM Clients
WHERE PATINDEX(@RegExp, UserName) > 0


SQL Tips: Search String In All SP's


This is nice one; courtesy of our great DBA - Kostya Fridman:

SELECT name, OBJECT_DEFINITION(object_id)
FROM sys.procedures
WHERE OBJECT_DEFINITION(object_id) LIKE '%Search String%'

Monday, October 15, 2007

How to uninstall SQL 2005 if it's missing in Add/Remove Programs


First of all - here is the support KB article.
In my case - I was unable to uninstall SQL 2005 even manually from the command line (ArpWrapper was ceasing to work, displaying some "Registry Enumeration Failed" error and uninstalling components with MsiExec using their GUID's listed in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall just didn't worked).

I was able to do it by uninstalling SQL components manually with Microsoft Windows Install Clean Up utility (do it in order, specified in KB article).