Remove some text

  • I would like to remove rtf from my Note column. I tried this: SELECT Note, LTRIM(Note, 'rtf')

    from [PatientNote].

    I get an error. Please advise? I also tried the Replace function, but no text are altered/deleted.

    ltrim

  • 3199 points and you can't even post sample data?

    Use LEFT() or RIGHT() to trim off the characters you don't want.

  • REPLACE(Note, 'rtf', '')

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • It does not work.ltrim2

  • Not sure what you mean.  It did remove 'rtf' from the string.  What more, specifically, do you want it to do?

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • 🙂 Yes, it did work. I was just looking at the column that i want the change to be in. Didn't see a new column was created.

    Thank you.

  • Retracted following OP response

  • This was removed by the editor as SPAM

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply