-
Notifications
You must be signed in to change notification settings - Fork 0
Description
We either need to make 2 additional cfg tables for datavalues2 or we need to change the procedures to include a second column, which defines which datavalues table they are stored in. If we create more cfg tables, we need to rename the current ones with UCNRS within table name. Either way something needs changing.
-- Collect datavalues for configured datastreams, truncate time component INSERT INTO tmp_datavalues (ValueID, DataValue, LocalDateTime, UTCOffset, DatastreamID) SELECT v.ValueID, v.DataValue, CAST(DATE(v.LocalDateTime) AS DATETIME), v.UTCOffset, v.DatastreamID FROM datavalues_UCNRS AS v INNER JOIN cfg_load_datavalues_day_mma AS c ON v.DatastreamID = c.DatastreamID WHERE v.LocalDateTime >= CAST(DATE(pStartDateTime) AS DATETIME) AND v.LocalDateTime < CAST(DATE(pEndDateTime) AS DATETIME) AND c.DataValuesTable = ‘datavalues_UCNRS’;