Execute a Trendview stored procedure
- Last UpdatedApr 24, 2025
- 1 minute read
This stored procedure is used to retrieve trend data with formatted timestamps suitable for displaying in a report, by calling the Trendview Business Logic Tier (BLT). The syntax is the same as if the BLT is called directly.
Note: This stored procedure is available only when the RealTime service is running and Hot.
ODBC Syntax
call Trendview(<tablename>, <tagnme>, <columnname>, <starttime>, <endtime>, <showFieldTime>)
Example
call Trendview('collect', 'analog.0analog.curval', '06/15/2022 08:16:00', '06/15/2022 08:18:00', 1);
time milliseconds status timestamp value fieldTimestamp fieldMilliseconds
06/15/2022 08:16:01 318 06/15/2022 08:16:01.318 7 06/15/2022 08:16:01.256 256
06/15/2022 08:16:06 709 M 06/15/2022 08:16:06.709 7 06/15/2022 08:16:06.000 0
06/15/2022 08:17:28 633 O 06/15/2022 08:17:28.633 7 06/15/2022 08:17:28.000 0
06/15/2022 08:17:28 756 A 06/15/2022 08:17:28.756 89 06/15/2022 08:17:28.696 696
06/15/2022 08:17:31 443 A 06/15/2022 08:17:31.443 96 06/15/2022 08:17:31.383 383
06/15/2022 08:17:41 459 06/15/2022 08:17:41.459 7 06/15/2022 08:17:41.382 382
06/15/2022 08:17:51 416 06/15/2022 08:17:51.416 21 06/15/2022 08:17:51.353 353