Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Commonly used SQL Scripts

This page contains the commonly used SQL scripts to retrieve Data from the CMO Data Warehouse Database. These scripts have been tested on v17 R2007 and may require minor adjustments based on the version being tested on. 


  • Event Register View
    mindtouch.page#thumbnail
    SQL Script to retrieve data that is similar to the data viewable in the CMO Events Register
    • Action Register View
      mindtouch.page#thumbnail
      SQL Script to retrieve data that is similar to the data viewable in the CMO Actions Register
      • Finding Register View
        mindtouch.page#thumbnail
        SQL Script to retrieve data that is similar to the data viewable in the CMO Findings Register
        • Dashboard PHAIR Widget view
          mindtouch.page#thumbnail
          This SQL script extracts raw information required to get PHAIR widget data (which is also available as a part of CMO Application).
          • Event list with non workflow Actions
            mindtouch.page#thumbnail
            Script to show the Information for all the NON Workflow Actions linked to the Events in Data Warehouse Database
            • Installing SQL CLR to translate Body Heatmap points
              mindtouch.page#thumbnail
              This article allows for installing a SQLCLR function to translate body heatmap data to a readable format.
              • Events and Actions count check
                mindtouch.page#thumbnail
                Script to check the current count of Events and Actions in Data Warehouse. This script compares the counts across four databases - the primary CMO Transactional Database with the three additional Databases created as part of the CMO Data Warehouse architecture.
                • Timezone conversion
                  mindtouch.page#thumbnail
                  All date time objects in CMO is stored in UTC format. This allows a uniform and centralised datetime structure in the Database. Usually, the Application layer does the datetime conversion when presenting the Datetime in the users' browser. However, if a SQL script is required for conversion to a different timezone - this can now be achieved with SQL Server 2016+ using the "AT TIME ZONE" function. https://docs.microsoft.com/en-us/sql/t-sql/queries/at-time-zone-transact-sql?view=sql-server-ver15
                  • Script to get the Frequency Rates Module View
                    mindtouch.page#thumbnail
                    Script to get the Frequency Rates Module View from the CMO Data Warehouse Database

                     

                    • Was this article helpful?