Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
T-SQL (SS2K5)
»
Resultset Size
Resultset Size
Rate Topic
Display Mode
Topic Options
Author
Message
Madhusudana Rao
Madhusudana Rao
Posted Friday, June 06, 2008 6:09 AM
Valued Member
Group: General Forum Members
Last Login: Sunday, August 28, 2011 2:21 AM
Points: 67,
Visits: 56
I have t-sql query, in which I do some transactions and return a result set. After I execute the query, I need the size of resultset. The resultset may vary from execution to execution.
How to calculate the size of resultset?
Thanks in advance.
Post #512815
GRE (Gethyn Ellis)
GRE (Gethyn Ellis)
Posted Friday, June 06, 2008 6:16 AM
Ten Centuries
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 9:55 AM
Points: 1,024,
Visits: 2,768
Do you mean the number of rows returned?
Gethyn Ellis
gethynellis.com
Post #512823
Madhusudana Rao
Madhusudana Rao
Posted Friday, June 06, 2008 6:18 AM
Valued Member
Group: General Forum Members
Last Login: Sunday, August 28, 2011 2:21 AM
Points: 67,
Visits: 56
I don't need number of rows, but I need the size of data in all rows in KB / MB.
Post #512825
GRE (Gethyn Ellis)
GRE (Gethyn Ellis)
Posted Friday, June 06, 2008 6:46 AM
Ten Centuries
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 9:55 AM
Points: 1,024,
Visits: 2,768
don't know if there is an easy way of doing that other than summing the size of the data types of all rows returned and then multiplying that by the no of rows returned.
Gethyn Ellis
gethynellis.com
Post #512847
bnarav
bnarav
Posted Wednesday, July 16, 2008 4:30 AM
Forum Newbie
Group: General Forum Members
Last Login: Monday, January 30, 2012 9:48 AM
Points: 2,
Visits: 40
I need to check the number of rows in a result set returned by a query in execute SQL task and execute different tasks based on the number of rows. Please let me know the steps for doing this.
Thanks
Post #535064
jcrawf02
jcrawf02
Posted Thursday, July 17, 2008 6:54 AM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 6:29 AM
Points: 2,551,
Visits: 18,885
bnarav (7/16/2008)
I need to check the number of rows in a result set returned by a query in execute SQL task and execute different tasks based on the number of rows. Please let me know the steps for doing this.
Thanks
check out @@rowcount in the BOL.
---------------------------------------------------------
How best to post your question
How to post performance problems
Tally Table:What it is and how it replaces a loop
"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Post #535929
Resender
Resender
Posted Thursday, December 16, 2010 7:16 AM
SSC Veteran
Group: General Forum Members
Last Login: Wednesday, March 27, 2013 8:55 AM
Points: 289,
Visits: 683
Is there a way to do this, calculate the size of the resultset in kb/mb
Post #1035821
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.