remove member using x email

Discussion in 'Databases' started by lenney, Mar 14, 2009.

  1. #1
    i merged my ipb forum now i want to undo it

    i have a copy of the 50 thousand email addresses how can i remove them
     
    lenney, Mar 14, 2009 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    If you can get them into a spreadsheet, you can use the concatenate command to create a list of queries to remove the addresses.

    Assuming they're in the A column, use something like this in the B column:

    =CONCATENATE("DELETE FROM mydatabase WHERE email ='",A1,"';")

    Then copy it into every adjacent B cell. Copy the whole B column and paste it into a sql command line window.

    It may be a good idea to do 5,000 - 10,000 at a time and not all 50,000 at once.
     
    jestep, Mar 14, 2009 IP
    lordadel likes this.
  3. fightrsi

    fightrsi Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you know the ID (your email table's primary key) of the last email address BEFORE you imported the 50k emails, then you can try to delete them like this:

    delete from email_table where id between x and x+50000

    You should be sure what you are deleting, before executing something like this.
     
    fightrsi, Mar 16, 2009 IP
  4. lenney

    lenney Well-Known Member

    Messages:
    462
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    103
    #4
    i have a copy of all the 50 thousand email addresses that i need removed if that helps
     
    lenney, Mar 16, 2009 IP