Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002
    Posts
    4

    Unanswered: while converting to a text file

    Hi all,

    I am trying to export tables into text format in SQL server 7.0 using DTS.

    The problem is I have 2 tables with 105 and 75 columns repectively.

    I/P from SQL Server
    -------------------
    Table1: 105 columns
    Table2: 75 columns

    Table1 and Table2 are related by a PK.
    Each tuple in Table 1 related to 1 or more tuples in Table2 by a key

    O/P to text format should be so that it displays:
    -------------------------------------------------
    1).(Table1 1st unique id) Table1's 105 columns (carriage return after 105 columns)
    1.1). Table1 related Table2's 75 columns (carriage return after 75 columns)
    1.2). Table1 related Table2's 75 columns (carriage return after 75 columns)
    1.3).
    .
    .
    .
    so on
    2).(Table1 next unique id) Table1's 105 columns (carriage return after 105 columns)
    2.1).
    2.2).
    .
    .
    .



    Any ideas ??

    Thanks

  2. #2
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    Do you have to use dts?
    I would probably do this in a stored proc by building the output in a temp table then using osql or bcp to output.
    Should be easy that way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •