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.
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

Comments

Please log in to comment

There are no answers at this time
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

Answer this question or Comment on this question for clarity