Hi All
I have one table name EmailTemplate in that table i have a column EmailContent where i have data like below:
Dear users,
__REQUEST_TYPE__ number: __NUMBER__
Customer: __OEM_GROUP__
Region/Division: __WORKFLOW_DIVISION__
Program: __PROGRAM__
Product line: __PRODUCT_LINE__
has been approved.
This __REQUEST_TYPE__ was submitted with the following ratios:
With the following validation comments:
- __COMMENT_LIST__
when i select the this data, i want to replace all these bold contents e.g __REQUEST_TYPE__ with some values which i will get from another table in my select statements.
i want to avoid this kind of exercise below:
select replace(replace(replace(TemplateContent,'__REQUEST_TYPE__','Weekly'),'__NUMBER__','Twice Weekly'),'__OEM_GROUP__','china') as content from mytable;
please let me know suitable solution.
thanks.

Arvind SinghRank #718 · 3.3K reputationPosted Mar 16, 2018, 1:57 AM EDT
Nitin SontakkeRank #264 · 9.6K reputationPosted Mar 15, 2018, 9:44 PM EDT
Hrides ThakurRank #6,608 · 261 reputationPosted Mar 19, 2018, 12:15 AM EDT