O'Reilly logo

SQL Server 2017 Integration Services Cookbook by Dejan Sarka, Matija Lah, Christian Cote

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

  1. Add a new package to the AdventureWorksETL project. Rename the default package RegExValidation.dtsx.
  2. Create two package variables. Name them EmailRegEx1 and EmailRegEx2. Use the String data type for both variables.
  3. Drag the Script task to your control flow. Rename it ReadPatterns.
  4. Open the editor for this task. On the Script page of the Script Task Editor, make sure that the Visual C# language is selected. Add the User::EmailRegEx1 and User::EmailRegEx2 variables to the ReadOnlyVariables property, as shown in the following screenshot:
  1. Click the Edit Script button. Expand the Namespaces region. Add the System.Xml namespace ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required