LookupPeriodName
Summary
The LookupPeriodName function returns the xactly.xc_period.name for the specified date and period type name string. Use the function as an alternative to joining to the xactly.xc_period and xactly.xc_period_type tables in xSQLSELECT statements.
Syntax
LookupPeriodName(<date>, <string>) |
Return Type
String.
Return value will be null if an invalid period type name or date was given.
Details
The period type name string should match a valid value in the xactly.xc_period_type.name table. The default values are ‘MONTHLY’, ‘QUARTERLY’, and ‘YEARLY’ and are case insensitive.
Examples
eval LookupPeriodName(‘2016-04-01’, ‘MONTHLY’);

eval LookupPeriodName(‘2016-04-01’, ‘quarterly’);

set v_period_name = LookupPeriodName(‘2015-06-03′,’MONTHLY’);

select incentive_date,
‘order_batch-‘ || LookupPeriodName(incentive_date, ‘monthly’) as batch_name
from staging.order_item limit 10;

Related Functions
LookupPeriodIdByBatchName
