August 7, 2008 at 1:20 pm
I use the following logic to make my package fail or succeed:
Dim YesterdaysCount As Integer
Dim TodaysCount As Integer
YesterdaysCount = CInt(Dts.Variables("varEmpDataYesterdayCount").Value)
TodaysCount = CInt(Dts.Variables("varEmpTempCount").Value)
MsgBox(Dts.Variables("varEmpTempCount").Value)
If TodaysCount = YesterdaysCount
Dts.TaskResult = Dts.Results.Success
Else
Dts.TaskResult = Dts.Results.Failure
End If
I would like to change the logic and would like to fail the task if
1) TodaysCount > YesterdaysCount + 5% of YesterdaysCount
OR
2) TodaysCount < YesterdaysCount -5% of YesterdaysCount
basically all I saying is fail the task if today's count is <95% of yesterdays count or 105% greater than yesterday's count. can someone provide me exact syntax... thanks
August 7, 2008 at 1:34 pm
If TodaysCount Cint((YesterdaysCount) * 1.05) Then
Success
Else
Failure
EndIf
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply