Hi All,
I have a table with one column, lets say Notes of datatype varchar(max).
Source Date:
Notes
ABC:123:XYZ Dept:IT NameID:1 Name:Tom Hummer Date:04/12/2004
456789:CDEF:ADEF
CBD:12/12/2000:ZXCV Dept:HR NameID:1 Name:Sam Dope Date:06/17/2005
I want Output should look like below. It should split data at 'Dept:' and 'Name:' I need SQl code for SQL Server 2008 R2
Output:
Notes
Dept:IT Name:Tom Hummer
Dept:HR Name:Sam Dope
Thanks,
RH
sql