Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    268

    Unanswered: Variable and Text File

    Hi All,

    I was wondering if anybody knows how to put the values in the variable to a text file. I have a stored procedure that has a cursor that pulls certan records and then place them into a variable. I want to put the variable values into a text file. Any ideas?

    Thanks.

  2. #2
    Join Date
    Dec 2006
    Posts
    30
    Sounds like a job for BCP.

  3. #3
    Join Date
    Dec 2006
    Location
    Momence, IL USA
    Posts
    56
    The OSQL program can use the -o switch to send output to a file. That is usually the rowset returned from a query. It also writes out column headers; I don't know how to prevent that. This might not work for your purpose considering the cursor usage.
    Don't Bogart That Squishee!

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'd use DTS or SSIS for this kind of problem. This is the kind of problem that they were created to solve.

    -PatP

Posting Permissions

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