Hmm... I really doubt just a simple sql command could do that (movies merging). Because movie data isn't only stored in "movies" table but has dependencies with other tables (for example movies_codes and movies_manuals tables are two of them) and merging two movies is, imo, rather a complex job that should be implemented as a plugin (or main program feature) where an interface could even allow user to choose which piece of data to keep and which to drop.iosefra wrote:Hi
I need queue to merge two duplicate movies/books if they have the same name. If there no data on the item which code is bigger then second one, than copy data from first to second.
something like that:
FROM movies t1, movies t2
WHERE (t1.title = t2.title AND t1.code<t2.code)
for every field where t2.* <> NULL or t2.*<>0 set t2.*=t1.*
Can anyone help?
So, quite a big dev... which may not sound worthwhile if you're not frequently dealing with duplicates.
If you just want to fill empty fields then you can use an sqlite database browser (like SQLiteStudio for instance) to have a list of tables and columns.
Then you can build all sql queries (or even a dedicated interface script) you need to reach your goal but, again, i'm not sure it's worthwhile (until you're really freqently dealing with duplicates).