Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2002
    Posts
    27

    Cool Unanswered: Create Text File

    I'm looking for a simple way to create a text file inside a stored procedure. I want to set it up so the end user would just execute the SPROC that would run the required queries and dump the result into a custom formated text file.

    I tried BCP but could not lauch it inside the SPROC without using OSQL. I am running SQL Server 2003 64bit. Any ideas?

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    what the hell is sql server 2003? Did I nod off for a few years?

    you could use dts and have your sproc fire the dts package without using xp_cmdshell.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Nov 2002
    Posts
    27
    SQL Server 2005...mistype

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    I have not gotten far enough into 2005 to deal with whatever they are calling DTS now. I forget.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Posting Permissions

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