SSIS - Expression and Constraint

Hi, I coded a Expression and Constraint in my package and although I know the value is true, "Yes", it is not kicking off my next SQL task that executes a proc.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Going to need more info. Can you please post the syntax you are using to evaluate the expression?
Steve HoggITCommented:
I am going to write you a script task to display the values immediately following the precedence event. Coming in a bit. Thanks.
You can see the values just by putting a break point on the next step and stepping into the code. Look in the "Locals" tab and find your variable. More importantly is how you're testing against that variable in your expression. The syntax is picky and will test as true innacurately if not done right

Example: @[User::FileExists] == 1
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

do you have 2 rows linked to same task?
Steve HoggITCommented:
Drag a Script Task into the Control Flow window. Grab the green arrow from your Execute SQL Task which populates the Answer variable and connect it to the new Script Task.
In the Script Task, type in the name of your variable (in this case, Answer) into the ReadOnlyVariables property.
In the Script Task put the following code. This will popup a message box with the Answer variable value. Let's verify it is what we think it is "Yes".

Public Sub Main()
        ' Add your code here
        Dim WhatIsTheAnswer As String
        WhatIsTheAnswer = Dts.Variables("Answer").Value.ToString
        MsgBox(WhatIsTheAnswer, MsgBoxStyle.OkOnly, "Survey Says ...")
	Dts.TaskResult = Dts.Results.Success
End Sub

Open in new window

Steve HoggITCommented:
I just noticed, you have the CASE statement write the word "YES" in uppercase and then in your precedence constraint you have a mixed case "Yes". Shame .... LOL. :-)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Laura2112Author Commented:
Silly SQL!  I am looking forward to getting to this later today. Thnks Steve!!
Laura2112Author Commented:
Man, I am just getting a chance to look at this!  you were right, the upper/lower case made the difference. Now the only problem I have is that the parameters are not set correctly or the syntax is wrong in the third SQLTask. I will try to do what you suggested using script to see what the start and end dates look like. Have a greast weekend!  
Steve HoggITCommented:
Great!!! Let us know when you get to the next step.
Laura2112Author Commented:
Thanks HoggZilla, I will have to pick this back up when they give me mored time at work. I apopreciate your help!  You got me the answer that I needed. I will test further and post another question iof need be. Take care.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.