Reference → Data Service Macros → Object Macros → PES_MACRO_TIMEPHASE_ATTRIBUTES_TIMESCALE
PES_MACRO_TIMEPHASE_ATTRIBUTES_TIMESCALE converts the timephased attributes into the requested timescale and storage unit.
The parameters for this macro are:
- Temporary table name
- WHERE clause applied against the PES_TimephaseAttributes table so only those timephased attributes’ blobs are expanded
- Storage unit; the possible values are ‘FTE’, ‘Currency’, ‘Hours’, ‘Units’. (Note: only attributes that are coercible to this storage unit are returned.)
- Time scale; the possible values are ‘Calendar Year’, ‘Calendar Quarter’, ‘Calendar Month’, ‘Calendar Week’, ‘Calendar Day’, ‘Fiscal Year’ and ‘Fiscal Quarter’
- Start date; the entire bucket containing the start date will be included. For example, if 1/16/2006 is specified and Calendar Month is requested then the entire month of January is returned
- Finish date; similar to Start Date the entire bucket containing this date will be included
- Use date format; the possible values are true and false. If true then the column names for the buckets will be yXXXX_mXX_dXX. If false then the column names for the buckets will be PX
The following example shows a call to get all the attributes that can be shown in Currency in Calendar Month for the year 2005 for item id 49.
SELECT * FROM PES_MACRO_TIMEPHASE_ATTRIBUTES_TIMESCALE(tmp, obj_UID = 49, Currency,
Calendar Month, 1/1/2005, 12/31/2005, true)
Copyright © 2003–2010 Serena Software, Inc. All rights reserved.