Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Printing to Paper from a SQL query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-03-17 : 08:34:47
Gary writes "I have a long sql query that I run every day manually in SQL Analyzer. The results are output to text. I then manually print the results to paper. I need the SQL code that will send the text results of the query to a printer automatically as part of the query."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-03-17 : 08:42:08
I wonder if this is possible thru SQL Server

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-17 : 09:52:41
i guess you could use xp_cmdshell and use print.exe [printerName] [txtFileName] to print it.
that would all be a part of a stored procedure not one query.

Go with the flow & have fun! Else fight the flow
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-03-17 : 10:15:03
How many trees do you plan to kill in the process?





Brett

8-)
Go to Top of Page
   

- Advertisement -