MS SQL Server
  Home arrow MS SQL Server arrow Page 3 - Using Data Transformation Services, part 2...
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 
Mobile Linux 
App Generation ROI 
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 2: Using the DTS Designer Objects
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 27
    2005-05-11

    Table of Contents:
  • Using Data Transformation Services, part 2: Using the DTS Designer Objects
  • Creating an SQL Server connection
  • Creating a Task to transfer query result to a table
  • Creating a connection to MS Excel
  • Configuring the Transform Data Task
  • Executing the package and verifying the transfer

  • 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 2: Using the DTS Designer Objects - Creating a Task to transfer query result to a table


    (Page 3 of 6 )

    From the Task menu item, select the Transform Data Task. The Select Source Connection pop-up text gets attached to the cursor. Place it on the SQL Server connection, and it immediately changes to Select Destination Connection; now place it on the MS Access database. The two databases get connected by an arrow pointing from the SQL Server to the MS Access as shown. The above sequence is shown in the next three pictures. The arrow represents the task that is added, and it remains to be defined.

    Configuring the Transform Data Task

    A text annotation in green, Transform Data Task, has been added. Place the cursor on the arrow (Transform Data Task arrow), and when it changes to arrows pointing North-South, right click to show the drop down menu. Click on the properties item. The Transform Data Properties window opens up with the Table/View default as shown. From this a table or view can be chosen. If you choose a table or view, it can be previewed using the Preview... button. From this menu it is also possible to execute the task (step) as well configure workflow properties.

    Choosing the SQL Query radio button, click on the Build Query... button. This opens up the Data Transformation Services Query Designer window as shown. The DTS Query builder is not the same as the Query Analyzer, or the Query Builder in Visual Studio, but is similar in functionality.

    Drag and drop the tables, Orders, Order Details, and Products and choose columns from the three tables. There is no specific reason for this choice other than illustrating the method. The Where clause was added to the SQL text as shown to get a reduced set of rows.

    When you click to close the window, you are returned to the Transform Data Task window as shown. Here you can click on Parse query.. to test whether it has the correct syntax, or Preview.. the data which shows up in a View Data table (not shown here).

    Clicking now on the Destination tab pops up the Create Destination Table window as shown. The results from the query are going to be loaded into a table with the default name New Table as shown here.

    You may change the name of the table into something meaningful by changing the string "New Table" to something else. Here the default name is accepted. This table structure will be created in the SQLAccessNew.mdb database when the package is executed. At this point, the entire query output is going into the Access table. When you click OK to this Create Destination Table window, you will see the following picture.

    The next tab to work on is Transform. When you click on this, the following window shows up with default mappings. The six column mappings can be changed by selectively clicking on the connecting line from source to destination. We will look at transformations in another tutorial; for now, accept the default by clicking OK. We also give a name to the Transform: MapSQLACC. Now if this package were to be executed, the table will be filled with the results of the query.

    Using the file menu, the package can be saved with a name. This package is saved as MSA. To save to local server, you may need to provide authentication information. The default shown here should be sufficient for this example.

    More MS SQL Server Articles
    More By Jayaram Krishnaswamy


       · This is a good article about using the DTS Designer to create DTS packages, but it...
       · Everything about DTS is covered by Microsoft, including this one. While this covers...
       · have read your articles regarding DTS, they are very useful, but still i have some...
       · You seem to have two different servers, and looks like you need to write a trigger...
       · Hi Jayaram,I am developer, i am not getting what you exactly saying?Please can...
       · I have read your articles and they are very useful,but still i have some...
       · The options I suggested are just possibilities. Can they work? I need to test them...
       · Hi, I found your DTS lesson very helpful; I looked for a decent tutorial for DTS in...
     

    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 4 hosted by Hostway
    Stay green...Green IT