Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004

    Unanswered: Is there any way better than XP_CMDSHELL?

    Hi ..
    I want to Write in files or read from files
    for example i have My_File.txt . i need a syntax and i want to call this syntax in my Store procedure and this syntax write forexample " Hello Word " in My_File.txt .
    and i want another syntax that read from My_File.txt forexample "Word" from My_File.txt . what are those syntaxes do that ??

    Is there any way better than XP_CMDSHELL for writing in or reading from MyFile.txt ??


  2. #2
    Join Date
    Jun 2003
    Provided Answers: 1
    You could BCP the SQL file into a temporary table and then execute the code through dynamic SQL, but that is pretty round-a-bout.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

Posting Permissions

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