Listing fields

To inspect field table on the Data Pump SQL series.

/* Show all fields and properties */
USE ASI2353;
SELECT * 
    FROM [dbo].[Field]
    WHERE [Name] IS NOT NULL
ORDER BY [Position];
-–
/* Show fields which have units */
USE ASI2353;
SELECT [Name], [Unit]
    FROM [dbo].[Field]
    WHERE [Name] IS NOT NULL 
        AND [Unit] IS NOT NULL 
ORDER BY [Position];
-–
/* Show all measurement fields */
USE ASI2353;
SELECT [Name], [Unit]
    FROM [dbo].[Field]
    WHERE [Name] IS NOT NULL 
        AND [IsMeasurement] = 1 
ORDER BY [Position];
-–
/* Show all result fields */
USE ASI2353;
SELECT [Name]
    FROM [dbo].[Field]
    WHERE [Name] IS NOT NULL 
        AND [IsResult] = 1 
ORDER BY [Position];

See more about the fields in the knowledge database.

List error codes

The following snippet lists error codes and associated field (operation) names on Data Pump SQL series. Adjust the first line for a particular database.

USE ASI2353;
SELECT e.[Id] AS "ErrorCode", f.[Name] AS "Operation"
    FROM dbo.[Error] AS e
        JOIN dbo.[Field] AS f
            ON f.[Id] = e.[FieldId]
ORDER BY e.[Id];

More about the dbo.Error table in the knowledge database.

Modifying reference limits

The QC report of the Data Pump SQL series, uses measurement limits from the [Limit] table. The table is also used as the reference for specification limits, enabling detection of “unauthorized” change of the limits on a machine.

As an example, to change limits for BearingForce for the ASI2353 database, run this on both—machine and office—servers. Note that these are style dependent, so include the proper StyleID.

USE ASI2353;
UPDATE dbo.[Limit] SET
    LSL = 400,
    USL = 1550,
    LRL = 50,
    URL = 20000
WHERE MeasName = 'BearingForce' AND StyleID = 3;

To list style data (ID, Name, etc) use:

    
USE ASI2353;
SELECT * FROM dbo.[Style];

To examine all the limits for all of the styles:

USE ASI2353;
SELECT a.[StyleID], s.[Name], a.[MeasName], a.[LSL],
       a.[USL], a.[LRL], a.[URL]
    FROM dbo.[Limit] AS a JOIN dbo.[Style] AS s 
        ON s.[ID] = a.[StyleID]
ORDER BY a.[StyleID], a.[MeasName];

See more about standard tables in the knowledge database.