dbTalk Databases Forums  

@@Rowcount

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss @@Rowcount in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter Newman
 
Posts: n/a

Default @@Rowcount - 12-11-2003 , 10:32 AM






Alan

thanks for the previous help, im still trying to avoid
having to go that routr. In an ExecuteSqlTask is there a
way to assign the @@rowcount to a global variable?

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: @@Rowcount - 12-11-2003 , 03:38 PM






In article <007f01c3c004$5b22df00$a301280a (AT) phx (DOT) gbl>, Peter Newman
<anonymous (AT) discussions (DOT) microsoft.com> writes
Quote:
Alan

thanks for the previous help, im still trying to avoid
having to go that routr. In an ExecuteSqlTask is there a
way to assign the @@rowcount to a global variable?

Try some SQL like this-

SET NOCOUNT ON
UPDATE dbo.DataPump255
SET Col1 = Col1
SELECT @@ROWCOUNT AS CountOfRows

then click Parameters, Output Parameter, Row Value, and map
"CountOfRows" to the global variable you want.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: @@Rowcount - 12-11-2003 , 03:57 PM



Wrap the UPDATE in a stored proc and return the value through an OUTPUT
parameter

Global Variables and Stored Procedure Parameters
(http://www.sqldts.com/Default.aspx?234)

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Peter Newman" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Alan

thanks for the previous help, im still trying to avoid
having to go that routr. In an ExecuteSqlTask is there a
way to assign the @@rowcount to a global variable?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.