I have procedure which results a data table contains 3 columns Emails,proposal_Type,count(MatchestoEmail) the matches is based on proposal_type. Now I have to send a notification mails to the 'Emails' stating that they have these many number of matches based on Proposal_Type. the procedure output data will be like this.
Emails Prop_Type Matches
abc@gmail.com 1 3
abc@gmail.com 2 4
def@gmail.com 3 2
I want the mails to be recipient and the remaining two columns to in the Body of the Email with some additional text. plz help me.
Thanks
A cursor would solve your problem:
Edited
This should work