How to save the messages into a file that appear after running a query like '1 row affected' directly through a query?
Asked
Active
Viewed 61 times
0
-
1Welcome to SO! Please elaborate on your question about what software you are using, if it is a GUI based SQL or terminal based so that I can answer the question to your needs. – Vishal A. Dec 14 '21 at 07:01
-
If SQL Server: https://stackoverflow.com/questions/20012552/microsoft-sql-server-management-studio-query-result-as-text – Mitch Wheat Dec 14 '21 at 07:24
-
Hi, it is SQL server – Mominah Asif Dec 14 '21 at 07:30
-
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Dec 20 '21 at 10:30
1 Answers
0
Which Database do you use?
With an Oracle database you can use "spool".
Example:
spool 'Path to your file'
{your update / insert statement here}
spool off

CLoc
- 190
- 1
- 7