Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Posts
    1

    Unanswered: SQL deleting outside an entry

    The following problem has been driving me up the wall for the past week, perhaps you can help me figure this out.

    I am trying write an SQL statement to parse fields containing html code. More specifically, i'm trying to remove everything except the information inside "<-- LT3" "-->" tags.

    How would i go about doing this?
    I'm thinking using g\regular expressions to sort out anything inside the tags, but I'm stumped at this point.

  2. #2
    Join Date
    Jan 2004
    Location
    In a large office with bad lighting
    Posts
    1,040
    Lookup CHARINDEX in BOL. You can use it to find the beginning of each of your character strings. Then use substring to get what you need.

    -- This is all just a Figment of my Imagination --

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Check this one out; similar question came up elsewhere today.

    only return part of string : Transact-SQL : SQL Server : MSDN Forums
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •