[Libreoffice-bugs] [Bug 32505] LibO Base - UI - Copy data dialog

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Dec 20 13:16:23 CET 2010


https://bugs.freedesktop.org/show_bug.cgi?id=32505

--- Comment #4 from Enrique <e.vb at lycos.com> 2010-12-20 04:16:23 PST ---
Hello Yifan,

the problem arises since both source & destination tables might have the same
fields, but quite often they are not presented in the same order. 
(for example: the csv contains them alfabetically because the export routine of
some application does it that way, and the fields of the destination table
(PostgreSQL) are presented in the order they were created in that table.)

As a result, they are not aligned in the window "Assign columns". (see scr-shot
3) 
So we have to align them in the wizard
or in the csv before copy-pasting the info.
(Something we do over and over.)


1.Quick solution ?
------------------
A possible work-around would definitely be, to simply alfabetically sort all
field names, in both the "source & destination table"-columns in the window
"Assign columns".

That way, if both source & destination table:
- contain the same amount of fields,
- contain the same field names,
a simple sort would align them perfectally. (Thus resolving 90% of our
problems!)

That would already be great. (In combination with making the window resizable
for readability of longer field-names.)


2.An even more generic solution ?
---------------------------------
Of course, if both source & destination table do not contain:
- the same amount of field names
- the same field names
the "quick solution" does not resolve the problem entirely.

Example:

source              destination
field a             field a
field b             field aa
field bb            field b
field c             field c
field cc            field d
field d             field e
field e             field f
field f             field g
field g             field h
field z

An even more generic solution migth be to:
1. sort both source & destination fields (as in solution 1)
2. move all fields in both columns, that do not exist in the opposite column,
to the bottom

That way, all linkable fields are linked together by means of their fieldname.
All not-linkable fields are shown at the bottom. Only those might have to be
manually handled.

That would give in the example:

source              destination
field a             field a
field b             field b
field c             field c
field d             field d
field e             field e
field f             field f
field g             field g
field bb            field aa
field cc            field h
field z

This way, the first 7 fields are already correctly linked in the wizard.
(Their checkbox can automatically be "checked" in the source table-column.)
At the end of both columns, we find the fields that could not be matched
automatically. (Those could be "unchecked" automatically in the source
table-column.)


I hope this explanation gives you more information and is readable.
If you would like extra info, don't hesitate to contact me.
"Solution 2" seems very good, but "Solution 1" would already be a time-saver.

Thank you for your time !
Enrique.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list