February 18, 2021 at 11:13 pm
is there a function to remove html tags from a varchar string? I need to query a single table that is similar across multiple databases (each of our business clients has their own database) and pull a job description from each. The table holds the data formatted as html so that it can be easily displayed on the page. The formatting will vary greatly among the business clients and can include inline style information or tables as well as strong, em, p, br, ul, ol, li tags
If there is no function for this any ideas how I go about it?
February 19, 2021 at 6:36 am
The formatting will vary greatly among the business clients and can include inline style information or tables as well as strong, em, p, br, ul, ol, li tags
In that case I reckon the answer is "no". If you were just trying to remove some consistent tags that would probably be OK, but would be fragile in case things changed in future.
I reckon the only way to hack HTML TAGs is with something that parses the HTML ... and I don't know of anything in SQL. If you must do it at the Server end then perhaps an OLE widget could do it ... but enabling OLE on the Server is not permitted in my company, maybe yours too.
Unless someone else has a smart idea I reckon it will be Data-out, through HTML parser that removes / cleans / makes consistent, and then data-back-in
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply