Home Forums SQL Server 7,2000 T-SQL Replace Function does not work on Text Datatype? RE: Replace Function does not work on Text Datatype?

  • If ALL your text data is less than 8000 bytes per record, then you could

     

    select replace(Convert(VarChar(8000), comments), '"', '"')

    from tblcaseinfo

    where PatIndex('%&quot;%', comments) <> 0

     

    Notice PATINDEX for your search condition.

    If it's longer, then you have to use UPDATETEXT. see BOL.



    Once you understand the BITs, all the pieces come together