>There are times when I need to copy data from a text column in sqlserver to another text column. The destination text column must have all xml reserved characters transformed. For example if the originating column has "call in < 10 minutes" then I have to transform it to "call in < 10 minutes"
>
> I use a sql statement with
>
>
>"UPDATE " + TableName + " SET " + column2 + " = (select " + column1 + " from " + TableName + " WHERE column1.id = ' " + idvalue + " ' )....
>
>
>to handle copying the 1st column's data to the destination column which works great, however I now need to transform those reserved characters if they exist because the destination column has the same information but formatted for xml and do not want to add any additional process to store into a variable and transform then copy if I can avoid it.
>
>Ideas?
Is this what you want?
Function txt2html
Lparameter tcHTML
tcHtml = Strtran(tcHtml, [<], [<])
tcHtml = Strtran(tcHtml, [>], [>])
tcHtml = Strtran(tcHtml, ["], ["])
tcHtml = Strtran(tcHtml, [&], [&])
tcHtml = Strtran(tcHtml, [ ], [ ])
Return tcHtml