Results 1 to 4 of 4

Thread: How To Combine Databases

  1. #1
    Newbie
    Join Date
    May 2009
    Posts
    31

    Question How To Combine Databases

    I am on a lengthy trip doing trip logs. I ended up logging to two different obdlogger.db files. I can open them and poke around with sqlite3, but I don't know what steps I would take to combine the data from both databases into one, so I can generate a combined KML file. Can anyone help me with that?

  2. #2
    Maximum Bitrate Crinos's Avatar
    Join Date
    Mar 2009
    Location
    Kristiansand, Norway
    Posts
    489
    Normaly you could merge them...

    I have not plaeyed around enough with sqlite to know for a fact, but as long as they have the same structure, and date-time posting... you can even get it to merge cronologically

    Tools to do it...
    http://sqlitebrowser.sourceforge.net/

  3. #3
    Newbie
    Join Date
    May 2009
    Posts
    31
    Thanks for the pointer, Crinos. I found <a href="http://www.mail-archive.com/[email protected]/msg12681.html">some instructions</a> after following your link. The gist of it is that you use the "attach" command to open the second database (that was the step I didn't understand previously) then just do

    insert into obd select * from otherdb.obd;
    insert into gps select * from otherdb.gps;

    Inserting into trips required me to assign new TRIPIDs to the existing trips, so I did

    update trip set tripid = 21 where tripid = 1;
    update trip set tripid = 22 where tripid = 2;

    and so on until they were done (I had eight trips). Then

    insert into trip select * from otherdb.trip;

  4. #4
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    929
    Other than trips, which use their own key, you should be able to literally catentate tables together. Be warned that if the databases are overlapping times, then Bad Things will happen.

    I mean, sure, it's pretty unlikely for one guy with one car, but if you have a couple cars travelling in convoy and both logging, don't try to join those logs :-)

    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

Similar Threads

  1. How to combine Maps??
    By seabeggar69 in forum Map Monkey
    Replies: 0
    Last Post: 10-15-2005, 04:40 PM
  2. off topic- how to combine pictures?
    By organasised in forum Off Topic
    Replies: 3
    Last Post: 03-12-2005, 08:12 PM
  3. can i combine 2 PSU to get more power?
    By jusatry in forum Power Supplies
    Replies: 3
    Last Post: 05-20-2004, 09:09 PM
  4. Pre-built databases
    By cadence117 in forum MediaCar
    Replies: 2
    Last Post: 05-12-2004, 08:52 PM
  5. Replies: 5
    Last Post: 08-30-2002, 11:04 AM

Tags for this Thread

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
  •