Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Engine Management, OBD-II, Engine Diagnostics, etc. > OBDII GPS Logger


Reply
 
Share Thread Tools Display Modes
Old 07-02-2009, 12:56 AM   #1
Newbie
 
Join Date: May 2009
Posts: 31
longfeltwant is an unknown quantity at this point
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?
longfeltwant is offline   Reply With Quote
Advertisement
 
Advertisement
Advertisement Sponsored links

Old 07-02-2009, 03:38 AM   #2
Variable Bitrate
 
Crinos's Avatar
 
Join Date: Mar 2009
Location: Kristiansand, Norway
Posts: 388
Crinos is an unknown quantity at this point
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/
Crinos is offline   Reply With Quote
Old 07-02-2009, 11:27 AM   #3
Newbie
 
Join Date: May 2009
Posts: 31
longfeltwant is an unknown quantity at this point
Thanks for the pointer, Crinos. I found <a href="http://www.mail-archive.com/sqlite-users@sqlite.org/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;
longfeltwant is offline   Reply With Quote
Old 07-02-2009, 12:03 PM   #4
Mod - OBDII GPS Logger forum
 
Join Date: Mar 2009
Location: Los Angeles
Posts: 523
chunkyks has a spectacular aura aboutchunkyks has a spectacular aura aboutchunkyks has a spectacular aura about
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 (-;
chunkyks is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Tags
database, obdgpslogger, sqlite3

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to combine Maps?? seabeggar69 Map Monkey 0 10-15-2005 05:40 PM
off topic- how to combine pictures? organasised Off Topic 3 03-12-2005 09:12 PM
can i combine 2 PSU to get more power? jusatry Power Supplies 3 05-20-2004 10:09 PM
Pre-built databases cadence117 MediaCar 2 05-12-2004 09:52 PM
Looking for a 5.6" Touch control to combine with a GameVue notion LCD/Display 5 08-30-2002 12:04 PM



All times are GMT -5. The time now is 10:47 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics