Query/Report Help needed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • surenm@gmail.com

    Query/Report Help needed

    Hello all,

    I need to do the following task repeatedly. I have been doing it
    manually until now and I am thinking if there is any way I could
    automate the whole process.

    Here is the task:
    For a selected group of tables, I need to create an Excel file with one
    worksheet per table. The worksheet contains information about the
    table.

    Here is an Example of Person table with fields PersonId, LastName,
    FirstName ...

    Column Name -> PersonId LastName FirstName ...
    Type -> char char char ...
    Length -> 6 50 50
    Data -> P00001 Smith John ...
    . P00002 Smith Joan ...
  • Thomas R. Hummel

    #2
    Re: Query/Report Help needed

    You can do this from within an ActiveX Script in DTS. Select the
    necessary information from INFORMATION_SCH EMA.COLUMNS, then use the
    Excel automation objects to put the data into the proper cells. You can
    then do the same for the actual data, using the column information that
    you selected to generate a SQL statement if your tables are constantly
    changing.

    You should be able to find information on using the Excel automation
    objects on the Microsoft website.

    HTH,
    -Tom.

    Comment

    Working...