sql server - Please help convert sql string a.3.1 to (a).(3).(1) -


i need add ( , ) each character/number in string (excluding . string) . example need convert string a.3.1 (a).(3).(1)

i using sql server 2008 r2

thanks in advance.

just replace function work you.

replace . ).(. append ( , ) parenthesis @ beginning , end of string respectively

select '(' + replace('a.3.1', '.' , ').(') + ')' 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -