0

Is there a way of printing the results of a batch file to a SQL Server database? I have managed to print the results to a txt file but I would like to print the results to a database instead.

I need to print each line of the result as it happens otherwise I would just insert the contents of the txt file into the database at the end.

Anyone got any ideas?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

You can created a text file as CSV format with proper delimiter and import that file into table in SQL server.

Follow this article

http://blog.sqlauthority.com/2012/06/20/sql-server-importing-csv-file-into-database-sql-in-sixty-seconds-018-video/

Vishwanath Dalvi
  • 35,388
  • 41
  • 123
  • 155