문제

I have a table

id txt
1  <html> ... a lot of different html tags
2  <html> ... a lot of different html tags
3   <html> ... a lot of different html tags

How can I parse txt so that I get plain text without all these tags?

도움이 되었습니까?

해결책

If you're on TD14 you might use REGEXP_REPLACE.

REGEXP_REPLACE(txt, '<[^>]*>', ' ', 1, 0, 'i')

This will return wrong results if you got '<' and '>' within, you should search for a better RegExp then.

다른 팁

You can use the REPLACE UDF which can be downloaded from https://downloads.teradata.com/download/extensibility/teradata-udfs-for-popular-oracle-functions

If you are on TD 14, then it has an inbuilt REPLACE function for the same purpose. (www.info.teradata.com/eDownload.cfm?itemid=113480017)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top