As kristen said you can use LIKE for the example you posted (a vowel followed by a number surrounded by any string would be)WHERE foo LIKE '%[aeiouAEIOU][0123456789]%'
You *can* included external calls to a regex function but it's generally really really slow. I've only ever had to do it once and that was a long time ago. This is the function I used:CREATE FUNCTION dbo.fn_regex( @pattern VARCHAR(255) , @matchstring TEXT ) RETURNS INTAS BEGIN DECLARE @obj INT SET @obj = -1 DECLARE @res INT SET @res = -1 DECLARE @match BIT SET @match = 0 -- Make the @res Object. EXEC @res = sp_OACreate 'VBScript.RegExp', @obj OUT IF (@res <> 0) RETURN -1 -- Assign the Pattern to it. EXEC @res = sp_OASetProperty @obj, 'Pattern', @pattern IF (@res <> 0) RETURN -2 -- Set to ignore Case EXEC @res = sp_OASetProperty @obj, 'IgnoreCase', 1 IF (@res <> 0) RETURN -3 -- Execute the regular expression EXEC @res = sp_OAMethod @obj, 'Test',@match OUT, @matchstring IF (@res <> 0) RETURN -4 -- Cleanup the object EXEC @res = sp_OADestroy @obj -- Return the results RETURN @matchENDGO
That was away back in 2000. Performance was really, really terrible but it worked.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION