Created
January 30, 2014 11:50
-
-
Save grishin/8706957 to your computer and use it in GitHub Desktop.
How to clean SQL string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE Function [dbo].[fn_cc2RemoveNonAlphaCharacters](@Temp VarChar(1000)) | |
| Returns VarChar(1000) | |
| AS | |
| Begin | |
| While PatIndex('%[^a-z]%', @Temp) > 0 | |
| Set @Temp = Stuff(@Temp, PatIndex('%[^a-z]%', @Temp), 1, '') | |
| Return @TEmp | |
| End |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment