pturmel,
Below is what my query and below that is the error message I’m getting.
I checked all the tables and StartTime is valid column in each table.
SELECT StartTime AS "Start Time", name AS "Product Code", Lot AS "Lot", fv AS "FV", "Volume", SUM("Volume") AS "Balance"
FROM (
SELECT StartTime AS "Start Time", name AS "Product Code", Lot AS "Lot", fv AS "FV", koVol/31 AS "Volume"
FROM wp_ko
WHERE fv = 15 AND name = "{Root Container.Product Code Lbl.text}" AND lot LIKE "{Root Container.Label 74.text}%"
UNION
SELECT StartTime AS "Start Time", Name AS "Product Code", Lot AS "Lot", fv AS "FV", koVol/31 AS "Volume"
FROM kyla_ko
WHERE fv = 15 AND name = "{Root Container.Product Code Lbl.text}" AND lot LIKE "{Root Container.Label 74.text}%"
UNION
SELECT StartTime AS "Start Time", destName AS "Product Code", destLot AS "Lot", dest AS "FV", TotVol AS "Volume"
FROM rack
WHERE dest = 15 AND destname = "{Root Container.Product Code Lbl.text}" AND destlot LIKE "{Root Container.Label 74.text}%"
UNION
SELECT StartTime AS "Start Time", srcName AS "Product Code", srcLot AS "Lot", Source AS "FV", TotVol * -1 AS "Volume"
FROM rack
WHERE Source = 15 AND srcName = "{Root Container.Product Code Lbl.text}" AND srcLot LIKE "{Root Container.Label 74.text}%"
UNION
SELECT StartTime AS "Start Time", Name AS "Product Code", Lot AS "Lot", fv AS "FV", Total_Bls * -1 AS "Volume"
FROM bt_runin
WHERE fv = 15 AND Name = "{Root Container.Product Code Lbl.text}" AND Lot LIKE "{Root Container.Label 74.text}%"
) SubQ
Exception: Error running query:
SQLQuery(query=SELECT StartTime AS “Start Time”, name AS “Product Code”, Lot AS “Lot”, fv AS “FV”, “Volume”, SUM(“Volume”) AS “Balance”
FROM (
SELECT StartTime AS “Start Time”, name AS “Product Code”, Lot AS “Lot”, fv AS “FV”, koVol/31 AS “Volume”
FROM wp_ko
WHERE fv = 15 AND name = “kyla” AND lot LIKE “1010%”
UNION
SELECT StartTime AS “Start Time”, Name AS “Product Code”, Lot AS “Lot”, fv AS “FV”, koVol/31 AS “Volume”
FROM kyla_ko
WHERE fv = 15 AND name = “kyla” AND lot LIKE “1010%”
UNION
SELECT StartTime AS “Start Time”, destName AS “Product Code”, destLot AS “Lot”, dest AS “FV”, TotVol AS “Volume”
FROM rack
WHERE dest = 15 AND destname = “kyla” AND destlot LIKE “1010%”
UNION
SELECT StartTime AS “Start Time”, srcName AS “Product Code”, srcLot AS “Lot”, Source AS “FV”, TotVol * -1 AS “Volume”
FROM rack
WHERE Source = 15 AND srcName = “kyla” AND srcLot LIKE “1010%”
UNION
SELECT StartTime AS “Start Time”, Name AS “Product Code”, Lot AS “Lot”, fv AS “FV”, Total_Bls * -1 AS “Volume”
FROM bt_runin
WHERE fv = 15 AND Name = “kyla” AND Lot LIKE “1010%”
) SubQ, database=history)@5000ms
On: FV15Details.Root Container.Ledger Group.Table 1.data
caused by GatewayException: Unknown column ‘StartTime’ in ‘field list’
caused by MySQLSyntaxErrorException: Unknown column ‘StartTime’ in ‘field list’
Ignition v7.9.4 (b2017082911)
Java: Oracle Corporation 1.8.0_181