August 20, 2009 at 2:38 pm
With that expression, you will send an e-mail every time your Error Count is greater than or equal to your Max Count. If you want to get an e-mail only when errors reach 20, then you need to set your max count to 20.
August 20, 2009 at 2:42 pm
I got you but my question is that suppose while loading a data i just get one error, and my max condition is same upto 50, do I get an email message or not. Over all i need to get an email message whenever an errorcount is greater than 0 upto 50 limit.
August 20, 2009 at 2:48 pm
Your current expression will not do that. In that case, you'd want your expression to evaluate to True when error count > zero and error count 0 || @[User::ErrorCount] <= @[User::MaxCount]
August 20, 2009 at 2:57 pm
well i tested with the new expression, it will send an email even if there are o errors.
August 20, 2009 at 3:10 pm
August 20, 2009 at 3:17 pm
I tested with && also, and weird part is that it doesnt send any email on both condition? and on || it will send email on both condition.
August 20, 2009 at 3:28 pm
So you ran it with && and verified that your error count variable was between 0 and 50? Did you use the debugging mode to verify the variable values?
August 20, 2009 at 3:37 pm
Yes i verified with && and no email is sent when there are errors upto 50, and even i debug with toggle breakpoints, weird is that watch1 window is disabled. I have attached the scren shot.
August 20, 2009 at 3:43 pm
Its disabled because the package thinks it is finished. It will never make it to the breakpoint if the expression does not evaluate to true.
Remove the expression from the precedence constraint and re-run the package, using the same toggle point, to capture the variable values.
August 20, 2009 at 3:49 pm
here it goes
August 20, 2009 at 3:59 pm
Given the variable values, wouldn't you expect there to be no e-mail?
when ever there is an error upto 50 on a flat file it should send me an email,
I thought you only wanted to send an e-mail if there was 1 - 50 errors?
I would say that the expression is working just as we discussed.
August 20, 2009 at 4:03 pm
Yes you are correct I need to send an email when ever error occurs from 1-50, on 0 error no email.
I didnt undertand what you were trying to explain me in this message. Which expression you mean its working.
August 20, 2009 at 4:05 pm
The expression is working. Your error count is 495. That is more than 50 so you should not get an e-mail.
August 20, 2009 at 4:14 pm
I think you are confused, see this screnshot, i havent put any value on email expression so i wont get any email.
August 20, 2009 at 4:18 pm
No, you set a breakpoint on that task. That prevents it from running until you tell SSIS to continue. If you exit debugging mode, the task will never run.
The last expression that I posted will do what you asked it to do. Add the expression back into your precedence constraint, remove the break point, and re-run the package.
Viewing 15 posts - 16 through 30 (of 39 total)
You must be logged in to reply to this topic. Login to reply