Replace the Top 10 Bad Actors Query

Note: The steps in this section are required only if you are upgrading from a version of Meridium Enterprise APM between V4.0.0.0 and V4.1.7.4.0.

The Top 10 Bad Actors query is used by GE Digital APM to populate the Top 10 Bad Actors graph on the Production Loss Analysis Overview page. In some databases, when viewing this graph, you may receive the following error:

To implement the corrected query and to correct this error, complete the following steps.

Steps

  1. Access the Query page .
  2. In the heading of the Query page, select Browse.

    The Select a query from the catalog window appears.

  3. In the left pane, navigate the Catalog to: Meridium/Public/Modules/PLA/Queries, select the Top10BadActors query and then select Open.

    The Enter Parameter Values window appears.

  4. Select OK.

    Note:  For the purposes of these instructions, you do not need to complete any fields in the Enter Parameter Values window.

    The Top 10 Actors query page appears, displaying the Results tab.

  5. Select the SQL tab.

    The SQL query text appears in the workspace, displaying the current query.

  6. In the SQL workspace, select and delete the current query text.
  7. In the blank SQL workspace, copy and paste the following query text:

    SELECT TOP 10 SUM(LossAmount) "Loss Amount" , AssetID "Asset ID" FROM

    (

    SELECT DISTINCT [MI_PRDNLOSS].ENTY_KEY "ENTY_KEY", [MI_PRDNLOSS].[MI_PRDNLOSS_LOSS_AMOUNT_N] "LossAmount", [MI_EQUIP000].[MI_EQUIP000_EQUIP_TECH_NBR_C] "AssetID" FROM [MI_EQUIP000], [MI_PRDNLOSS] JOIN_SUCC [MI_PRDNEVNT] ON {MIR_CBPRDEVN} WHERE ([MI_PRDNEVNT].[MI_PRDNEVNT_START_DATE_D] >= MI_DateAdd('dd', ((? :s :id=numofdays) * -1), Now()) AND [MI_PRDNEVNT].[MI_PRDNEVNT_END_DATE_D] <= MI_DateAdd('dd', 1, Now()) AND [MI_PRDNEVNT].[MI_PRDNEVNT_CAUSE_EQP_KEY_N] IN ((? :ah :id=enty_key :child :all :current)) AND [MI_EQUIP000].ENTY_KEY = [MI_PRDNEVNT].[MI_PRDNEVNT_CAUSE_EQP_KEY_N]) and [MI_EQUIP000].[MI_EQUIP000_EQUIP_TECH_NBR_C] is not null

    UNION

    SELECT DISTINCT [MI_PRDNLOSS].ENTY_KEY "ENTY_KEY", [MI_PRDNLOSS].[MI_PRDNLOSS_LOSS_AMOUNT_N] "LossAmount", [MI_FNCLOC00].[MI_FNCLOC00_FNC_LOC_C] "AssetID" FROM [MI_FNCLOC00], [MI_PRDNLOSS] JOIN_SUCC [MI_PRDNEVNT] ON {MIR_CBPRDEVN} WHERE ([MI_PRDNEVNT].[MI_PRDNEVNT_START_DATE_D] >= MI_DateAdd('dd', ((? :s :id=numofdays) * -1), Now()) AND [MI_PRDNEVNT].[MI_PRDNEVNT_END_DATE_D] <= MI_DateAdd('dd', 1, Now()) AND [MI_PRDNEVNT].[MI_PRDNEVNT_CAUSE_EQP_KEY_N] IN ((? :ah :id=enty_key :child :all :current)) AND [MI_FNCLOC00].ENTY_KEY = [MI_PRDNEVNT].[MI_PRDNEVNT_CAUSE_EQP_KEY_N]) and [MI_FNCLOC00].[MI_FNCLOC00_FNC_LOC_C] is not null

    ) Table1 GROUP BY AssetID ORDER BY Sum(LossAmount) Desc

  8. On the right side of the page heading, select .

    The new query text is saved.

Results

Related Information

Copyright © 2018 General Electric Company. All rights reserved.