can you output a query to file

can you output a query to file

Post by Salman Ran » Fri, 17 Apr 1998 04:00:00



does anyone know how to ouput a querry from a stored procedure or trigger to
an ASCII file?

 
 
 

can you output a query to file

Post by Neil Pik » Thu, 23 Apr 1998 04:00:00


Salman,

 Either run it via ISQL and pipe the results out.  Or put the results
in a table and bcp out via xp_cmdshell,.

 Neil Pike MVP/MCSE
 Protech Computing Ltd

 
 
 

1. Spooling output of query to test file using query analyzer

What I'm actually looking for is a way to have a SP run (as a scheduled job on a
daily basis) which creates a daily report.  But as part of the filenaming for the
daily report, I want to use the GETDATE() function to append or prepend the
current date to the output file.

Now using scheduled jobs, you can define the output file, but you cannot contain
any T-SQL in the filename.  Thus I would like to code the path and filename for
the SELECT output into the SP and concatenate the GETDATE() function on the end.

Is there an easy way to do this?

2. Help: 7.4d NT client & NT server

3. Cans access2.0 engine access btrieve files?

4. Two slicers in MDX

5. output query results to a text file

6. Cognos Powerplay - Upfront xml development

7. Help : Spooling query output to file

8. Access SQL Server from VAX/VMS

9. Spool output of query to a file?

10. sending query output to a text file

11. how do i hide the table names when i output a sql query to a file

12. Writing Query output to a Text file

13. Query Output file