#272 Import truncates destination table

open
nobody
None
5
2012-12-29
2008-01-23
Anonymous
No

Please change the import plugin so it merges import data into the destination table, rather than truncating the destination table before importing, or make the truncation an option when the import options form is displayed. Or, change the menu to 'Truncate and Import File' instead of just 'Import File'.

Discussion

  • Logged In: NO

    Consider this as a "me too". Mere luck and tiny bits of caution had me trying this plugin on a test database box first; there would have been some trouble indeed if I had emptied/purged/truncated the production table with this plugin.

    Seems strange to me, though... This 'feature' would/should have been the first to implement, me thinks.

     
  • Logged In: NO

    Consider this as a "me too". Mere luck and tiny bits of caution had me trying this plugin on a test database box first; there would have been some trouble indeed if I had emptied/purged/truncated the production table with this plugin.

    Seems strange to me, though... This 'feature' would/should have been the first to implement, me thinks.

     
  • Logged In: NO

    Consider this as a "me too". Mere luck and tiny bits of caution had me trying this plugin on a test database box first; there would have been some trouble indeed if I had emptied/purged/truncated the production table with this plugin.

    Seems strange to me, though... This 'feature' would/should have been the first to implement, me thinks.

     
  • For god's sake, fix it quick!
    Warnings, error messages, etc.

    Insist that the user double-check and confirm any action with potential to cause the loss of data.

    At a bare minimum, instead of "import file", change the context menu to:
    "DELETE ENTIRE EXISTING CONTENTS OF TABLE *AND THEN* import file"

     
  • Rob Manning
    Rob Manning
    2008-09-24

    The bug-fix that warns the user has been available on the trunk for a while; just never made it into the 2.6.x release branch. This fix has been merged now and will be available in 2.6.8. This feature is still open as the requested merge capability has not been implemented.

    Rob

     
  • sfst
    sfst
    2010-01-03

    OK, at least the warning is there now with 3.0.3, but I need the truncate being optional, as sometimes I only have the right to insert data, but not to truncate tables (if that is what the plugin is doing; I can only guess as the message "A database error occurred while inserting data" isn't very helpful for tracking the problem)

     
  • I would really like this as well.

    Also would be nice to allow creation of the table if it doesn't exist. And faster too ;) Enterprise manager imports a large file in a fraction of the time.

    This is one of the few tasks that I still keep the native DB tools around for because - while it is there in SQL Squirrel, it can't do what Enterprise Manager for SQL Server can. And the DB2 client is so God aweful I wish I had something like Enterprise Manager.

    At any rate, I vote for this enhancement.

     
    • sfst
      sfst
      2013-02-12

      "[..] allow creation of the table if it doesn't exist."

      ... has to be ignored, because it is technically impossible (if the table didn't already exist, how would it be possible to right-click on it to import a file? Or do I misunderstand something here?)