Closed. This question needs details or clarity . It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post .
Closed 20 hours ago.
Improve this question
Example:SubNetwork=ONRM_ROOT_MO,SubNetwork=RadioNode,MeContext=BAS917L
I want to extract only RadioNode
SubNetwork=ONRM_ROOT_MO,SubNetwork=GALRNC1,MeContext=BAT045W
I want to extract only GALRNC1.
2条答案
按热度按时间pokxtpni1#
You can do it using
SUBSTRING
andLEFT
andcharindex
charindex
to get the position of your word in this case it isSubNetwork=
.SUBSTRING
to Extract characters from a string.LEFT
to Extract characters from a string (starting from left).Demo here
oaxa6hgo2#
Please try the following solution.
It is using JSON and will work starting from SQL Server 2016 onwards.
SQL
Output