Add header to text file

  • Hi all

    I have to copy data from a DB (ODBC) into a textfile. This textfile should include a header with the total amount of data.

    What is the best way to solve this issue? How can i access the total of rows copied.

    cheers

    tom

  • Is the total count for information purposes (i.e. this could be calculated before the data is copied) or for veification that

    the correct amount of data was copied (i.e. this would have to be calculated after the data is copied)?

    If the first case is true you could maybe build a view with a count of the resultset union with the resultset itself (the number of fields

    in both selects with have to be the same with the same datatypes) then use DTS to export this view to the text file.

    Regards,

    Andy Jones

    andyj93@hotmail.com

    .

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply