Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
diwaskarki
Creator II
Creator II

starts with function in a textbetween function

Hello guys,

I am using a textbetween function to extract some string from an xml that is stored in a one of the columns in my db2 table.  This is what the data looks like.

starts with.png

I am extracting the strings thats stored inside the list with this function:


TextBetween(Replace(Replace(Replace(Replace(ATTRIBUTES,chr(10),' '),' ', ''), '<String>', ''), '</String>', chr(10)), '<entrykey=" Starts with function?"><value><List>', '</List>') As [Removed Role Entitlements1],


I need a starts with function to use here.

I have used this function , where I could just hard code the entry key but the value here is dynamic except it always starts with _

I would really appreciate the help. rwunderlichsusovan.gmarksmunichstalwar1

4 Replies
marcus_sommer

Take a look on this approach: Re: XML within a column - need to parse.

- Marcus

diwaskarki
Creator II
Creator II
Author

Hi Marcus,

I dont think this would apply to my data, since I dont have a separate node for the data  I want to extract. Its in a list.

marcus_sommer

I think you should try to load the data as xml (just store one or two fieldvalues from the xml within a textfile and then loading from there with xml as fileformat per file-wizard and playing with it) . Even if you don't get your wished results directly it should be easier to extract it from this output.

- Marcus

diwaskarki
Creator II
Creator II
Author

I will definitely try it.