I am trying to get daily totals for each location into another table.
Here is the structure:
reports_location_temp:
Table_Name: Date: Total_Count:
London 2013-05-26 10:49:53 5000
London 2013-05-26 10:49:53 2000
Birmingham 2013-05-26 10:49:53 1000
London 2013-05-26 10:49:53 5000
Manchester 2013-05-26 10:49:53 50
Birmingham 2013-05-26 10:49:53 500
reports_location_total_daily:
Table_Name: Date: Total_Count:
London 2013-05-26 23:55:00 12000
Manchester 2013-05-26 23:55:00 50
Birmingham 2013-05-26 23:55:00 1500
I am still learning my way around Mysql.
This is the query i tried but it only picked out one column for each Unique Table_Name:
UPDATE reports_Location_total_daily j1 INNER JOIN reports_location_temp l1 ON j1.Table_Name = l1.Table_Name SET j1.Total_Count = l1.Total_Count
Thanks for your help with this.