MS SQL Server
  Home arrow MS SQL Server arrow 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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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)


    (Page 1 of 10 )

    In the newest tutorial of the DTS series, Jay reviews the subjects of his last tutorials and moves on to a new proceedure. He focusses on discussing using ActiveX Script for transforming data as it's moving from the source to the destination.

    In the first tutorial on DTS the creation of the basic DTS unit, a package, is described using the Import Export wizard. Immediate execution of the package initiates and completes the process as well as creating a package for future reuse. A concrete step-by-step process of copying a database from one SQL server to another SQL server edition using the DTS editor is also described. Copy database is one of the simplest of tasks that can be easily accomplished with the Import Export Wizard or the DTS Editor.

    In the second tutorial, the main focus is on the usage of collections: connections and tasks. In order to describe their usage, a scenario is chosen where an MS Access table is populated by a query on three of the related tables in an MS SQL 2000 server which is then transferred to an MS Excel Worksheet after further filtering. In this example the entire package is developed using the DTS Editor.

    In the third tutorial, queried data from an MS SQL Server is transferred to a Text file. Since DTS differentiates between destination type text files and source type text files an intermediate ActiveX Script task is used to copy this destination type text file to a source type text file. This file is further transferred to a second destination type text file after further processing. In order to stage these tasks, a workflow process is installed so that only after the first data transfer, the second data transfer can take place. Data Transformation task requires the existence of source and destination at design time.

    DTS uses native OLEDB provider for its connectivity, but suitable configured ODBC counterparts can also be used. In this case DTS uses the OLEDB provider for ODBC for connectivity. The Data Pump is central to the operation for actually pumping the data from source to destination. Just bringing data from source to destination would not have been of much value as other processes such as Copy and FTP could do the same thing. The ability to transform data on its way to the destination is what makes it a unique tool.

    Transformation in DTS occurs between source column to destination column on a row-per-row basis. This transformation can be quite complex, or can be very simple. The default transformation between source to destination is just copying row-by-row of data which is the most common type of transformation used in practice. ActiveX script is used for more complex types of transformations such as combining source columns to feed into a single destination column, aggregation, validation etc. Whatever the script can accomplish, the DTS will be able to use in the transformation. However, if a new transformation is called for, a number of options exist as shown in the following list:

    • ActiveX Script
    • Copy Column
    • DateTime String
    • Lowercase String
    • Middle of String
    • Read File
    • Trim String
    • Uppercase String
    • Write File

    More MS SQL Server Articles
    More By Jayaram Krishnaswamy


     

    MS SQL SERVER ARTICLES

    - Windows Server 2008 as a Workstation OS
    - An Overview of Windows Server 2008 R2
    - LINQ to MySQL, Oracle and PostgreSQL Provide...
    - 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





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek