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.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Send email only if there is data in the file

Author  Topic 

rookie_sql
Constraint Violating Yak Guru

443 Posts

Posted - 2008-03-03 : 07:16:36
Hi i have a SSIS package, that looks at the @@rowcount in a table and if the rowcount is >= 1 then send the information on to a file.

Now i want to only email my self to say if the file has data in it.

Is there anyway of doing this on the send email task. Can i use an expression ?. I've check and i can't see a away of checking the file size etc.

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2008-03-03 : 08:30:52
Have an Execute SQL task get the row count and map the result to a variable. Evaluate this in an expression on a precedence constraint, i.e.:
@[User::RowCount]>0


Mark
Go to Top of Page
   

- Advertisement -