Bug Hunting Session
Bug 100368 - modify import to allow bulk updates
Summary: modify import to allow bulk updates
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Base-UX
  Show dependency treegraph
 
Reported: 2016-06-14 11:13 UTC by primijos
Modified: 2017-11-05 22:40 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description primijos 2016-06-14 11:13:08 UTC
Right now Base allows to bulk import data into tables by the use of copy/paste between Calc and Base.

This, however, limits to *adding* new records. It doesn't allow to *update* records (if you try it, it would result in SQL errors, since you'll be trying to INSERT records that already exists)

It would be nice to add options to the "import wizard" (the dialog that appears when you paste data from Calc in some table) to allow the user to specify that the data being imported shoud be treated as UPDATES, and make Base issue INSERT or UPDATE (or INSERT... ON DUPLICATE UPDATE),etc. depending on the specific Database backend.

Right now, the only workaround I've found to allow this (without the need to delete/reimport all data in database, which can be undoable with lots of data/relationships) is to define temporary tables to host the initial import of the update data and combine it with SQL Tools -> update (or with a stored procedure) in order to copy all that values to the destination -real- table.

This workaround, however, is not recommended for users not having specific SQL/Database knowledge. The ideal solution would be to allow end-users (business users, using only forms/predefined queries/reports) to be able to perform those bulk updates independently in the same way bulk imports can be done
Comment 1 Alex Thurgood 2016-06-15 08:26:36 UTC
I seem to recall we already had a feature request for a UI-based update mechanism, but I can't seem to find the report at the moment.

Confirming. Seems to be useful enhancement request. If you are prepared to submit patches to the code, so much the better.