dbTalk Databases Forums  

How to Get UpdateRowCount value from global variable

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


Discuss How to Get UpdateRowCount value from global variable in the microsoft.public.sqlserver.dts forum.



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

Default How to Get UpdateRowCount value from global variable - 06-28-2006 , 09:16 AM






“GiUpdateRowCount” Global Variable Created DTS package


Update TableName
From TableName2
Where TableName.Col1 = TableName2.Col1
SELECT @@Rowcount AS UpdateRowCount

Above Query is used in Execute SQL Task

Once I execute the Execute SQL Task, UpdateRowCount value should pass to
Global variable GiUpdateRowCount, but It’s not passing to Global variable can
you gays tell me how to get this from this task.

Thanks for providing solution

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

Default Re: How to Get UpdateRowCount value from global variable - 06-28-2006 , 01:38 PM






Hello Rajesha,

Quote:
“GiUpdateRowCount” Global Variable Created DTS package

Update TableName
From TableName2
Where TableName.Col1 = TableName2.Col1
SELECT @@Rowcount AS UpdateRowCount
Above Query is used in Execute SQL Task

Once I execute the Execute SQL Task, UpdateRowCount value should pass
to Global variable GiUpdateRowCount, but It’s not passing to Global
variable can you gays tell me how to get this from this task.

Thanks for providing solution

I assume you have set the output variable options. Try adding SET NOCOUNT
ON at the top of the SQL.




Reply With Quote
  #3  
Old   
Rajesha
 
Posts: n/a

Default Re: How to Get UpdateRowCount value from global variable - 06-28-2006 , 05:02 PM



Dear Darren,
Thanks for your responce. It's related to DTS package.
Actually I wanted to pass @@Rowcount value to Global variable. Below code
is their in Execute SQL Task.

FYI:
Once I used Select query instead of Update Query then @@Rowcount value will
get in Global Variable. But I wanted to use update query.

Thanks and regards
Rajesha

"Darren Green" wrote:

Quote:
Hello Rajesha,

“GiUpdateRowCount” Global Variable Created DTS package

Update TableName
From TableName2
Where TableName.Col1 = TableName2.Col1
SELECT @@Rowcount AS UpdateRowCount
Above Query is used in Execute SQL Task

Once I execute the Execute SQL Task, UpdateRowCount value should pass
to Global variable GiUpdateRowCount, but It’s not passing to Global
variable can you gays tell me how to get this from this task.

Thanks for providing solution


I assume you have set the output variable options. Try adding SET NOCOUNT
ON at the top of the SQL.




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.