Would someone please help me to write a SQL SP that would query two tables and email the people in the second column of the TableB. The structure of the tables are as below:
TableA
ColumnA(Pkey) ColumnB (Identical Column to ColumnA of the TableB)
-----------------------
Value1 ValueB1
Value2 ValueB2
Value3 ValueB3
Value4 ValueB1
Value5 ValueB1
TableB
ColumnA ColumnB
-----------------------
ValueB1 User1
ValueB2 User2
ValueB3 User3
Email Format for User1:
Dear User1,
"Below are your query results:"
ColumnA(From TableA) ColumnB(From TableB)
Value1 ValueB1
Value4 ValueB1
Value5 ValueB1
And the same email to the remaining usersB and C which corresponds to the values in TableA and TableB.
Thank you so much!