Five Stars

Query result in tSendMail

I query my database to get a small table (7 rows, 2 columns), indicating if a process was successful or not.

In particular, if any of the rows has a zero in the second column, the process has failed. 

I would like to branch: if no rows contain zero's send mail all went ok, if not, send one mail either containing the zero rows in some formatting or just send the table (ie the query result.)

 

I have tried using a tFilterRow, but then i send 1 mail for each row, and i just one email with the content of the mail depending on the query result.

 

2 REPLIES
Four Stars

Re: Query result in tSendMail

Maybe you could use the filter and put the rows in a delimited file using a tFileOuputDelimited and enable the 'Don't generate empty file' option. And use on Subjob OK to trigger a tFileExists to check if a file was created. If there is a file you can use a tFileInputRaw to pick up the content and mail it. If there is no file there is no error.

Five Stars

Re: Query result in tSendMail

Thanks, i will try this after the weekend. After i have found a way to put my project under version control.