- 30 Jan 2024
- Print
- PDF
SQL Query Examples
- Updated on 30 Jan 2024
- Print
- PDF
The PARCdata SQL Server CLR can be used as a replacement to the Capstone ODBC driver for reading OPC HDA data into SQL Server. It uses a standard SQL connection to expose all of the data available through dataPARC. The required queries are located in the PARCdataSqlClr directory within the PARCdata directory, and require separate installation steps.
Once created in a database (this can be ctc_config or any other database), there are three table-valued functions associated with PARCdata for retrieving data:
ctc_fn_PARCdata_ReadRawTags: Function or query to get the raw data from DataPARC tags.
ctc_fn_PARCdata_ReadInterpolatedTags: Function or query to get interpolated or aggregate data from DataPARC tags such as Average, TimeAverage, Min, and Max.
ctc_fn_PARCdata_ReadAtTimeTags: Function or query to get the data at specific timestamps from DataPARC tags.
ctc_fn_PARCdata_ReadTagRuns: Function to retrieve run data for a basis tag, and optionally a product tag, as well as optionally a phase tag.