create a text file for the DTS

  • Hello,

    I want to create a text file which has the one variable in the steps which is getting the data from a table, as in the following example: The only varibale is chnging in the pattren is the @value which is getting it from a table called tbldatabases:

     

    @test-2=1

    @value= Northwind

    @test2=4

    ---------------

    @test-2=1

    @value=pubs

    @test2=4

    ---------

    @test-2=1

    @value=msdb

    @test2=4

    -------------

     

    Which way is the better way to create the file ?

    Thanks for the help.

  • If you want use DTS then check GLOBAL VARIABLES option...

    OR

    You can do the BCP in combination with xp_cmdshell using tsql too...

     

    MohammedU
    Microsoft SQL Server MVP

  • Maybe you can use lookups for this challenge

    http://www.sqldts.com/default.aspx?277,4

    Rgds

    Johnny

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

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