Saving results to a tab delimted text file from a stored procedure (which auto runs)

  • Hi,

    I was wondering whether anyone could tell me how I set my stored procedure up so that the results are saved into a tabbed delimited text file. My stored procedure(s) will be set up as a job which will scheduled to run once a week.

    Please can anyone shed some light on how I may even begin to do this.

    Many thanks

    Reet

  • You can use bcp to copy the data to a text file in a stored storcedure.

  • If it is scheduled as a job where will you see the output.

    Create a DTS package destination as text file (Proerties Column delimiter TAB and TextIdentifier none)

    Create a connection

    Createa task to transfer the data from connection to text file. use SQL query and execute your stored procedure there.

    Schedule the DTS package. You will see that as one of the scheduled jobs.

    Hope this helps.

    Regards,
    gova

  • Thanks guys for all your help. I ended up creating a DTS.

    Cheers

    Reet

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

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