SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    676
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help creating a simple sql query

    I need to search for a specific domain name is part of a random generated email that has been put into a SQL database. So an email address in one record may be jim123432@invalid.com and the next frank95434@invalid.com and so on. They will all have the invalid.com in common. So if i can search the table in this column for emails that have "invalid.com" in the email address and then I want to set that field to NULL.

    i think I have part of it figured out but I need help with the last part. if not, I am open for the correct way to do this.

    HTML Code:
    UPDATE q2gbj_users SET email = null WHERE (need help with this part)
    Many thanks,
    Houston
    Houston Brown
    Split Light Designs
    Bringing your ideas to light.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,328
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    Code:
    WHERE email LIKE '%invalid.com'
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    676
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you sir. Worked like a charm.

    Many thanks,
    Houston
    Houston Brown
    Split Light Designs
    Bringing your ideas to light.


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
  •