nathanharcup
MIS
Hi Everyone,
I am trying to create a package which sends an email if there are values in one table that are not in another, I created a SQL Task as follows;
IF exists (SELECT * FROM table1 WHERE ID not in
(select ID from table2))
begin
PRINT 'NOT OK'
end
ELSE
PRINT 'OK'
However I could not see a way of using a workflow to only send when the output is 'not ok', should I be doing something else
Thanks for all your help
Nathan
I am trying to create a package which sends an email if there are values in one table that are not in another, I created a SQL Task as follows;
IF exists (SELECT * FROM table1 WHERE ID not in
(select ID from table2))
begin
PRINT 'NOT OK'
end
ELSE
PRINT 'OK'
However I could not see a way of using a workflow to only send when the output is 'not ok', should I be doing something else
Thanks for all your help
Nathan