Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
otto
Starting Member
21 Posts |
Posted - 2005-06-08 : 18:49:51
|
I have a question about DTS's Transform Data Task.I have two databases that I'm transferring data between and I'd like to add a Execute SQL Task that inserts how many records were transfered. I know when I run the package, the GUI shows the number of records. I'd like to grab that value and put it into my history table.Any help would be appreciated. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-06-08 : 18:55:21
|
If you are transferring data between two databases, then do this instead of using DTS:DECLARE @rc intINSERT INTO Destination.dbo.Table1SELECT ...FROM Source.dbo.Table1SELECT @rc = @@ROWCOUNTINSERT INTO TransferTable(TableName, TransferCount)SELECT 'Table1', @rcTara |
 |
|
otto
Starting Member
21 Posts |
Posted - 2005-06-08 : 19:00:44
|
The other database is DB2 and I have to transform the data, so I don't think I can use straight SQL to do it. Thanks for a quick reply. |
 |
|
|
|
|