Update_300_301_MySQL.sql has some issues

Topics: 4. Bugs
Oct 15, 2014 at 7:45 AM
1) Missing the target database
2)Missing select statement in the create view syntax.

As far as I can see this should be the correct script:

use SBFspot;

DROP VIEW IF EXISTS vwMonthData;

CREATE View vwMonthData AS
SELECT convert_tz(from_unixtime(Dat.TimeStamp), 'SYSTEM', '+00:00') AS TimeStamp, Inv.Name, Inv.Type, Dat.Serial, TotalYield, DayYield FROM MonthData Dat INNER JOIN Inverters Inv ON Dat.Serial=Inv.Serial
ORDER BY Dat.Timestamp Desc;