Link to home
Start Free TrialLog in
Avatar of Svlss
Svlss

asked on

Row Count in SSIS

I am working on a ssis package i am extracting data from flat files to SQL tables. I want to add a script task or another alternative to check the row count and pass it to a variable and if row count > 1 i should run a task or if it is 0 then i should send an email.. So how can i capture rowcount and store in a variable?
Avatar of lcohan
lcohan
Flag of Canada image

Why don't use a boolean statement like:

IF EXISTS (SELECT * FROM bla_bla WHERE...)
BEGIN
              bla,bla,bla SQL here
END


instead of counting the number of rows and checking if >1?
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Svlss
Svlss

ASKER

How do i determine that rowcount value is passed to the variable?