Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Number of Rows


Number of Rows

Author
Message
Dave62
Dave62
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3050 Visits: 2714
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!
venkat9.sql
venkat9.sql
SSC Veteran
SSC Veteran (270 reputation)SSC Veteran (270 reputation)SSC Veteran (270 reputation)SSC Veteran (270 reputation)SSC Veteran (270 reputation)SSC Veteran (270 reputation)SSC Veteran (270 reputation)SSC Veteran (270 reputation)

Group: General Forum Members
Points: 270 Visits: 260
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.. Hehe
Hugo Kornelis
Hugo Kornelis
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8319 Visits: 11552
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
Dave62
Dave62
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3050 Visits: 2714
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!
Hugo Kornelis
Hugo Kornelis
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8319 Visits: 11552
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,
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!


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
Dave62
Dave62
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3050 Visits: 2714
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!
dennisp
dennisp
SSC-Addicted
SSC-Addicted (445 reputation)SSC-Addicted (445 reputation)SSC-Addicted (445 reputation)SSC-Addicted (445 reputation)SSC-Addicted (445 reputation)SSC-Addicted (445 reputation)SSC-Addicted (445 reputation)SSC-Addicted (445 reputation)

Group: General Forum Members
Points: 445 Visits: 128
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
@Cassie
@Cassie
Say Hey Kid
Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)

Group: General Forum Members
Points: 681 Visits: 123
+0
Don't like these kind a questions.
SQL-DBA-01
SQL-DBA-01
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2318 Visits: 3168
I think inside the begin trans...commit, it all are counted as a single transaction. Hence 1 row is affected.

Thanks.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search