how to create function Replace text in html

  • need help to create function Replace on TEXT field

    and in the text field i have a HTML code

    i wont to  Replace the PATH in the HTML code

    from server-relative

    to

    absolute URL

    if in the HTML code i have an image

    like this " /images/emotions/whistling.gif "

    i wont Replace to

    " http://www.sqlservercentral.com/forums/images/emotions/whistling.gif "

    Replace this = " /images/emotions/ "

    to this = " http://www.sqlservercentral.com/forums/images/emotions/"

    how to do this

    and after use it in view in sql server

    thnks

    ilan

  • This was removed by the editor as SPAM

  • this should get you started

    declare @path varchar (150)

    set @path = 'http://www.sqlservercentral.com/forums' +

    (select top 1 [image] from [image table] where [criteria is met])

    select @path


    Kindest Regards,

    Seth Washeck

    If nothing in this world satisfies me, perhaps it is because I was made for another world.
    C. S. Lewis

  • need more help

    how to do it ??????????

     create function to Replace text from table

    in   field type TEXT

    thnks ilan

  • Ilan,

    Take a look at BOL for Create Function. Between that and Seth's suggestion you should be well on your way.

Viewing 5 posts - 1 through 4 (of 4 total)

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