Re-formatting text in a table column

is there a sql statement that I can use that will remove all indentation,new lines,carriage returns and all double white spaces triple white spaces etc.
LVL 8
thenoneAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MilanKMCommented:
try followings:

convert_indents_to_mixed ()
Convert all lines with leading spaces to mixed tabs and spaces.

convert_indents_to_spaces_only ()
Convert all lines containing leading tabs to spaces only.

convert_indents_to_tabs_only ()
Convert all indentation to use tab characters only and no spaces

Hope this helps
MilanKM

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
thenoneAuthor Commented:
so how would the sql statement look like for example my table is named table1 and column1
ComputronCommented:
TheOne, if you run your HTML page through the following function, then run it through the function I gave you earlier, you will eliminate all html tags, carraige returns, linefeeds, tabs, and extra whitespace. What you'll be left with is unformatted raw text. Not sure if your still trying to complete the entire stripping of HTML.


Public Function StripHTMLCRLFTab(strOrigString As String, strCharacter As String) As String
   
    Dim lCounter As Long, sResult As String, bInTag As Boolean
    Dim bInsert As Boolean, strChar As String

    For lCounter = 1 To Len(strOrigString)
        strChar = Mid(strOrigString, lCounter, 1)
        If strChar = "<" Then
            bInTag = True
        ElseIf strChar = ">" Then
            bInTag = False
            bInsert = True
        ElseIf strChar = vbCr Then
            bInTag = True
        ElseIf strChar = vbLf Then
            bInTag = True
        ElseIf strChar = vbTab Then
            bInTag = True
        Else
            If bInTag = False And bInsert = True Then
                sResult = sResult & strCharacter & strChar
                bInsert = False
            ElseIf bInTag = False Then
                sResult = sResult & strChar
            End If
        End If
    Next
    StripHTMLCRLFTab = sResult

End Function
thenoneAuthor Commented:
computron I posted a comment on the original question I gave you if I can that to work then I will be happy.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.