Table of Contents

Search

  1. Preface
  2. Product Overview
  3. Before You Begin
  4. Tutorial Lesson 1
  5. Tutorial Lesson 2
  6. Tutorial Lesson 3
  7. Tutorial Lesson 4
  8. Tutorial Lesson 5
  9. Tutorial Lesson 6
  10. Appendix A: Naming Conventions
  11. Appendix B: Glossary

Getting Started

Getting Started

Creating Target Tables

Creating Target Tables

Use the Target Designer to run an existing SQL script to create target tables.
When you use the Target Designer to generate SQL, you can choose to drop the table in the database before you create it. To do this, select the Drop Table option. If the target database already contains tables, make sure it does not contain a table with the same name as the table you plan to create. If the table exists in the database, you lose the existing table and data.
  1. In the workspace, select the T_EMPLOYEES target definition.
  2. Click
    Targets
    Generate/Execute SQL
    .
    The
    Database Object Generation
    dialog box appears.
  3. In the File Name field, enter the following text to generate SQL script called MKTABLES.SQL
    C:\
    <PowerCenterClientInstallationDir>
    \MKTABLES.SQL
    If you installed the PowerCenter Client in a different location, enter the appropriate drive letter and directory.
  4. If you are connected to the source database from the previous lesson, click
    Disconnect
    , and then click
    Connect
    .
  5. Select the ODBC data source to connect to the target database.
  6. Enter the necessary user name and password, and then click
    Connect
    .
    The following image shows the
    Database Object Generation
    dialog box with the File Name MKTABLES.SQL:
    ""
  7. Select the
    Create Table
    and
    Drop Table
    .
  8. Click
    Generate and Execute
    .
    The Designer runs the DDL code in MKTABLES.SQL to create T_EMPLOYEES.
    The results appear on the
    Generate
    tab in the Output window
    Optionally, to edit the contents of the SQL file, click the
    Edit SQL File
    .
  9. Click
    Close
    to exit the
    Database Object Generation
    dialog box.

0 COMMENTS

We’d like to hear from you!