Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1011121314

Rowcount Expand / Collapse
Author
Message
Posted Friday, March 19, 2010 4:03 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 5:48 AM
Points: 3,241, Visits: 5,002
The result of the first Select @@RowCount depends upon the last query executed in the session.
I tried it in different ways;

1. Executed query that returned n number of rows and then executed the two statements and the result was (n,1)

2. I executed print '1' statement and then executed the two statements and the the result was (0,1).


but the BOTTOM LINE is ....

Lost my point....


----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sometimes, winning is not an issue but trying.

You can check my BLOG here

Post #886192
Posted Tuesday, March 30, 2010 10:11 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 10:07 AM
Points: 9,923, Visits: 11,170
Well, that taught me something new!



Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #893002
Posted Wednesday, May 26, 2010 11:07 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, August 19, 2013 6:30 AM
Points: 846, Visits: 61
the result depends on previous statement.
Post #928732
Posted Thursday, June 17, 2010 3:25 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, June 23, 2010 4:42 AM
Points: 125, Visits: 5
I also executed the query in sql server 2005 query analyzer but i got (0,1) as the output.
Post #938738
« Prev Topic | Next Topic »

Add to briefcase «««1011121314

Permissions Expand / Collapse