checkssraka.blogg.se

Sql get plain text from html
Sql get plain text from html











sql get plain text from html

sql get plain text from html

I hope you can help me.This query works with varchar fields. Thank you very much Tara.I've got one more question.

#Sql get plain text from html update

SET NOCOUNT ONCREATE TABLE tbl (col VARCHAR(500) NOT NULL PRIMARY KEY) GOINSERT tbl SELECT 'blabla nla bla bla bla ' INSERT tbl SELECT ' bla bla' INSERT tbl SELECT 'bla bla bla bla bla bla bla' UPDATE tblSET tbl.col = REPLACE(col, SUBSTRING(col, CHARINDEX(' col), ABS(CHARINDEX(SPACE(1), col, CHARINDEX(' col)) - CHARINDEX(' col))), '' + SUBSTRING(col, CHARINDEX(' col), ABS(CHARINDEX(SPACE(1), col, CHARINDEX(' col)) - CHARINDEX(' col))) + '') FROM(SELECT SUBSTRING(col, CHARINDEX(' col), ABS(CHARINDEX(SPACE(1), col, CHARINDEX(' col)) - CHARINDEX(' col))) c1 FROM tbl WHERE col LIKE '% DSELECT *FROM tblDROP TABLE tblTara The goal is to realise an UPDATE Query with the result of the following query (and I'm not good enough to find it ) : SELECT REPLACE(col, c1, '' + c1 + '') FROM (SELECT col, SUBSTRING(col, CHARINDEX(' col), ABS(CHARINDEX(SPACE(1), col, CHARINDEX(' Liens)) - CHARINDEX(' col))) FROM tbl WHERE col LIKE '% D (col, c1)Any idea ? PS : We can imagine this table : CREATE TABLE tbl (col VARCHAR(500) NOT NULL PRIMARY KEY) GOINSERT tbl SELECT 'blabla nla bla bla bla ' INSERT tbl SELECT ' bla bla' INSERT tbl SELECT 'bla bla bla bla bla bla bla' I post here a script that functions in SELECT mode. Any idea ?Thanks by advance for any help given.Matthieu For example : blabla nla bla bla bla bla (.) bla blablabla I would like to modify the value of the field to obtain the following result : blabla nla bla bla bla bla (.) bla blablabla I precise that the URL are all differents, there can be 1 or more URL typed. The records contain sentences with text-only URLs anywhere.

sql get plain text from html

Hello, I've got tables with text type values. All ForumsĬonvert plain text URL in true HTML links We've got lots of great SQL ServerĮxperts to answer whatever question you can come up with.













Sql get plain text from html