RE_RAS_VW

(SQL View)
Index Back

Recently Acquired Site

Recently Acquired Site

SELECT A.BUSINESS_UNIT , A.SAR_ID , B.SITE_ID , C.REGION_CD , B.ACQUIRED , B.ACQUIRED_DATE , B.LS_KEY , B.ASSET_ID , B.PROJECT_ID , ( CASE WHEN %DateDiff(A.ACTUAL_COMP_DT,%CURRENTDATEIN) >= 0 AND %DateDiff(A.ACTUAL_COMP_DT,%CURRENTDATEIN) <= 30 THEN 1 ELSE 0 END ) AS THIRTY_DAYS , ( CASE WHEN %DateDiff(A.ACTUAL_COMP_DT,%CURRENTDATEIN) >= 31 AND %DateDiff(A.ACTUAL_COMP_DT,%CURRENTDATEIN) <= 60 THEN 1 ELSE 0 END ) AS SIXTY_DAYS , ( CASE WHEN %DateDiff(A.ACTUAL_COMP_DT,%CURRENTDATEIN) >= 61 AND %DateDiff(A.ACTUAL_COMP_DT,%CURRENTDATEIN) <= 180 THEN 1 ELSE 0 END ) AS SIX_MONTHS FROM PS_RE_SAR_DETAIL A , PS_RE_SAR_FINALISE B , PS_RE_SITE C WHERE A.SAR_ID = B.SAR_ID AND B.SITE_ID = C.SITE_ID AND A.SAR_STATUS = '5' AND C.SITE_STATUS = '5' AND B.ACQUIRED = 'Y'

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 SAR_ID Character(15) VARCHAR2(15) NOT NULL SAR ID
3 SITE_ID Character(15) VARCHAR2(15) NOT NULL Uniquely identifies an organizational entity that purchases goods or services from the enterprise. Represents the sold-to customer which is the customer organization that places orders. The CUST_ID may or may not be the same as the identifiers for the bill-to and ship-to locations.
4 REGION_CD Character(10) VARCHAR2(10) NOT NULL Identifies the Sales Region. Populated on the Item Table to identify the Sales Region the Item is applied to.
5 ACQUIRED Character(1) VARCHAR2(1) NOT NULL Acquired
6 ACQUIRED_DATE Date(10) DATE Acquisition Date
7 LS_KEY Number(15,0) DECIMAL(15) NOT NULL Lease Key, Unique Key
8 ASSET_ID Character(12) VARCHAR2(12) NOT NULL Asset Identification
9 PROJECT_ID Character(15) VARCHAR2(15) NOT NULL Project Id ChartField
10 THIRTY_DAYS Number(6,0) INTEGER NOT NULL Recently Acquired Paglet Field
11 SIXTY_DAYS Number(6,0) INTEGER NOT NULL Recently Acquired Paglet Field
12 SIX_MONTHS Number(6,0) INTEGER NOT NULL Recently Acquired Paglet Field