Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002

    Unanswered: Export query in text file

    HI i did a query and i but it in a temp table. And i want to send it a texte file with.

    EXEC ('master..xp_cmdshell ''osql -S -U sa -P -q "select * from ##qryExportData" -o F:\Bridge\Export\PrdHrs' + @cur_server_descr + '.txt''')

    That it working fine. But i want to know hot to put a startCol and EndCol in the .txt

    Ex : i would like my first item to start at the position 1 and end a 10.
    My second start at 11 and and at 20.

    Is it possible.

    Thanks in advance

  2. #2
    Join Date
    Feb 2002
    You need to use bcp or dts (export).

Posting Permissions

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