| « Setting up DNN for two Countries and Regions | Using FOR XML to build bulkreg XML for DNN » |
SSIS 2008 Script Component lets you write in C#
I'm pretty new SQL Server and it's family of products so when I first started playing around with SSIS in 2005 it was hard for me to grasp the whole Data Transformation thing as well as writing scripts for the Script Component, especially when I was forced write them in VB when I'm a C# guy.
Well now I have nothing more to complain about because in SSIS 2008 you can write your scripts for the script component in either VB or C#!!! And just so I could try it out I went and found some VB code someone wrote for SSIS and changed it over to C#.
Regex r;
Match m;
string pattern = string.Empty;
string returnValue;
pattern = "^[A-Z][A-Z]?[0-9][0-9]?[A-Z]? ?[0-9][A-Z][A-Z]$";
r = new Regex(pattern, RegexOptions.Compiled);
m = r.Match(input);
if (m.Success)
{
// YIPPEE
}
else
{
// NOT GOOD
}
That felt good!!
Feedback awaiting moderation
This post has 29 feedbacks awaiting moderation...