SQLTeam.com | Weblogs | Forums

Need SSIS Expression


#1

I have an string like "A10" or ""AB12". I need to exclude the alphabets and just need to send the numeric value to target table. How can I write an expression for this kind of strings in SSIS. Could some help me out.


#2

SSIS has access to all the of the wonders of C# so you can use a regular expression depending on how you are moving the data around such as via a script or transformation.

Regex.Replace(s, "[^0-9.]", "")

This post has great information on how to accomplish that using expressions.

https://social.msdn.microsoft.com/forums/sqlserver/en-US/4409eb24-4cde-43ea-b3e6-912420e88c2a/remove-alphabets


#3

Thanks James