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.
Laura2112Asked:
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.

i2mentalCommented:
Going to need more info. Can you please post the syntax you are using to evaluate the expression?
0
HoggZillaCommented:
I am going to write you a script task to display the values immediately following the precedence event. Coming in a bit. Thanks.
0
i2mentalCommented:
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
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

PedroCGDCommented:
do you have 2 rows linked to same task?
Regards!
Pedro

www.pedrocgd.blogspot.com
0
HoggZillaCommented:
Laura,
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

answer-variable.bmp
0
HoggZillaCommented:
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. :-)
0

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!!
0
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!  
0
HoggZillaCommented:
Great!!! Let us know when you get to the next step.
0
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.
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.