Results 1 to 3 of 3

Thread: write in files

  1. #1
    Join Date
    May 2004
    Posts
    15

    Unanswered: write in files

    Hi ..
    How can i write or read in a file.*
    forexample a.txt in a strore Prosedure ?

    thanks

  2. #2
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    Well, you can use a linked server to link to the document. You could also use OPENROWSET. It's all detailed in Books Online. I think OPENROWSET is your best bet, especially if the filename is variable.
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  3. #3
    Join Date
    Feb 2004
    Location
    PAKISTAN
    Posts
    106
    Hi, my problem relates to this thread
    I've generated a report(.txt) using QA. Has 5 columns. I want to read it back using QA.
    EXEC sp_addlinkedserver txtsrv, 'Jet 4.0',
    'Microsoft.Jet.OLEDB.4.0',
    'c:\server',
    NULL,
    'Text'
    The table name retuned by, EXEC sp_tables_ex txtsrv is: "report_c#txt"
    select * from txtsrv...report_c#txt
    returns the output as a single column.

    The problem is that i can't access individual columns. The column names displayed in QA aren't correct either.

    Howdy!

Posting Permissions

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