WM_ASST_INMR_VW

(SQL View)
Index Back

Asset Init Meter Reading View

WM Asset Initial Meter Reading View - initial meter reading data (if any) for each AM Asset x Meter Type combination - level 2 view

SELECT B.BUSINESS_UNIT_AM , B.ASSET_ID , B.METER_TYPE , B.UNIT_OF_MEASURE , B.METER_OPTION , A.IN_SERVICE_DT , C.READING AS ORIGINAL_READING , C.CUM_READING AS ORIGIN_CUM_READING , %DatePart(C.READING_DTTM) AS ORIG_READING_DT FROM PS_ASSET A , PS_WM_ASSET_MTR_VW B , PS_AM_METER_READ C WHERE B.BUSINESS_UNIT_AM = A.BUSINESS_UNIT AND B.ASSET_ID = A.ASSET_ID AND C.BUSINESS_UNIT = B.BUSINESS_UNIT_AM AND C.ASSET_ID = B.ASSET_ID AND C.METER_TYPE = B.METER_TYPE AND C.READING_DTTM = ( SELECT MAX(I.READING_DTTM) FROM PS_AM_METER_READ I WHERE I.BUSINESS_UNIT = C.BUSINESS_UNIT AND I.ASSET_ID = C.ASSET_ID AND I.METER_TYPE = C.METER_TYPE AND %DatePart(I.READING_DTTM) <= A.IN_SERVICE_DT)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT_AM Character(5) VARCHAR2(5) NOT NULL AM Business Unit
2 ASSET_ID Character(12) VARCHAR2(12) NOT NULL Asset Identification
3 METER_TYPE Character(30) VARCHAR2(30) NOT NULL Meter Type
4 UNIT_OF_MEASURE Character(3) VARCHAR2(3) NOT NULL Used on an approval rule set.
MHR=Muti Hourly
PER=Percentage
SQF=Square Footage

Prompt Table: UNITS_TBL

5 METER_OPTION Character(1) VARCHAR2(1) NOT NULL Meter Option
D=Decreasing
I=Increasing
R=Tolerance Range
6 IN_SERVICE_DT Date(10) DATE In Service Date
7 ORIGINAL_READING Signed Number(15,6) DECIMAL(13,6) NOT NULL Initial Reading
8 ORIGIN_CUM_READING Signed Number(21,4) DECIMAL(19,4) NOT NULL Initial Cumulative Reading
9 ORIG_READING_DT Date(10) DATE Initial Reading Date