|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 7:20 AM
Points: 1,500,
Visits: 1,513
|
|
venkat9.sql (1/22/2013) I am a starter in sql server.. Can some one let me know why i dont get the 1 row(s) affected message as stated but simply Command(s) completed successfully message..
Hello, and welcome to SQL Server Central.
We don't actually execute the code to see the 1 row(s) affected message. There is a button near the top of SQL Server Management Studio that will "Display Estimated Execution Plan". If you click this button two tabs will open up in the results pane, an "Execution plan" tab and a "Messages" tab. If you click on the Messages tab, you will see the 1 row(s) affected message there.
Good luck!
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 6:30 AM
Points: 212,
Visits: 191
|
|
Thanks for the reply. I didn't execute the code. I just used the display estimated execution plan. I checked the messages tab and didnt get the 1 row affected message.
I am using 2008R2. I fiddled around ssms to see if I can display the rows affected message. but couldn't find anything. I did see few posts preiously stating that they didnt see the message either. I dont know if its a version difference or if its due to any settings in my ssms.
Thanks, VJ
___________________________________________________________________ If I can answer a question then anyone can answer it..trying to reverse the logic..
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:22 AM
Points: 5,244,
Visits: 7,059
|
|
venkat9.sql (1/22/2013) Thanks for the reply. I didn't execute the code. I just used the display estimated execution plan. I checked the messages tab and didnt get the 1 row affected message.
I am using 2008R2. I fiddled around ssms to see if I can display the rows affected message. but couldn't find anything. I did see few posts preiously stating that they didnt see the message either. I dont know if its a version difference or if its due to any settings in my ssms.
Thanks, VJ Menu-option Query / Query Options ... / Advanced / untick SET NOCOUNT (for current query window only) Or: menu-option Tools / Options / Query Execution / SQL Server / Advanced / untick SET NOCOUNT (default setting for all new query windows; will not affect windows already open) Or: Execute "SET NOCOUNT OFF;" (for current query window only; can be used to change setting for parts of a longer batch, but will only work when actually executing the code, not when requesting estimated execution plan)
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 7:20 AM
Points: 1,500,
Visits: 1,513
|
|
venkat9.sql (1/22/2013) Thanks for the reply. I didn't execute the code. I just used the display estimated execution plan. I checked the messages tab and didnt get the 1 row affected message.
I am using 2008R2. I fiddled around ssms to see if I can display the rows affected message. but couldn't find anything. I did see few posts preiously stating that they didnt see the message either. I dont know if its a version difference or if its due to any settings in my ssms.
Thanks, VJ
Thanks for the feedback. Since submitting the question, I have done further testing on a default installation of 2008 R2 SP1 and have been able to duplicate the results. The other poster who had a similar problem mentioned 2008 R2 SP2 so if you are using SP2 also then I think your conclusion must be correct that it's either a version difference or settings issue.
This makes the behavior even more curious to me because I would think the Messages tab involves basic functionality. I would further expect more documentation if any significant changes occurred between versions. Oh well, I guess there's always something new to learn in SQL Server.
Enjoy!
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:22 AM
Points: 5,244,
Visits: 7,059
|
|
Dave62 (1/22/2013)
venkat9.sql (1/22/2013) Thanks for the reply. I didn't execute the code. I just used the display estimated execution plan. I checked the messages tab and didnt get the 1 row affected message.
I am using 2008R2. I fiddled around ssms to see if I can display the rows affected message. but couldn't find anything. I did see few posts preiously stating that they didnt see the message either. I dont know if its a version difference or if its due to any settings in my ssms.
Thanks, VJThanks for the feedback. Since submitting the question, I have done further testing on a default installation of 2008 R2 SP1 and have been able to duplicate the results. The other poster who had a similar problem mentioned 2008 R2 SP2 so if you are using SP2 also then I think your conclusion must be correct that it's either a version difference or settings issue. This makes the behavior even more curious to me because I would think the Messages tab involves basic functionality. I would further expect more documentation if any significant changes occurred between versions. Oh well, I guess there's always something new to learn in SQL Server. Enjoy!
I already wrote last Friday that showing or suppressing the "xx rows affected" message is an option you can change. See my first message in this topic. In the message just above yours, I explain exactly how to change it. Nothing curious.
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 7:20 AM
Points: 1,500,
Visits: 1,513
|
|
Hugo Kornelis (1/22/2013) ... showing or suppressing the "xx rows affected" message is an option you can change. See my first message in this topic. In the message just above yours, I explain exactly how to change it. Nothing curious. Ah, setting it is then.
I may have missed the explanation last week amongst some of the less educational responses. 
Thank you for adding to the learning value of the discussion!
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 4:27 PM
Points: 432,
Visits: 103
|
|
sorry to say, but your question is bogus. I just ran it on my SQL 2008 instance and received no row(s) effected message at all. default settings. Doesn't even matter if set nocount is off/on. And I tested it with SQL 2012 too. Same results. The one thing that might be different is I'm using SSMS 2012.
Dennis Parks MCSE, MCDBA, MCSD, MCAD, MCTS
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 2:28 PM
Points: 515,
Visits: 119
|
|
+0 Don't like these kind a questions.
|
|
|
|