[sqlite] Merging two tables
Whats the procedure and rules for merging two tables? I have table #1, with a possible 86 thousand entries a day. an embedded application is storing sensor data. I have table #2, with a possible 50 entries a day. Both tables have a date/time field. Do I need duplicate columns in both tables to merge the data? Scott -- - The most effectual engines for [pacifying a nation] are the public papers... [A despotic] government always [keeps] a kind of standing army of newswriters who, without any regard to truth or to what should be like truth, [invent] and put into the papers whatever might serve the ministers. Thomas Jefferson to G. K. van Hogendorp Oct. 13, 1785. (*) ME 5:181, Papers 8:632 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Merging to tables
Rasmus Christian Kaae wrote: I was wondering if there was some way of merging to tables *fast* for querying? I have the following schemas: CREATE TABLE a (term text, location blob); CREATE TABLE b (term text, location blob); What I would like to do is to iterate through *all* records in a and b sorted by term (records from a and b should be interleaved if necessary). SELECT term,location FROM a UNION ALL SELECT term,location FROM b ORDER BY term;
[sqlite] Merging to tables
Hello, I was wondering if there was some way of merging to tables *fast* for querying? I have the following schemas: CREATE TABLE a (term text, location blob); CREATE TABLE b (term text, location blob); What I would like to do is to iterate through *all* records in a and b sorted by term (records from a and b should be interleaved if necessary). I tried this: SELECT a.*, b.* FROM a LEFT JOIN b ON (a.term = b.term) But this obviously only fetches all content from a and b where the term occurs in a. Is there any other way than creating temporary tables for this? -- Best regards / Med venlig hilsen Rasmus Christian Kaae - [EMAIL PROTECTED] or [EMAIL PROTECTED] Web: http://kalchas.dk Office: E4-119, Aalborg University. Mobile: +45 28 72 04 13