Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Split the string at every 2nd colon using t-sql

$
0
0

Hi All,

I have a table with one column lets say Notes of datatype varchar(max)

Notes

ABC:123:XYZ
456789:CDEF:ADEF
CBD:12/12/2000:ZXCV

I want Output should look like below. It should split data at every 2nd colon. I need SQl code  for SQL Server 2008 R2


Notes

ABC:123
456789:CDEF
CBD:12/12/2000

Thanks,
RH


sql


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>