![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, Is it possible to have DTS tp return a "number of inserted rows". What I want to do is If there has been inserted some rows I would like to do one thing. But if no rows has ben inserted i would like to do another thing. Is this Posible?? And how if yes? Best regards Morten |
#3
| |||
| |||
|
|
Hi, Is it possible to have DTS tp return a "number of inserted rows". What I want to do is If there has been inserted some rows I would like to do one thing. But if no rows has ben inserted i would like to do another thing. Is this Posible?? And how if yes? Best regards Morten |
#4
| |||
| |||
|
|
I have a DTS package containing a 'Execute SQL Task' within the task i have T-SQL to look for the number of affected rows. Example... DECLARE @AffectedRows int INSERT _TempTable SELECT stuff FROM table WHERE stuff NOT IN (select stuff from OtherTable) -- How many rows were affected..? SELECT @AffectedRows = @@ROWCOUNT -- If something happened perform next action IF @AffectedRows > 0 BEGIN......... -- HTH Ryan Waight, MCDBA, MCSE "Morten Kruse" <morten (AT) kruss (DOT) dk> wrote in message news:7328137a.0309160354.f4c0113 (AT) posting (DOT) google.com... Hi, Is it possible to have DTS tp return a "number of inserted rows". What I want to do is If there has been inserted some rows I would like to do one thing. But if no rows has ben inserted i would like to do another thing. Is this Posible?? And how if yes? Best regards Morten |
![]() |
| Thread Tools | |
| Display Modes | |
| |