Example 1.5 RxC Distribution – SQL Statement (defined in file PI_REAL_DISTR1.SQL) SELECT sampletime AS PI_TIMESTAMP1, 'Tag1' AS PI_TAGNAME1, [level] AS PI_VALUE1, sampletime AS PI_TIMESTAMP2, 'Tag2' AS PI_TAGNAME2, temperature AS PI_VALUE2, temperature_status AS PI_STATUS2, sampletime AS PI_TIMESTAMP3,'Tag3' AS PI_TAGNAME3, density AS PI_VALUE3, density_status AS PI_STATUS3 FROM T1_5 WHERE sampletime > ? AND tank = 'Tank1' Relevant PI Point Attributes Extended Location1 Location2 Location3 Location4 Location5 Descriptor (All points) (All points) (All points) (All points) (RxC Distributor) P1=TS 1 0 'RxC Distributor' 1 0 -2 'Target points' 0 Instrumenttag Point Type Point Source (Distributor) (All points) (All Points) Float32 S RDBMS Table Design Table T1_5 SAMPLETIME LEVEL, LEVEL_STATUS, TANK TEMPERATURE, TEMPERAURE_ DENSITY STATUS, DENSITY_STATUS Datetime Real Varchar(12) Varchar(80) (MS SQL Server) MS SQL Server) (MS SQL Server) (MS SQL Server) Date/Time Number (Single) Text(12) Text(80) (MS Access) Prec.(MS Access) (MS Access) (MS Access) Example of an appropriate result-set: PI_TIMESTAMP1 PI_TAGNAME1 PI_VALUE1 20-Jul-2002 08:10:00 Target_Point1 1 PI_TIMESTAMP2 PI_TAGNAME2 PI_VALUE2 PI_STATUS2 20-Jul-2002 08:10:00 Target_Point2 10 NULL PI_TIMESTAMP3 PI_TAGNAME3 PI_VALUE3 PI_STATUS3 20-Jul-2002 08:10:00 Target_Point3 100 NULL 1 goes to Target_Point1; 10 to Target_Point2; 100 to Target_Point3 Note: See also section:.
Example 1.5 – RxC Distribution SQL Statement (defined in file PI_REAL_DISTR1.SQL) SELECT sampletime AS PI_TIMESTAMP1, 'Tag1' AS PI_TAGNAME1, [level] AS PI_VALUE1, sampletime AS PI_TIMESTAMP2, 'Tag2' AS PI_TAGNAME2, temperature AS PI_VALUE2, temperature_status AS PI_STATUS2, sampletime AS PI_TIMESTAMP3,'Tag3' AS PI_TAGNAME3, density AS PI_VALUE3, density_status AS PI_STATUS3 FROM T1_5 WHERE sampletime > ? AND tank = 'Tank1' Relevant PI Point Attributes Extended Descriptor (RxC Distributor) Location1 (All points) Location2 (All points) Location3 Location4 (All points) Location5 (All points) P1=TS 1 0 'RxC Distributor' -2 'Target points' 0 1 0 Instrumenttag (Distributor) Point Type (All points) Point Source (All Points) Float32 S RDBMS Table Design Table T1_5 SAMPLETIME LEVEL, TEMPERATURE, DENSITY LEVEL_STATUS, TEMPERAURE_ STATUS, DENSITY_STATUS TANK Datetime (MS SQL Server) Date/Time (MS Access) Real MS SQL Server) Number (Single) Prec.(MS Access) Varchar(12) (MS SQL Server) Text(12) (MS Access) Varchar(80) (MS SQL Server) Text(80) (MS Access) Example of an appropriate result-set: PI_TIMESTAMP1 PI_TAGNAME1 PI_VALUE1 20-Jul-2002 08:10:00 Target_Point1 1 PI_TIMESTAMP2 PI_TAGNAME2 PI_VALUE2 PI_STATUS2 20-Jul-2002 08:10:00 Target_Point2 10 NULL PI_TIMESTAMP3 PI_TAGNAME3 PI_VALUE3 PI_STATUS3 20-Jul-2002 08:10:00 Target_Point3 100 NULL 1 goes to Target_Point1; 10 to Target_Point2; 100 to Target_Point3 Note: See also section:.
PI_RDBMSPI_3.21.4.30.docx