Applies to:
PcVue version 9.0 onwards |
||
|
||
Summary:
When using a Maintenance Plan & Export Task to export data from a database, the format of the output is defined by the columns of the Trend and Log Tables. Some columns are mandatory, and others are optional, but the order in which they appear is fixed and you cannot add custom columns. The solution is to add a Log or Trend table to the database using the Application Explorer and then replace the table with an SQL View of the same name. YOU MUST NOT USE THE TABLE/VIEW FOR RECORDING. An SQL View can be thought of as a virtual table. Its columns do not contain any data – instead they point to columns in another table, or the data can be calculated. A good example of the use of a View is to add a column with a human readable timestamp. When you use the Export task, the View is treated as if it was a Table and the contents are exported accordingly. The main steps are:
|
||
|
||
Details:
Step 1 – Add a table to the database
Step 2 – Install the Time Stamp conversion function Optional – Install the Time Stamp conversion function. For an explanation see Knowledge Base article KB 492. Step 3 – Replace the table with a View
Step 4 – Create a Maintenance Plan with an Export task.
Note: To avoid exporting any other tables of the database just de-select the option Can be exported for those tables. Download attachments: script.sql.txt |
||
|
||
|
Created on: 15 Jun 2012 Last update: 13 May 2024