How do I extract only the string after CX_EduDegree=???????
and replace the %20
with spaces. The data is separated by spaces, and is never in the same position.
I have tried to use the patindex with substring and replace. But I have had no success.
select top 5 clientid, extFields
from tblSYS_Clients
where ExtFields like '%CX_Edu%'
and ClientID in ('1633496','1633692','1453977','1657410','1584563','1655341','1632686','1352611','1484271','1361354')
clientid extFields
1352611 CX_CurrentJobStartDate=01/20/2001 CX_CurrentJobHours=40 CX_SupervisorName=Rhonda%20Kaiser CX_EduDegree=BS%20in%20Nursing CX_SupervisorPhone=970-495-8100
1361354 CX_CurrentJobStartDate=06/20/1997 CX_CurrentJobHours=30 CX_SupervisorName=Georgia%20Chapin CX_SupervisorPhone=702-616-5632 CX_EduDegree=MS/MA%20%20in%20Nursing
1453977 CX_CurrentJobStartDate=08/20/1990 CX_CurrentJobHours=40 CX_SupervisorName=Jan%20Rasco CX_SupervisorPhone=281-631-8789 CX_EduDegree=Diploma
1484271 CX_CurrentJobStartDate=01/01/2011 CX_CurrentJobHours=40 CX_SupervisorName=Kay%20Hix CX_SupervisorPhone=317-329-7209 CX_EduDegree=AD%20in%20Nursing
1584563 CX_CurrentJobStartDate=11/26/2006 CX_CurrentJobHours=40 CX_SupervisorName=PHILLIP%20MOISUK CX_SupervisorPhone=916-453-4545 CX_EduDegree=BS%20in%20Nursing
Results I want to see:
1633496 BS in Nursing
1633692 BS in Nursing
1453977 Diploma
1657410 AD in Nursing
1584563 BS in Nursing
1655341 AD in Nursing
1632686 BS in Nursing
1352611 BS in Nursing
1484271 AD in Nursing
1361354 MS/MA in Nursing