cancel
Showing results for 
Search instead for 
Did you mean: 

Having issue with .contains

TAM
New Contributor

Here is what I have $message.contains(‘successful’) ? 1 : 0 . This should give me a count of “1” if the Stored Procedure executing correctly. I then have a UNION, AGGREGATE and a ROUTER to count the SQL EXEC snaps, however it is only counting the first one and not the rest. At the end I have an email if $cnt == 10 then Success email, if $cnt < 10 then Failure email. Since the counts are not happening the emails are not generating. Any help is appreciated.

14 REPLIES 14

cstewart
Former Employee

If you have both the Group By field and the the Count going to the field cnt, you will just get one output.

TAM
New Contributor

?? Meaning take out the group by? From docs I read it was better to have the group by. The main issue is once the EXEC is done to then hit the Mapper where I have the $message.contains (‘Successful’) ? 1 : 0

aleung
Contributor III

Agree with Craig, you should take out the group by

TAM
New Contributor

Sorry, email is just the PASS or FAIL from the count. There is not two separate routers at the end.

TAM
New Contributor

Should I only have Execute here:

image