SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Remove http:// from data in fields?

    I have a table that has a bunch of URLs in a URL field with http://. I would like to remove any instance of this from the rows. Can someone tell me what command to use to remove all of the http://s?

    Thanks!
    John Saunders

  2. #2

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would expect this to work, however it requires all urls to start with http:// as it basically cuts off the first 7 characters.

    Code:
    UPDATE your_table SET url=SUBSTRING(url,8)

  3. #3
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Worked perfect! Thanks!
    John Saunders


Bookmarks

Posting Permissions

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