Sayonara,
If I understood correctly you would like to have two branches of execution
from the decision point and execute one of them depending on the result. In
this case I'd recommend those two branches be created as separate(detached)
with the first steps disabled. The decision step would set new two package
variables to -1 to leave the branch disabled or to 0 to enable it. You'd
need to add Dynamic Properties step to the decision step to set Disabled
property of first steps of the branches to the variables. The decision step
can be an Execute SQL Task (or ActiveX) with the following SQL and the
variables going as the output parameters:
SELECT DisableEmail = SIGN(COUNT(*)) - 1
,DisableProcessing = -SIGN(COUNT(*))
FROM Processed_Table
WHERE lastname LIKE '%,%'
Ilya
[quoted text, click to view] "Sayonara" <me@msn.com> wrote in message
news:2llmekFedbcpU1@uni-berlin.de...
> Hey all,
>
> Sorry to swamp the newsgroup buuut... In the ActiveX script area of an
> Execute SQL Task is where my problem lies. I am having difficulty getting
> SQL to talk to VBScript...
>
> sqlstatement = "IF (SELECT COUNT(*) FROM "&
> DTSGlobalVariables("Processed_Table").Value &" WHERE lastname LIKE '%,%')
>
> 0"
>
> I'm trying to get the line above (which simply checks if the lastname
field
> has a comma in it) to do the following: If TRUE (ergo, there are any
commas)
> then stop processing and send an email. If FALSE, then continue on
following
> the "success" arrows to completion.
>
> Make sense? Of course I can execute the SQL statement through VBScript
fine,
> I just can't figure out my next step... Any help is greatly appreciated!
> THANKS!!!
>
> I will be a DTS pro yet!
>
>