Results 1 to 4 of 4

Thread: Undoing imports

  1. #1
    Deland01 is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    66

    Default Undoing imports

    Does anyone know if it's possable to Undo an import after you have left the import screen?

    I did x2 imports yesterday & need to undo them both. I know there is a users_last_import tabe & its full of data but wasnt sure if there was a way of removing all the data.

    I cant just drop the Leads table as I have other leads in there with calls & meeting attached.

    Any suggestions?
    Sugar Version - 4.5.0h
    Sugar Edition - SugarSuite
    OS - Win 2003 Server Std
    PHP Version - 5.2.0
    Database - MySQL Server 5
    Web Server - Apache 2.0.59

  2. #2
    pblag's Avatar
    pblag is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Ukraine (Chernivtsy)
    Posts
    347

    Smile Re: Undoing imports

    Hi!

    As rule the tables for modules have fields date_entered and date_modified so you can delete all records from tables

    so you can use sql script like this

    delete from leads where date_entered >= '2007-05-28 14:40:27'

    where '2007-05-28 14:40:27' is date and time of first import

    please make a backup of database before doing this.

    Hope it will help you!
    Petro Blagodir
    petro@blagodir.ua
    http://www.blagodir.com
    Blagodir Ltd.( SugarCRM - Consultations, Development and Support)

  3. #3
    Deland01 is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    66

    Default Re: Undoing imports

    It certainly does,

    I ended up adding another column to Sugar in studio called "Date Created" on the list view page. Sorted all the leads by "Date Created" & then deleted them. Then I did a search for all the leads with a "0" in the "deleted" column in phpmyadmin, sorted this column so all the deleted records were together & removed them from SQL. Same in the leads_cstm table.

    I got there in the end but it took me 4 hours to remove all 4000 leads.

    I think your way should speed this up x10 fold, so thanks very much.
    Sugar Version - 4.5.0h
    Sugar Edition - SugarSuite
    OS - Win 2003 Server Std
    PHP Version - 5.2.0
    Database - MySQL Server 5
    Web Server - Apache 2.0.59

  4. #4
    Deland01 is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    66

    Default Re: Undoing imports

    How would I exacute the command you wrote? Am I right in thinking I need to open up DOS & do the following:

    sugardevuser2 is my DB username

    Code:
     
    mysql -u sugardevuser2 -p 
    Enter password: --Type the DB password here--
     
    mysql> delete from leads where date_entered >= '2007-05-28 14:40:27'

    When I hit enter all what happens is I get another line with an arrow underneath and the command doesnt really do anything:

    Code:
    mysql -u sugardevuser2 -p 
    Enter password: --Type the DB password here--
     
    mysql> delete from leads where date_entered >= '2007-06-06 09:38:18
      ->
    Sugar Version - 4.5.0h
    Sugar Edition - SugarSuite
    OS - Win 2003 Server Std
    PHP Version - 5.2.0
    Database - MySQL Server 5
    Web Server - Apache 2.0.59

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 2006-10-02, 10:01 AM
  2. custom fields Imports
    By sagget in forum General Discussion
    Replies: 2
    Last Post: 2006-09-05, 05:51 PM
  3. Pricing File Imports
    By RickM in forum General Discussion
    Replies: 2
    Last Post: 2006-08-22, 05:49 AM
  4. Contact Imports
    By cbonjovi75 in forum Help
    Replies: 1
    Last Post: 2005-07-21, 06:29 PM

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
  •