I worked on a stored procedure and hit the point where I have two really terrible lines. Is there a way to rewrite this more clearly in a stored procedure? If not, how would I like to create a function for this?
, REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(l.tenant_trading_name,'~','-'), '"','-'), '#','-'), '%','-'), '*','-'), ':','-'), '<','-'), '>','-'), '?','-'), '/','-'), '\','-'), '{','-'), '|','-'), '}','-') as trading_name , REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(l.suite_name,'&','-'), '~','-'), '"','-'), '#','-'), '%','-'), '*','-'), ':','-'), '<','-'), '>','-'), '?','-'), '/','-'), '\','-'), '{','-'), '|','-'), '}','-') as suite_name