On 13/05/2014 07:18 AM, Joe Yoder wrote:
I have data in various tables with this structure:
Time_Stamp
Value
I need to combine the tables into this structure:
Time_Stamp
ValueFromTable1
ValueFromTable2
ValueFromTable3
You could normalise the table a bit more so you end up with a structure
like this:
TableName
Time_Stamp
Value
Then you can run SQL like this (untested):
INSERT INTO MyLogTable;
FIELDS (Tablename, Time_Stamp, Value) ;
SELECT "Table1", Time_Stamp, Value ;
FROM Table1;
UNION ALL ;
SELECT "Table2", Time_Stamp, Value ;
FROM Table2;
UNION ALL ;
SELECT "Table3", Time_Stamp, Value ;
FROM Table3
otherwise, something along the lines of Peter's suggestion should work.
--
Frank.
Frank Cazabon
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.