Parse Description
Hey Everybody,
I was trying to parse out the html tagging from KBSYS.PATCHLINK_PATCH.DESCR.
I wanted to create a report that would give patch name and description.
It doesn't look like the kbox has a Regex Replace function, so i came up with this.
This would be great if there was only one tag.
Anybody have any ideas on how to call this recursivly?
Is there another function that I'm missing that could help?
I also tried doing the following which would work if done enough but is inefficient at best.
All ideas welcome, thanks in advance
I was trying to parse out the html tagging from KBSYS.PATCHLINK_PATCH.DESCR.
I wanted to create a report that would give patch name and description.
It doesn't look like the kbox has a Regex Replace function, so i came up with this.
SELECT IF(Locate('<', DESCR) < Locate('>', DESCR), REPLACE(DESCR, Substr(DESCR, Locate('<', DESCR), Locate('>', DESCR) - Locate('<', DESCR) + 1), ' '), DESCR) DESCR,
DESCR,
UID
FROM KBSYS.PATCHLINK_PATCH
This would be great if there was only one tag.
Anybody have any ideas on how to call this recursivly?
Is there another function that I'm missing that could help?
I also tried doing the following which would work if done enough but is inefficient at best.
SELECT IF(Locate('<', DESCR) < Locate('>', DESCR), REPLACE(DESCR, Substr(DESCR, Locate('<', DESCR), Locate('>', DESCR) - Locate('<', DESCR) + 1), ' '), DESCR) DESCR,
DESCRA,
UID
FROM (SELECT IF(Locate('<', DESCR) < Locate('>', DESCR), REPLACE(DESCR, Substr(DESCR, Locate('<', DESCR), Locate('>', DESCR) - Locate('<', DESCR) + 1), ' '), DESCR) DESCR,
DESCRA,
UID
FROM (SELECT IF(Locate('<', DESCR) < Locate('>', DESCR), REPLACE(DESCR, Substr(DESCR, Locate('<', DESCR), Locate('>', DESCR) - Locate('<', DESCR) + 1), ' '), DESCR) DESCR,
DESCR AS DESCRA,
UID
FROM KBSYS.PATCHLINK_PATCH) A) B
All ideas welcome, thanks in advance
0 Comments
[ + ] Show comments
Answers (0)
Please log in to answer
Be the first to answer this question
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.