Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


adimichael
2009-05-18T18:05:08Z
I would like to build my recipients list for my notifications by pulling them from a SQL db. I don't see what I am looking for, so I assume I'll have to accomplish this in a separate task or job and use that in my other jobs/tasks. Has someone already done this and have an example they would be willing to share.

Thanks
Sponsor
Forum information
Support
2009-05-18T18:26:45Z
You use the SQL Task to retrieve the values. Then you use the Output of the SQL Task together with a Variable Replace function in the recipient box. You need to replace linebreaks with semicolon (;) which is used to separate each email.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
adimichael
2009-05-20T00:37:30Z
Thanks for pointing me in the right direction. I used the following in the SQL task:SQL text query tab and then created a task to set a user defined variable to the results of the sql task.

SELECT DISTINCT

emaillist = substring((SELECT ( '; ' + sqlEmailfield )
FROM sqlTableName t2
WHERE t1.sqlField = t2.sqlField

FOR XML PATH( '' )
), 3, 1000 )FROM sqlTableName t1 where sqlField = 'some criteria'
Support
2009-05-20T09:05:31Z
That is one good solution. Thank you for the information.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top