I have two stored procedures that return result sets.
How can I use them to populate a string and update another column?
exec getEmailSignatureDetails 'Jane', 'Doe'
exec getFeaturedAccount 'June'
These both return columns that I would like to map to variables.
I would then like to put the variables into a string.
Then update a column in another table with that string.
Output from getEmailSignatureDetails
:
addCity | addLine | addSt | addZip | fName | lName
--------------+-------------+-------+---------+-------+------
San Francisco | 777 SV Lane | CA | 94016 | Jane | Doe
Output from getFeaturedAccount
:
month | img
------+----------
June | base64...
I would like to turn this into a string like
Your package has been delivered to
@fName @lName
@addLine
@addCity @addSt, @addZip
@img
And then update a column with this string matching on name.