/build/static/layout/Breadcrumb_cap_w.png

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

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.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ