Placeholder Asset Component
Table
Columns
| Property |
Db Table |
Db Column |
Db DataType |
Nullable |
Primary Key |
Joins |
RuleEvaluationFailedReason |
ampc.asset_component |
rule_evaluation_failed_reason |
ampc.rule_evaluation_failed_reason |
True |
|
|
RuleEvaluationPassed |
ampc.asset_component |
rule_evaluation_passed |
boolean |
False |
|
|
RulesLastEvaluatedOn |
ampc.asset_component |
rules_last_evaluated_on |
timestamp without time zone |
True |
|
|
Unsubscribed |
ampc.asset_component |
unsubscribed |
boolean |
False |
|
|
Code |
ampc.asset_component |
code |
character varying(50) |
False |
|
|
CreatedByUserId |
ampc.asset_component |
created_by_user_id |
bigint |
False |
|
|
CreatedByUserCode |
uam.user |
code |
character varying(50) |
False |
|
ampc.asset_component.created_by_user_id = uam.user.user_id |
CreatedByUserFullName |
uam.user |
full_name |
character varying(200) |
False |
|
ampc.asset_component.created_by_user_id = uam.user.user_id |
CreatedOn |
ampc.asset_component |
created_on |
timestamp without time zone |
False |
|
|
ModifiedByUserId |
ampc.asset_component |
modified_by_user_id |
bigint |
False |
|
|
ModifiedByUserCode |
uam.user |
code |
character varying(50) |
False |
|
ampc.asset_component.modified_by_user_id = uam.user.user_id |
ModifiedByUserFullName |
uam.user |
full_name |
character varying(200) |
False |
|
ampc.asset_component.modified_by_user_id = uam.user.user_id |
ModifiedOn |
ampc.asset_component |
modified_on |
timestamp without time zone |
False |
|
|
Version |
ampc.asset_component |
version |
integer |
False |
|
|
PermissionTreeId |
ampc.asset_component |
permission_tree_id |
bigint |
False |
|
|
PermissionTreeCode |
uam.permission_tree |
code |
text |
False |
|
ampc.asset_component.permission_tree_id = uam.permission_tree.permission_tree_id |
PermissionTreeDescription |
uam.permission_tree |
description |
text |
True |
|
ampc.asset_component.permission_tree_id = uam.permission_tree.permission_tree_id |
AssetId |
ampc.asset_component |
asset_id |
bigint |
False |
|
|
AssetCode |
ampc.asset |
code |
character varying(50) |
False |
|
ampc.asset_component.asset_id = ampc.asset.asset_id |
AssetDescription |
ampc.asset |
description |
character varying(100) |
False |
|
ampc.asset_component.asset_id = ampc.asset.asset_id |
AssetRecordType |
ampc.asset |
record_type |
ampc.asset_record_type |
False |
|
ampc.asset_component.asset_id = ampc.asset.asset_id |
AssetAssetTypeId |
ampc.asset_type |
asset_type_id |
bigint |
False |
True |
ampc.asset_component.asset_id = ampc.asset.asset_id Then
ampc.asset.asset_type_id = ampc.asset_type.asset_type_id |
AssetAssetTypeRecordType |
ampc.asset_type |
record_type |
ampc.asset_type_record_type |
False |
|
ampc.asset_component.asset_id = ampc.asset.asset_id Then
ampc.asset.asset_type_id = ampc.asset_type.asset_type_id |
AssetNearestRegularAssetId |
ampc.asset |
asset_id |
bigint |
False |
True |
ampc.asset_component.asset_id = ampc.asset.asset_id Then
ampc.asset.nearest_regular_asset_id = ampc.asset.asset_id |
AssetNearestRegularAssetCode |
ampc.asset |
code |
character varying(50) |
False |
|
ampc.asset_component.asset_id = ampc.asset.asset_id Then
ampc.asset.nearest_regular_asset_id = ampc.asset.asset_id |
AssetNearestRegularAssetDescription |
ampc.asset |
description |
character varying(100) |
False |
|
ampc.asset_component.asset_id = ampc.asset.asset_id Then
ampc.asset.nearest_regular_asset_id = ampc.asset.asset_id |
AssetTreePathId |
system.tree_path |
tree_path_id |
bigint |
False |
True |
ampc.asset_component.asset_id = ampc.asset.asset_id Then
ampc.asset.tree_path_id = system.tree_path.tree_path_id |
AssetTreePathItems |
system.tree_path |
path_items |
system.tree_path_item[] |
False |
|
ampc.asset_component.asset_id = ampc.asset.asset_id Then
ampc.asset.tree_path_id = system.tree_path.tree_path_id |
DevelopmentStatus |
ampc.asset_component |
development_status |
ampc.asset_development_status |
False |
|
|
Id |
ampc.asset_component |
asset_component_id |
bigint |
False |
True |
|
IsActive |
ampc.asset_component |
is_active |
boolean |
False |
|
|
IsHistorical |
ampc.asset_component |
is_historical |
boolean |
False |
|
|
IsInherited |
ampc.asset_component |
is_inherited |
boolean |
False |
|
|
IsProposed |
ampc.asset_component |
is_proposed |
boolean |
False |
|
|
LastConfirmedChangeLogId |
ampc.asset_component |
last_confirmed_change_log_id |
bigint |
True |
|
|
LastConfirmedOn |
ampc.asset_component |
last_confirmed_on |
timestamp without time zone |
True |
|
|
ParentComponentId |
ampc.asset_component |
parent_component_id |
bigint |
True |
|
|
ParentComponentCode |
ampc.asset_component |
code |
character varying(50) |
False |
|
ampc.asset_component.parent_component_id = ampc.asset_component.asset_component_id |
ParentComponentDescription |
ampc.asset_component |
description |
character varying(100) |
False |
|
ampc.asset_component.parent_component_id = ampc.asset_component.asset_component_id |
ParentComponentTreePathId |
system.tree_path |
tree_path_id |
bigint |
False |
True |
ampc.asset_component.parent_component_id = ampc.asset_component.asset_component_id Then
ampc.asset_component.tree_path_id = system.tree_path.tree_path_id |
ParentComponentTreePathItems |
system.tree_path |
path_items |
system.tree_path_item[] |
False |
|
ampc.asset_component.parent_component_id = ampc.asset_component.asset_component_id Then
ampc.asset_component.tree_path_id = system.tree_path.tree_path_id |
RecordType |
ampc.asset_component |
record_type |
ampc.asset_component_record_type |
False |
|
|
SequenceNumber |
ampc.asset_component |
sequence_number |
integer |
True |
|
|
SiteId |
ampc.asset_component |
site_id |
bigint |
False |
|
|
SiteCode |
gen.site |
code |
character varying |
False |
|
ampc.asset_component.site_id = gen.site.site_id |
SiteDescription |
gen.site |
description |
character varying |
False |
|
ampc.asset_component.site_id = gen.site.site_id |
SynchronisedWithTypeObjectUpTo |
ampc.asset_component |
synchronised_with_type_object_up_to |
timestamp without time zone |
True |
|
|
Unsynchronised |
ampc.asset_component |
unsynchronised |
boolean |
False |
|
|
TreePathId |
system.tree_path |
tree_path_id |
bigint |
False |
True |
ampc.asset_component.tree_path_id = system.tree_path.tree_path_id |
TreePathItems |
system.tree_path |
path_items |
system.tree_path_item[] |
False |
|
ampc.asset_component.tree_path_id = system.tree_path.tree_path_id |
AlternativeDescription |
ampc.asset_component |
alternative_description |
character varying(255) |
False |
|
|
AssetImportanceId |
ampc.asset_component |
asset_importance_id |
bigint |
True |
|
|
AssetImportanceCode |
risk.asset_importance |
code |
character varying(50) |
False |
|
ampc.asset_component.asset_importance_id = risk.asset_importance.asset_importance_id |
AssetImportanceDescription |
risk.asset_importance |
description |
character varying(100) |
False |
|
ampc.asset_component.asset_importance_id = risk.asset_importance.asset_importance_id |
AssetTypeId |
ampc.asset_component |
asset_type_id |
bigint |
True |
|
|
AssetTypeCode |
ampc.asset_type |
code |
character varying(50) |
False |
|
ampc.asset_component.asset_type_id = ampc.asset_type.asset_type_id |
AssetTypeDescription |
ampc.asset_type |
description |
character varying(100) |
False |
|
ampc.asset_component.asset_type_id = ampc.asset_type.asset_type_id |
AssetTypeTreePathId |
system.tree_path |
tree_path_id |
bigint |
False |
True |
ampc.asset_component.asset_type_id = ampc.asset_type.asset_type_id Then
ampc.asset_type.tree_path_id = system.tree_path.tree_path_id |
AssetTypeTreePathItems |
system.tree_path |
path_items |
system.tree_path_item[] |
False |
|
ampc.asset_component.asset_type_id = ampc.asset_type.asset_type_id Then
ampc.asset_type.tree_path_id = system.tree_path.tree_path_id |
Barcode |
ampc.asset_component |
barcode |
character varying(900) |
True |
|
|
CommissionedOn |
ampc.asset_component |
commissioned_on |
date |
True |
|
|
CommissioningWorkOrderId |
ampc.asset_component |
commissioning_work_order_id |
bigint |
True |
|
|
CommissioningWorkOrderCode |
wm.work_order |
code |
character varying(50) |
False |
|
ampc.asset_component.commissioning_work_order_id = wm.work_order.work_order_id |
CommissioningWorkOrderDescription |
wm.work_order |
description |
character varying(100) |
False |
|
ampc.asset_component.commissioning_work_order_id = wm.work_order.work_order_id |
Description |
ampc.asset_component |
description |
character varying(100) |
False |
|
|
InheritedFromId |
ampc.asset_component |
inherited_from_id |
bigint |
True |
|
|
InheritedFromLastConfirmedOn |
ampc.asset_type_component |
last_confirmed_on |
timestamp without time zone |
True |
|
ampc.asset_component.inherited_from_id = ampc.asset_type_component.asset_type_component_id |
InheritedFromRulesLastChangedOn |
ampc.asset_type_component |
rules_last_changed_on |
timestamp without time zone |
True |
|
ampc.asset_component.inherited_from_id = ampc.asset_type_component.asset_type_component_id |
InheritedFromTreePathId |
system.tree_path |
tree_path_id |
bigint |
False |
True |
ampc.asset_component.inherited_from_id = ampc.asset_type_component.asset_type_component_id Then
ampc.asset_type_component.tree_path_id = system.tree_path.tree_path_id |
InheritedFromTreePathItems |
system.tree_path |
path_items |
system.tree_path_item[] |
False |
|
ampc.asset_component.inherited_from_id = ampc.asset_type_component.asset_type_component_id Then
ampc.asset_type_component.tree_path_id = system.tree_path.tree_path_id |
LinkedOnTypeSide |
ampc.asset_component |
linked_on_type_side |
boolean |
True |
|
|
LinkedToAssetTypeId |
ampc.asset_component |
linked_to_asset_type_id |
bigint |
True |
|
|
LinkedToAssetTypeCode |
ampc.asset_type |
code |
character varying(50) |
False |
|
ampc.asset_component.linked_to_asset_type_id = ampc.asset_type.asset_type_id |
LinkedToAssetTypeDescription |
ampc.asset_type |
description |
character varying(100) |
False |
|
ampc.asset_component.linked_to_asset_type_id = ampc.asset_type.asset_type_id |
LinkedToAssetTypeTreePathId |
system.tree_path |
tree_path_id |
bigint |
False |
True |
ampc.asset_component.linked_to_asset_type_id = ampc.asset_type.asset_type_id Then
ampc.asset_type.tree_path_id = system.tree_path.tree_path_id |
LinkedToAssetTypeTreePathItems |
system.tree_path |
path_items |
system.tree_path_item[] |
False |
|
ampc.asset_component.linked_to_asset_type_id = ampc.asset_type.asset_type_id Then
ampc.asset_type.tree_path_id = system.tree_path.tree_path_id |
MaterialMasterId |
ampc.asset_component |
material_master_id |
bigint |
True |
|
|
MaterialMasterCode |
mm.material_master |
code |
character varying(50) |
False |
|
ampc.asset_component.material_master_id = mm.material_master.material_master_id |
MaterialMasterDescription |
mm.material_master |
description |
character varying(100) |
False |
|
ampc.asset_component.material_master_id = mm.material_master.material_master_id |
Notes |
ampc.asset_component |
notes |
text |
True |
|
|
PartNumber |
ampc.asset_component |
part_number |
character varying(50) |
True |
|
|
PlaceholderForAssetTypeId |
ampc.asset_component |
placeholder_for_asset_type_id |
bigint |
True |
|
|
PlaceholderForAssetTypeCode |
ampc.asset_type |
code |
character varying(50) |
False |
|
ampc.asset_component.placeholder_for_asset_type_id = ampc.asset_type.asset_type_id |
PlaceholderForAssetTypeDescription |
ampc.asset_type |
description |
character varying(100) |
False |
|
ampc.asset_component.placeholder_for_asset_type_id = ampc.asset_type.asset_type_id |
PlaceholderForAssetTypeTreePathId |
system.tree_path |
tree_path_id |
bigint |
False |
True |
ampc.asset_component.placeholder_for_asset_type_id = ampc.asset_type.asset_type_id Then
ampc.asset_type.tree_path_id = system.tree_path.tree_path_id |
PlaceholderForAssetTypeTreePathItems |
system.tree_path |
path_items |
system.tree_path_item[] |
False |
|
ampc.asset_component.placeholder_for_asset_type_id = ampc.asset_type.asset_type_id Then
ampc.asset_type.tree_path_id = system.tree_path.tree_path_id |
QRCode |
ampc.asset_component |
qr_code |
character varying(200) |
True |
|
|
Quantity |
ampc.asset_component |
quantity |
integer |
False |
|
|
RFId |
ampc.asset_component |
rfid |
character varying(200) |
True |
|
|
SerialNumber |
ampc.asset_component |
serial_number |
character varying(50) |
True |
|
|
Specification |
ampc.asset_component |
specification |
character varying(100) |
True |
|
|
SupplierId |
ampc.asset_component |
supplier_id |
bigint |
True |
|
|
SupplierCode |
gen.supplier |
code |
character varying(50) |
False |
|
ampc.asset_component.supplier_id = gen.supplier.supplier_id |
SupplierDescription |
gen.supplier |
description |
character varying(100) |
False |
|
ampc.asset_component.supplier_id = gen.supplier.supplier_id |
SupplierPartNumber |
ampc.asset_component |
supplier_part_number |
character varying(50) |
True |
|
|
Warranty |
ampc.asset_component |
warranty |
ampc.warranty |
True |
|
|
Enumerations
Mapping 1
| Property |
Property Type |
Db Column |
Db Column Type |
Db Column Values |
| RuleEvaluationFailedReason |
RuleEvaluationFailedReason |
rule_evaluation_failed_reason |
ampc.rule_evaluation_failed_reason |
Unknown
ParentFailed
RuleFailed
ChildrenFailed
|
Mapping 2
| Property |
Property Type |
Db Column |
Db Column Type |
Db Column Values |
| AssetRecordType |
AssetRecordType |
record_type |
ampc.asset_record_type |
Regular
InPlace
EmptyPlaceholder
LinkedPlaceholder
|
Mapping 3
| Property |
Property Type |
Db Column |
Db Column Type |
Db Column Values |
| AssetAssetTypeRecordType |
AssetTypeRecordType |
record_type |
ampc.asset_type_record_type |
Folder
Regular
InPlace
EmptyPlaceholder
LinkedPlaceholder
|
Mapping 4
| Property |
Property Type |
Db Column |
Db Column Type |
Db Column Values |
| DevelopmentStatus |
AssetDevelopmentStatus |
development_status |
ampc.asset_development_status |
NewAwaitingConfirmation
ModifiedAwaitingConfirmation
DeletedAwaitingConfirmation
DeletedConfirmed
Confirmed
NewUnderDevelopment
ModifiedUnderDevelopment
|
Mapping 5
| Property |
Property Type |
Db Column |
Db Column Type |
Db Column Values |
| RecordType |
AssetComponentRecordType |
record_type |
ampc.asset_component_record_type |
Regular
EmptyPlaceholder
LinkedPlaceholder
|
Mapping 6
| Property |
Property Type |
Db Column |
Db Column Type |
Db Column Values |
| Warranty |
Warranty |
warranty |
ampc.warranty |
Strict
NonStrict
Expired
|
Queries
The list of example Placeholder Asset Component queries can be interpreted using the following legend:
| Legend |
Description |
| Primary Table Alias |
The alias for the ampc.asset_component table in the query |
| Include References |
Include (true) or exclude (false) all lookup table joins in the query |
| Include Permissions |
Include (true) or exclude (false) the permission table join in the query to enforce or skip row-level security based on the permissions for the user |
Query 1
| Primary Table Alias |
Include References |
Include Permissions |
_ac |
False |
False |
| Parameter Name |
Data Type |
Value |
@record_type |
Unknown |
EmptyPlaceholder |
@record_type1 |
Unknown |
LinkedPlaceholder |
@asset_component_id |
Bigint |
0 |
SELECT
_ac.rule_evaluation_failed_reason AS "RuleEvaluationFailedReason",
_ac.rule_evaluation_passed AS "RuleEvaluationPassed",
_ac.rules_last_evaluated_on AS "RulesLastEvaluatedOn",
_ac.unsubscribed AS "Unsubscribed",
_ac.code AS "Code",
_ac.created_by_user_id AS "CreatedByUserId",
_ac.created_on AS "CreatedOn",
_ac.modified_by_user_id AS "ModifiedByUserId",
_ac.modified_on AS "ModifiedOn",
_ac.version AS "Version",
_ac.permission_tree_id AS "PermissionTreeId",
_ac.asset_id AS "AssetId",
_ac.development_status AS "DevelopmentStatus",
_ac.asset_component_id AS "Id",
_ac.is_active AS "IsActive",
_ac.is_historical AS "IsHistorical",
_ac.is_inherited AS "IsInherited",
_ac.is_proposed AS "IsProposed",
_ac.last_confirmed_change_log_id AS "LastConfirmedChangeLogId",
_ac.last_confirmed_on AS "LastConfirmedOn",
_ac.parent_component_id AS "ParentComponentId",
_ac.record_type AS "RecordType",
_ac.sequence_number AS "SequenceNumber",
_ac.site_id AS "SiteId",
_ac.synchronised_with_type_object_up_to AS "SynchronisedWithTypeObjectUpTo",
_ac.unsynchronised AS "Unsynchronised",
_tp.tree_path_id AS "TreePathId",
_tp.path_items AS "TreePathItems",
_ac.alternative_description AS "AlternativeDescription",
_ac.asset_importance_id AS "AssetImportanceId",
_ac.asset_type_id AS "AssetTypeId",
_ac.barcode AS "Barcode",
_ac.commissioned_on AS "CommissionedOn",
_ac.commissioning_work_order_id AS "CommissioningWorkOrderId",
_ac.description AS "Description",
_ac.inherited_from_id AS "InheritedFromId",
_ac.linked_on_type_side AS "LinkedOnTypeSide",
_ac.linked_to_asset_type_id AS "LinkedToAssetTypeId",
_ac.material_master_id AS "MaterialMasterId",
_ac.notes AS "Notes",
_ac.part_number AS "PartNumber",
_ac.placeholder_for_asset_type_id AS "PlaceholderForAssetTypeId",
_ac.qr_code AS "QRCode",
_ac.quantity AS "Quantity",
_ac.rfid AS "RFId",
_ac.serial_number AS "SerialNumber",
_ac.specification AS "Specification",
_ac.supplier_id AS "SupplierId",
_ac.supplier_part_number AS "SupplierPartNumber",
_ac.warranty AS "Warranty"
FROM
ampc.asset_component _ac
LEFT JOIN system.tree_path _tp ON _ac.tree_path_id = _tp.tree_path_id
WHERE
((_ac.record_type = @record_type OR _ac.record_type = @record_type1) AND
_ac.asset_component_id > @asset_component_id)
Query 2
| Primary Table Alias |
Include References |
Include Permissions |
_ac |
True |
False |
| Parameter Name |
Data Type |
Value |
@record_type |
Unknown |
EmptyPlaceholder |
@record_type1 |
Unknown |
LinkedPlaceholder |
@asset_component_id |
Bigint |
0 |
SELECT
_ac.rule_evaluation_failed_reason AS "RuleEvaluationFailedReason",
_ac.rule_evaluation_passed AS "RuleEvaluationPassed",
_ac.rules_last_evaluated_on AS "RulesLastEvaluatedOn",
_ac.unsubscribed AS "Unsubscribed",
_ac.code AS "Code",
_u.user_id AS "CreatedByUserId",
_u.code AS "CreatedByUserCode",
_u.full_name AS "CreatedByUserFullName",
_ac.created_on AS "CreatedOn",
_u1.user_id AS "ModifiedByUserId",
_u1.code AS "ModifiedByUserCode",
_u1.full_name AS "ModifiedByUserFullName",
_ac.modified_on AS "ModifiedOn",
_ac.version AS "Version",
_pt.permission_tree_id AS "PermissionTreeId",
_pt.code AS "PermissionTreeCode",
_pt.description AS "PermissionTreeDescription",
_a.asset_id AS "AssetId",
_a.code AS "AssetCode",
_a.description AS "AssetDescription",
_a.record_type AS "AssetRecordType",
_a.asset_type_id AS "AssetAssetType",
_at.asset_type_id AS "AssetAssetTypeId",
_at.record_type AS "AssetAssetTypeRecordType",
_a.nearest_regular_asset_id AS "AssetNearestRegularAsset",
_a1.asset_id AS "AssetNearestRegularAssetId",
_a1.code AS "AssetNearestRegularAssetCode",
_a1.description AS "AssetNearestRegularAssetDescription",
_a.tree_path_id AS "AssetTreePath",
_tp.tree_path_id AS "AssetTreePathId",
_tp.path_items AS "AssetTreePathItems",
_ac.development_status AS "DevelopmentStatus",
_ac.asset_component_id AS "Id",
_ac.is_active AS "IsActive",
_ac.is_historical AS "IsHistorical",
_ac.is_inherited AS "IsInherited",
_ac.is_proposed AS "IsProposed",
_ac.last_confirmed_change_log_id AS "LastConfirmedChangeLogId",
_ac.last_confirmed_on AS "LastConfirmedOn",
_ac1.asset_component_id AS "ParentComponentId",
_ac1.code AS "ParentComponentCode",
_ac1.description AS "ParentComponentDescription",
_ac1.tree_path_id AS "ParentComponentTreePath",
_tp1.tree_path_id AS "ParentComponentTreePathId",
_tp1.path_items AS "ParentComponentTreePathItems",
_ac.record_type AS "RecordType",
_ac.sequence_number AS "SequenceNumber",
_s.site_id AS "SiteId",
_s.code AS "SiteCode",
_s.description AS "SiteDescription",
_ac.synchronised_with_type_object_up_to AS "SynchronisedWithTypeObjectUpTo",
_ac.unsynchronised AS "Unsynchronised",
_tp2.tree_path_id AS "TreePathId",
_tp2.path_items AS "TreePathItems",
_ac.alternative_description AS "AlternativeDescription",
_ai.asset_importance_id AS "AssetImportanceId",
_ai.code AS "AssetImportanceCode",
_ai.description AS "AssetImportanceDescription",
_at1.asset_type_id AS "AssetTypeId",
_at1.code AS "AssetTypeCode",
_at1.description AS "AssetTypeDescription",
_at1.tree_path_id AS "AssetTypeTreePath",
_tp3.tree_path_id AS "AssetTypeTreePathId",
_tp3.path_items AS "AssetTypeTreePathItems",
_ac.barcode AS "Barcode",
_ac.commissioned_on AS "CommissionedOn",
_wo.work_order_id AS "CommissioningWorkOrderId",
_wo.code AS "CommissioningWorkOrderCode",
_wo.description AS "CommissioningWorkOrderDescription",
_ac.description AS "Description",
_atc.asset_type_component_id AS "InheritedFromId",
_atc.last_confirmed_on AS "InheritedFromLastConfirmedOn",
_atc.rules_last_changed_on AS "InheritedFromRulesLastChangedOn",
_atc.tree_path_id AS "InheritedFromTreePath",
_tp4.tree_path_id AS "InheritedFromTreePathId",
_tp4.path_items AS "InheritedFromTreePathItems",
_ac.linked_on_type_side AS "LinkedOnTypeSide",
_at2.asset_type_id AS "LinkedToAssetTypeId",
_at2.code AS "LinkedToAssetTypeCode",
_at2.description AS "LinkedToAssetTypeDescription",
_at2.tree_path_id AS "LinkedToAssetTypeTreePath",
_tp5.tree_path_id AS "LinkedToAssetTypeTreePathId",
_tp5.path_items AS "LinkedToAssetTypeTreePathItems",
_mm.material_master_id AS "MaterialMasterId",
_mm.code AS "MaterialMasterCode",
_mm.description AS "MaterialMasterDescription",
_ac.notes AS "Notes",
_ac.part_number AS "PartNumber",
_at3.asset_type_id AS "PlaceholderForAssetTypeId",
_at3.code AS "PlaceholderForAssetTypeCode",
_at3.description AS "PlaceholderForAssetTypeDescription",
_at3.tree_path_id AS "PlaceholderForAssetTypeTreePath",
_tp6.tree_path_id AS "PlaceholderForAssetTypeTreePathId",
_tp6.path_items AS "PlaceholderForAssetTypeTreePathItems",
_ac.qr_code AS "QRCode",
_ac.quantity AS "Quantity",
_ac.rfid AS "RFId",
_ac.serial_number AS "SerialNumber",
_ac.specification AS "Specification",
_s1.supplier_id AS "SupplierId",
_s1.code AS "SupplierCode",
_s1.description AS "SupplierDescription",
_ac.supplier_part_number AS "SupplierPartNumber",
_ac.warranty AS "Warranty"
FROM
ampc.asset_component _ac
JOIN uam.user _u ON _ac.created_by_user_id = _u.user_id
JOIN uam.user _u1 ON _ac.modified_by_user_id = _u1.user_id
JOIN uam.permission_tree _pt ON _ac.permission_tree_id = _pt.permission_tree_id
LEFT JOIN ampc.asset _a ON _ac.asset_id = _a.asset_id
LEFT JOIN ampc.asset_type _at ON _a.asset_type_id = _at.asset_type_id
LEFT JOIN ampc.asset _a1 ON _a.nearest_regular_asset_id = _a1.asset_id
LEFT JOIN system.tree_path _tp ON _a.tree_path_id = _tp.tree_path_id
LEFT JOIN ampc.asset_component _ac1 ON _ac.parent_component_id = _ac1.asset_component_id
LEFT JOIN system.tree_path _tp1 ON _ac1.tree_path_id = _tp1.tree_path_id
JOIN gen.site _s ON _ac.site_id = _s.site_id
LEFT JOIN system.tree_path _tp2 ON _ac.tree_path_id = _tp2.tree_path_id
LEFT JOIN risk.asset_importance _ai ON _ac.asset_importance_id = _ai.asset_importance_id
LEFT JOIN ampc.asset_type _at1 ON _ac.asset_type_id = _at1.asset_type_id
LEFT JOIN system.tree_path _tp3 ON _at1.tree_path_id = _tp3.tree_path_id
LEFT JOIN wm.work_order _wo ON _ac.commissioning_work_order_id = _wo.work_order_id
LEFT JOIN ampc.asset_type_component _atc ON _ac.inherited_from_id = _atc.asset_type_component_id
LEFT JOIN system.tree_path _tp4 ON _atc.tree_path_id = _tp4.tree_path_id
LEFT JOIN ampc.asset_type _at2 ON _ac.linked_to_asset_type_id = _at2.asset_type_id
LEFT JOIN system.tree_path _tp5 ON _at2.tree_path_id = _tp5.tree_path_id
LEFT JOIN mm.material_master _mm ON _ac.material_master_id = _mm.material_master_id
LEFT JOIN ampc.asset_type _at3 ON _ac.placeholder_for_asset_type_id = _at3.asset_type_id
LEFT JOIN system.tree_path _tp6 ON _at3.tree_path_id = _tp6.tree_path_id
LEFT JOIN gen.supplier _s1 ON _ac.supplier_id = _s1.supplier_id
WHERE
((_ac.record_type = @record_type OR _ac.record_type = @record_type1) AND
_ac.asset_component_id > @asset_component_id)
Query 3
| Primary Table Alias |
Include References |
Include Permissions |
_ac |
False |
True |
| Parameter Name |
Data Type |
Value |
@record_type |
Unknown |
EmptyPlaceholder |
@record_type1 |
Unknown |
LinkedPlaceholder |
@asset_component_id |
Bigint |
0 |
@permission_user_id |
Bigint |
500000000000 |
@permission_id |
Bigint |
116100 |
WITH permission_tree_ids AS
(
SELECT DISTINCT unnest(psd.permission_tree_ids) AS permission_tree_id FROM uam.user_permission up JOIN uam.permission_set_data psd ON up.permission_set_id = psd.permission_set_id WHERE up.user_id = @permission_user_id AND up.permission_id = @permission_id
)
SELECT
_ac.rule_evaluation_failed_reason AS "RuleEvaluationFailedReason",
_ac.rule_evaluation_passed AS "RuleEvaluationPassed",
_ac.rules_last_evaluated_on AS "RulesLastEvaluatedOn",
_ac.unsubscribed AS "Unsubscribed",
_ac.code AS "Code",
_ac.created_by_user_id AS "CreatedByUserId",
_ac.created_on AS "CreatedOn",
_ac.modified_by_user_id AS "ModifiedByUserId",
_ac.modified_on AS "ModifiedOn",
_ac.version AS "Version",
_ac.permission_tree_id AS "PermissionTreeId",
_ac.asset_id AS "AssetId",
_ac.development_status AS "DevelopmentStatus",
_ac.asset_component_id AS "Id",
_ac.is_active AS "IsActive",
_ac.is_historical AS "IsHistorical",
_ac.is_inherited AS "IsInherited",
_ac.is_proposed AS "IsProposed",
_ac.last_confirmed_change_log_id AS "LastConfirmedChangeLogId",
_ac.last_confirmed_on AS "LastConfirmedOn",
_ac.parent_component_id AS "ParentComponentId",
_ac.record_type AS "RecordType",
_ac.sequence_number AS "SequenceNumber",
_ac.site_id AS "SiteId",
_ac.synchronised_with_type_object_up_to AS "SynchronisedWithTypeObjectUpTo",
_ac.unsynchronised AS "Unsynchronised",
_tp.tree_path_id AS "TreePathId",
_tp.path_items AS "TreePathItems",
_ac.alternative_description AS "AlternativeDescription",
_ac.asset_importance_id AS "AssetImportanceId",
_ac.asset_type_id AS "AssetTypeId",
_ac.barcode AS "Barcode",
_ac.commissioned_on AS "CommissionedOn",
_ac.commissioning_work_order_id AS "CommissioningWorkOrderId",
_ac.description AS "Description",
_ac.inherited_from_id AS "InheritedFromId",
_ac.linked_on_type_side AS "LinkedOnTypeSide",
_ac.linked_to_asset_type_id AS "LinkedToAssetTypeId",
_ac.material_master_id AS "MaterialMasterId",
_ac.notes AS "Notes",
_ac.part_number AS "PartNumber",
_ac.placeholder_for_asset_type_id AS "PlaceholderForAssetTypeId",
_ac.qr_code AS "QRCode",
_ac.quantity AS "Quantity",
_ac.rfid AS "RFId",
_ac.serial_number AS "SerialNumber",
_ac.specification AS "Specification",
_ac.supplier_id AS "SupplierId",
_ac.supplier_part_number AS "SupplierPartNumber",
_ac.warranty AS "Warranty",
_ac.permission_tree_id AS "_ac_permission_tree_id"
FROM
ampc.asset_component _ac
JOIN permission_tree_ids permission_join ON _ac.permission_tree_id = permission_join.permission_tree_id
LEFT JOIN system.tree_path _tp ON _ac.tree_path_id = _tp.tree_path_id
WHERE
((_ac.record_type = @record_type OR _ac.record_type = @record_type1) AND
_ac.asset_component_id > @asset_component_id)
Query 4
| Primary Table Alias |
Include References |
Include Permissions |
_ac |
True |
True |
| Parameter Name |
Data Type |
Value |
@record_type |
Unknown |
EmptyPlaceholder |
@record_type1 |
Unknown |
LinkedPlaceholder |
@asset_component_id |
Bigint |
0 |
@permission_user_id |
Bigint |
500000000000 |
@permission_id |
Bigint |
116100 |
WITH permission_tree_ids AS
(
SELECT DISTINCT unnest(psd.permission_tree_ids) AS permission_tree_id FROM uam.user_permission up JOIN uam.permission_set_data psd ON up.permission_set_id = psd.permission_set_id WHERE up.user_id = @permission_user_id AND up.permission_id = @permission_id
)
SELECT
_ac.rule_evaluation_failed_reason AS "RuleEvaluationFailedReason",
_ac.rule_evaluation_passed AS "RuleEvaluationPassed",
_ac.rules_last_evaluated_on AS "RulesLastEvaluatedOn",
_ac.unsubscribed AS "Unsubscribed",
_ac.code AS "Code",
_u.user_id AS "CreatedByUserId",
_u.code AS "CreatedByUserCode",
_u.full_name AS "CreatedByUserFullName",
_ac.created_on AS "CreatedOn",
_u1.user_id AS "ModifiedByUserId",
_u1.code AS "ModifiedByUserCode",
_u1.full_name AS "ModifiedByUserFullName",
_ac.modified_on AS "ModifiedOn",
_ac.version AS "Version",
_pt.permission_tree_id AS "PermissionTreeId",
_pt.code AS "PermissionTreeCode",
_pt.description AS "PermissionTreeDescription",
_a.asset_id AS "AssetId",
_a.code AS "AssetCode",
_a.description AS "AssetDescription",
_a.record_type AS "AssetRecordType",
_a.asset_type_id AS "AssetAssetType",
_at.asset_type_id AS "AssetAssetTypeId",
_at.record_type AS "AssetAssetTypeRecordType",
_a.nearest_regular_asset_id AS "AssetNearestRegularAsset",
_a1.asset_id AS "AssetNearestRegularAssetId",
_a1.code AS "AssetNearestRegularAssetCode",
_a1.description AS "AssetNearestRegularAssetDescription",
_a.tree_path_id AS "AssetTreePath",
_tp.tree_path_id AS "AssetTreePathId",
_tp.path_items AS "AssetTreePathItems",
_ac.development_status AS "DevelopmentStatus",
_ac.asset_component_id AS "Id",
_ac.is_active AS "IsActive",
_ac.is_historical AS "IsHistorical",
_ac.is_inherited AS "IsInherited",
_ac.is_proposed AS "IsProposed",
_ac.last_confirmed_change_log_id AS "LastConfirmedChangeLogId",
_ac.last_confirmed_on AS "LastConfirmedOn",
_ac1.asset_component_id AS "ParentComponentId",
_ac1.code AS "ParentComponentCode",
_ac1.description AS "ParentComponentDescription",
_ac1.tree_path_id AS "ParentComponentTreePath",
_tp1.tree_path_id AS "ParentComponentTreePathId",
_tp1.path_items AS "ParentComponentTreePathItems",
_ac.record_type AS "RecordType",
_ac.sequence_number AS "SequenceNumber",
_s.site_id AS "SiteId",
_s.code AS "SiteCode",
_s.description AS "SiteDescription",
_ac.synchronised_with_type_object_up_to AS "SynchronisedWithTypeObjectUpTo",
_ac.unsynchronised AS "Unsynchronised",
_tp2.tree_path_id AS "TreePathId",
_tp2.path_items AS "TreePathItems",
_ac.alternative_description AS "AlternativeDescription",
_ai.asset_importance_id AS "AssetImportanceId",
_ai.code AS "AssetImportanceCode",
_ai.description AS "AssetImportanceDescription",
_at1.asset_type_id AS "AssetTypeId",
_at1.code AS "AssetTypeCode",
_at1.description AS "AssetTypeDescription",
_at1.tree_path_id AS "AssetTypeTreePath",
_tp3.tree_path_id AS "AssetTypeTreePathId",
_tp3.path_items AS "AssetTypeTreePathItems",
_ac.barcode AS "Barcode",
_ac.commissioned_on AS "CommissionedOn",
_wo.work_order_id AS "CommissioningWorkOrderId",
_wo.code AS "CommissioningWorkOrderCode",
_wo.description AS "CommissioningWorkOrderDescription",
_ac.description AS "Description",
_atc.asset_type_component_id AS "InheritedFromId",
_atc.last_confirmed_on AS "InheritedFromLastConfirmedOn",
_atc.rules_last_changed_on AS "InheritedFromRulesLastChangedOn",
_atc.tree_path_id AS "InheritedFromTreePath",
_tp4.tree_path_id AS "InheritedFromTreePathId",
_tp4.path_items AS "InheritedFromTreePathItems",
_ac.linked_on_type_side AS "LinkedOnTypeSide",
_at2.asset_type_id AS "LinkedToAssetTypeId",
_at2.code AS "LinkedToAssetTypeCode",
_at2.description AS "LinkedToAssetTypeDescription",
_at2.tree_path_id AS "LinkedToAssetTypeTreePath",
_tp5.tree_path_id AS "LinkedToAssetTypeTreePathId",
_tp5.path_items AS "LinkedToAssetTypeTreePathItems",
_mm.material_master_id AS "MaterialMasterId",
_mm.code AS "MaterialMasterCode",
_mm.description AS "MaterialMasterDescription",
_ac.notes AS "Notes",
_ac.part_number AS "PartNumber",
_at3.asset_type_id AS "PlaceholderForAssetTypeId",
_at3.code AS "PlaceholderForAssetTypeCode",
_at3.description AS "PlaceholderForAssetTypeDescription",
_at3.tree_path_id AS "PlaceholderForAssetTypeTreePath",
_tp6.tree_path_id AS "PlaceholderForAssetTypeTreePathId",
_tp6.path_items AS "PlaceholderForAssetTypeTreePathItems",
_ac.qr_code AS "QRCode",
_ac.quantity AS "Quantity",
_ac.rfid AS "RFId",
_ac.serial_number AS "SerialNumber",
_ac.specification AS "Specification",
_s1.supplier_id AS "SupplierId",
_s1.code AS "SupplierCode",
_s1.description AS "SupplierDescription",
_ac.supplier_part_number AS "SupplierPartNumber",
_ac.warranty AS "Warranty",
_ac.permission_tree_id AS "_ac_permission_tree_id",
_u.permission_tree_id AS "_u_permission_tree_id",
_u1.permission_tree_id AS "_u1_permission_tree_id",
_a.permission_tree_id AS "_a_permission_tree_id",
_at.permission_tree_id AS "_at_permission_tree_id",
_a1.permission_tree_id AS "_a1_permission_tree_id",
_ac1.permission_tree_id AS "_ac1_permission_tree_id",
_s.permission_tree_id AS "_s_permission_tree_id",
_ai.permission_tree_id AS "_ai_permission_tree_id",
_at1.permission_tree_id AS "_at1_permission_tree_id",
_wo.permission_tree_id AS "_wo_permission_tree_id",
_atc.permission_tree_id AS "_atc_permission_tree_id",
_at2.permission_tree_id AS "_at2_permission_tree_id",
_mm.permission_tree_id AS "_mm_permission_tree_id",
_at3.permission_tree_id AS "_at3_permission_tree_id",
_s1.permission_tree_id AS "_s1_permission_tree_id"
FROM
ampc.asset_component _ac
JOIN permission_tree_ids permission_join ON _ac.permission_tree_id = permission_join.permission_tree_id
JOIN uam.user _u ON _ac.created_by_user_id = _u.user_id
JOIN uam.user _u1 ON _ac.modified_by_user_id = _u1.user_id
JOIN uam.permission_tree _pt ON _ac.permission_tree_id = _pt.permission_tree_id
LEFT JOIN ampc.asset _a ON _ac.asset_id = _a.asset_id
LEFT JOIN ampc.asset_type _at ON _a.asset_type_id = _at.asset_type_id
LEFT JOIN ampc.asset _a1 ON _a.nearest_regular_asset_id = _a1.asset_id
LEFT JOIN system.tree_path _tp ON _a.tree_path_id = _tp.tree_path_id
LEFT JOIN ampc.asset_component _ac1 ON _ac.parent_component_id = _ac1.asset_component_id
LEFT JOIN system.tree_path _tp1 ON _ac1.tree_path_id = _tp1.tree_path_id
JOIN gen.site _s ON _ac.site_id = _s.site_id
LEFT JOIN system.tree_path _tp2 ON _ac.tree_path_id = _tp2.tree_path_id
LEFT JOIN risk.asset_importance _ai ON _ac.asset_importance_id = _ai.asset_importance_id
LEFT JOIN ampc.asset_type _at1 ON _ac.asset_type_id = _at1.asset_type_id
LEFT JOIN system.tree_path _tp3 ON _at1.tree_path_id = _tp3.tree_path_id
LEFT JOIN wm.work_order _wo ON _ac.commissioning_work_order_id = _wo.work_order_id
LEFT JOIN ampc.asset_type_component _atc ON _ac.inherited_from_id = _atc.asset_type_component_id
LEFT JOIN system.tree_path _tp4 ON _atc.tree_path_id = _tp4.tree_path_id
LEFT JOIN ampc.asset_type _at2 ON _ac.linked_to_asset_type_id = _at2.asset_type_id
LEFT JOIN system.tree_path _tp5 ON _at2.tree_path_id = _tp5.tree_path_id
LEFT JOIN mm.material_master _mm ON _ac.material_master_id = _mm.material_master_id
LEFT JOIN ampc.asset_type _at3 ON _ac.placeholder_for_asset_type_id = _at3.asset_type_id
LEFT JOIN system.tree_path _tp6 ON _at3.tree_path_id = _tp6.tree_path_id
LEFT JOIN gen.supplier _s1 ON _ac.supplier_id = _s1.supplier_id
WHERE
((_ac.record_type = @record_type OR _ac.record_type = @record_type1) AND
_ac.asset_component_id > @asset_component_id)