Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002
    Location
    sheffield, uk
    Posts
    14

    Question Unanswered: Transferring files

    I am using SQL Server 6.5 and would like to know the best way to transfer the contents of a Table to a PC on the Network as a Text file, using a Stored Procedure.

    The Table contains 1 Text Field and I just want to run a Stored Procedure that selects * from it, puts the data into a Text file called OUTPUT.txt and then sends the file on a Users PC on the Network.

    Thanks for your time.
    Mark Davies
    itsmarkdavies@hotmail.com

  2. #2
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    How do you want to do the transfer?

    isql and bcp will both produce a text file from a table.
    You can also send it via xp_sendmail specifying the results of a query as an attachment.

    There are some examples at
    www.nigelrivett.com
    Creating a text file from a stored procedure

    direct link at the moment
    http://home.btclick.com/NIGELRIVETT/WriteTextFile.html

    isql is replaced by osql in v7 but the systax is very similar.
    Look in bol.

Posting Permissions

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