Technetshadow

Technetshadow

  • NA
  • 148
  • 7.7k

SQL Server Parse Key Value from text

Jul 21 2014 3:38 AM

i am a novice programmer in sql.

I want to grab some key value pairs from the text in sql column

e.g.

some text[Key1=Val1]some text[Key2=Val2][Key3=Val3]some text

i want a function which takes Keyname as input & returns the value related with it if found.

GetValueFmKey('Key1') 

should return Val1 and like on.

Note: the specified values are in text it may have pre or post text exists.


Answers (1)