[Igor Tandetnik]

>> timestamp|value1|value2|value3|value4|value5|value6
>> 1328873000|1|2| |  |  |
>> 1328873050| | |7|  |  |
>> 1328873075| | | |10|13|16
>> 1328873100|3|4| |  |  |
>> 1328873150| | |8|  |  |
>> 1328873175| | | |11|14|17
>> 1328873200|5|6| |  |  |
>> 1328873250| | |9|  |  |
>> 1328873275| | | |12|15|18
>> 
>> But, first things first, how can I merge my tables to get the combined
>> table with NULLs?
>
> select value1, value2, null, null, null, null from tab1
> union all
> select null, null, value3, null, null, null from tab2
> union all
> select null, null, null, value4, value5, value6 from tab3;

Thanks, I didn't think in that simple terms. :) I think about listing
all the values, so I got lost.

But what if the tables share a timestamp, then I would get, say:

1328873300|1|2| | | |
1328873300| | |3| | |
1328873300| | | |4|5|6

How can that get collapsed into:

1328873300|1|2|3|4|5|6

?

One way could be to fill out the missing values using interpolation
(as I would like anyway), then remove duplicate lines, but if there is
a simple way before I attempt to interpolate, I should probably
collapse first.

-- 
Steinar
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to