MS SQL Server
  Home arrow MS SQL Server arrow Page 6 - Using Data Transformation Services, part 4...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MS SQL SERVER

Using Data Transformation Services, part 4: Using the DTS Designer Objects (continued-2)
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 16
    2005-06-06

    Table of Contents:
  • Using Data Transformation Services, part 4: Using the DTS Designer Objects (continued-2)
  • Scenario of Data Transfer
  • Data Transfer Source
  • Data Transfer Destination
  • The Transform Data Task
  • Using the Transform Task
  • Column Transformation Code: Step 1
  • Column Transformation Code: Step 2
  • Column Transformation Code: Step 3
  • Executing the Package

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using Data Transformation Services, part 4: Using the DTS Designer Objects (continued-2) - Using the Transform Task


    (Page 6 of 10 )

    Col001 and Col002 of the source has the FirstName and LastName and this should be transferred to the Col001 of destination. Hence we remove the existing mapping by clicking on the connecting link and use the Delete button. The window should look like  in the next picture.

    Now highlight Col001 and click on the button New. This brings up the list of transformations that are available for the operations.

    From this the ActiveX Script will be chosen. By highlighting ActiveX Script and clicking OK brings up the next window where we need to add the script that will concatenate columns 1 and 2 from the source into column 1 of destination table.

    When you click OK to this you will see the following window Transformations Options in display. Take a minute or two to read the Transformation Description.

    You need to identify the source columns and the destination columns that participate in this transformation. Click on the tab Source Columns. This will bring up the next window.

    You will see the Available Columns in the Source. But since the default is copy columns, only Col001 is shown in the Selected Columns. Highlight Col002 in the Available Columns and click the > button to send it to the Selected columns. Click the Destination Columns tab after sending the Col002 to the Selected Columns. This brings up the next window wherein you configure the destination columns. To start with no columns are selected, the picture shows that out of the available columns, Col001 is selected(by the user).

     

    Now click on the  General tab. We will be returned to the one we saw earlier.

    Now click on the Properties... button. This brings up the next screen, ActiveX Script Transformation Properties window,  wherein you need to add your scripting for the transformation.

    Here you can choose the scripting language by clicking on the drop-down along side the label marked Language:. In this tutorial the default is accepted, which is VB Script. Click on browser to encounter the next window and look at the Package details, expand the source and destination columns to verify your choices. Everything related to this package ie shown in this expandable/collapsible treeview control.

    Now click on the Language tab. Directly below the language dropdown you have access to the various functions, control flow statements, etc which can be clicked, to be added to the scripting area on its right. It is best to use this rather than typing in the functions/control flow code. The window also opens up with a default function Main(). If nothing is added this function always returns a success.

    More MS SQL Server Articles
    More By Jayaram Krishnaswamy


     

    MS SQL SERVER ARTICLES

    - Completing the Introduction to Transact-SQL
    - A Brief Introduction to Transact-SQL
    - Lookups and Blocking Bad Data
    - Field Validation Rules for Blocking Bad Data
    - Using Masks to Block Bad Data
    - Blocking Bad Data
    - Using @@ROWCOUNT and TABLE Variables for Dat...
    - How to Use Variables, IF and CASE in Databas...
    - Creating Important Aspects of Notification S...
    - Working wth Variables in Database Interactio...
    - Delving Deeper into Notification Services
    - Notification Services
    - Building a Multi-table Report with SQL 2005 ...
    - A Secure Way of Building Connection Strings
    - Transferring a Database Using the SSIS Desig...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway