This Knowledge Base article provides simple queries for:
1. pulling data from an Aspen InfoPlus.21 tag and storing it in a comma-separated-value format to a .txt or .csv file.
2. inserting CSV repeat-area data from the same flat file to a single InfoPlus.21 tag.
Solution
--Script to write data for one tag from Aspen InfoPlus.21 to a .csv file:
SET OUTPUT 'C:\<path>\<file>'; SET COLUMN_HEADERS = 0; SELECT IP_TREND_TIME || ',' || IP_TREND_QSTATUS || ',' || IP_TREND_VALUE FROM IP_AnalogDef WHERE NAME LIKE '<tagname_A>' AND IP_TREND_TIME BETWEEN '01-JAN-18 00:00:00' AND '31-MAR-18 20:00:00';
--Script to write data from a .csv file into Aspen InfoPlus.21:
INSERT INTO <tagname_B> (IP_TREND_TIME, IP_TREND_QSTATUS, IP_TREND_VALUE) SELECT (SUBSTRING(1 OF LINE BETWEEN ',')), (SUBSTRING(2 OF LINE BETWEEN ',')), (SUBSTRING(3 OF LINE BETWEEN ',')) FROM 'C:\<path>\<file>';
example