2

I've used SQL Server before, but I'm trying to get into stored procedures.

Every time I try to run a simple, test stored procedure in SQL Server 2012 Mgmt Studio, it opens a common dialog to save a report (.rpt) file.

If the procedure does nothing, shouldn't the output be a simple count, "0 rows affected" ?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sam Porch
  • 751
  • 5
  • 12
  • See also https://stackoverflow.com/questions/1227614/sql-server-management-studio-ssms-tries-to-save-to-file-instead-of-execute-on – M.M Jan 19 '23 at 08:30

1 Answers1

4

Looks in Tools, Options, Query Results, and ensure you have "Results to Grids" selected. If this is set to "Results to File", it will prompt you to save an .rpt file.

Note: when testing this, I had to close my query window and reopen it before the change took effect, not sure why.

Alan
  • 2,962
  • 2
  • 15
  • 18
  • I was also being prompted with a 'save as .rpt' when attempting to create a an SP. When I checked, I already had 'results to grid' selected; I gave this a thumbs-up simply because I was reminded to try restarting SSMS - which did the trick. – JonV May 05 '21 at 14:45