Output query result to a text file?

Output query result to a text file?

Post by MC » Sun, 17 May 1998 04:00:00



I am using sql 6.5.
Is there a way I can output the query result to a text file instead of
having it displayed on the result screen.
Actually, what I want is : By executing a stored procedure from VB5. The
result of the query in the stored procedure will be output to a text file.
--
MC Chan

 
 
 

Output query result to a text file?

Post by Brian K. Lawto » Mon, 18 May 1998 04:00:00


Have you looked at ISQL.  You can feed it an input file or query (in your
case an stored procedure call, and direct the output to a file.  The calling
syntax might look something like this...

    isql -Usa -Ppassword -q"exec spYourStoredProcedure" -oOutPutFilename
or
    isql -Usa -Ppassword -iInputFile -oOutPutFile

________________________________________________

RDA Consultants Limited (http://www.RDAConsultants.com)


>I am using sql 6.5.
>Is there a way I can output the query result to a text file instead of
>having it displayed on the result screen.
>Actually, what I want is : By executing a stored procedure from VB5. The
>result of the query in the stored procedure will be output to a text file.
>--
>MC Chan



 
 
 

1. output query results to a text file

Hello all,
I am trying to write a sproc that I can schedule as a Scheduled Task in SQL
Server 6.5.   How can I save the output to a text file?

I know how to email the results of a query but can't for the life of me
figure out how to write out to a file.  I'm sure I am missing something very
basic and am hoping someone can point me in the right direction.

Many thanks,
Deb Joyce

2. deadlock

3. Output Query Result to Text File with BCP

4. DIAG_ERROR open locfile for read failed!

5. Output Query Results to Text File

6. Renumbering SubGroups on Reports

7. Need to output query results to a delimited text file

8. two sql commands instead of one

9. How to output results onto a TEXT file?

10. Output result into text file

11. Outputting results to a text file

12. result of SQL statements, should be output it to a text file