Results 1 to 3 of 3

Thread: SQL Update Query (Update part of column)

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    530

    SQL Update Query (Update part of column)

    Hello ,

    i'am trying to update part of column with new value
    here an example :

    old value is :
    Code:
    <address>
    <object width=\"526\" height=\"415\" data=\"http://www.youtube.com/v/XXX2urcV4zg&amp;hl=fr&amp;fs=1&amp;rel=0\" type=\"application/x-shockwave-flash\">
    <param name=\"allowFullScreen\" value=\"true\" />
    <param name=\"allowscriptaccess\" value=\"always\" />
    <param name=\"src\" value=\"http://www.youtube.com/v/XXX2urcV4zg&amp;hl=fr&amp;fs=1&amp;rel=0\" />
    <param name=\"allowfullscreen\" value=\"true\" />
    </object>
    </address>
    i want to update with that change width 526 value & height 415 value by width 619 value & height 487 only

    Code:
    <address>
    <object width=\"619\" height=\"487\"  data=\"http://www.youtube.com/v/XXX2urcV4zg&amp;hl=fr&amp;fs=1&amp;rel=0\" type=\"application/x-shockwave-flash\">
    <param name=\"allowFullScreen\" value=\"true\" />
    <param name=\"allowscriptaccess\" value=\"always\" />
    <param name=\"src\" value=\"http://www.youtube.com/v/XXX2urcV4zg&amp;hl=fr&amp;fs=1&amp;rel=0\" />
    <param name=\"allowfullscreen\" value=\"true\" />
    </object>
    </address>
    My Current query is
    Code:
    update news set flashNews=replace(flashNews,'width=\"526\" height=\"415\"','width=\"619\" height=\"487\"')
    Thanks
    Last edited by killer7k; Sep 20th, 2009 at 11:16 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width