Filter regex in MSSQl

Posted by themamakcorner October - 28 - 2009 0 Comment
database

Tried some ways to eliminate regex in MSSQL. Example: If(CHARINDEX(‘$’, @name, len(@name)-1) >0) set @name = SUBSTRING(@name, 0 , len(@name)-1) What if I need to filter most of the regex? @#$%^&**()_+=, there’ll be alot If Else statement Finally found a solution, create a function as below: CREATE FUNCTION [dbo].fn_cleanchars (@str VARCHAR(8000), @validchars VARCHAR(8000)) RETURNS VARCHAR(8000) BEGIN WHILE PATINDEX(‘%[^' + @validchars + ']%’,@str) > 0 SET @str=REPLACE(@str, SUBSTRING(@str ,PATINDEX(‘%[^' + @validchars  [ Read More ]

How to use Oracle SQL Developer to connect to a MSSQL DB

Posted by themamakcorner October - 19 - 2009 1 Comment
database

I started my first job as a software engineer in a company that uses Oracle for every projects. That was when I was introduced to the beauty of Oracle SQL Developer. When I switched to another company, they uses Microsoft SQL Server. Having familiar with SQL Developer, I decided to use the same client tool. To set your Oracle SQL Developer to connect to other DB, please refer to the  [ Read More ]

Related Posts Plugin for WordPress, Blogger...