dbTalk Databases Forums  

Rowcount in DTS

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


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



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

Default Rowcount in DTS - 01-27-2004 , 12:30 PM






Is there an easy way to grab the number of rows exported from a stored procedure into a text file via DTS & insert the rowcount into a table



---
Posted using Wimdows.net NntpNews Component - Posted from SQL Servers Largest Community Website: http://www.sqlJunkies.com/newsgroups/

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

Default Re: Rowcount in DTS - 01-27-2004 , 01:21 PM






In message <#cMskOQ5DHA.2760 (AT) TK2MSFTNGP09 (DOT) phx.gbl>, gunter
<river_witchhawk@-NOSPAM-yahoo.com> writes
Quote:
Is there an easy way to grab the number of rows exported from a stored
procedure into a text file via DTS & insert the rowcount into a table?

You can get the row count from the DataPump2 object, RowsComplete
property less RowsInError property. Use some script like below to store
the value in a global variable-

Dim oTask
Dim oDataPump

Set oTask = DTSGlobalVariables.Parent.Tasks("DTSTask DataPump 1")
Set oDataPump = oTask.CustomTask
DTSGlobalVariables("Rows").Value = oDataPump.RowsComplete -
oDataPump.RowsInError
Set oDataPump = Nothing
Set oTask = Nothing


I would then use an Execute SQL Task to insert the value into your
table.


--
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
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.