I have the following query in a "Execute SQL Task".
Now, provided the query returns at least one record, I want to e-mail the results to a group of people.
How can I check to see if my query returned any results?
Can someone please point me in the right direction?
select person_id, firstname, lastname, People.univ_usr_id
inner join (SELECT univ_usr_id
WHERE Person_ID NOT IN (SELECT Person_ID from Multiple_Sources WHERE Source in ('D', 'Z')) AND univ_usr_id IS NOT NULL
GROUP BY univ_usr_id Having COUNT(*) > 1
) b on People.univ_usr_id = b.univ_usr_id