
48 • Developing Essbase Applications: Advanced Techniques for Finance and IT Professionals
-- Modified: 11 November 2011, initial write
-- Written by: Cameron Lackpour
-- Notes: This sample code is for the Years dimension only.
SELECT
A.Parent,
A.Member,
A.Alias
FROM
(
-- Header record
-- PARENT0, CHILD0, and ALIAS0 are hardcoded
-- The concatenated dimension name completes the header
SELECT
'900' AS 'Order',
'PARENT0,' + P.DimName AS 'Parent',
'CHILD0,' + P.DimName AS 'Member',
'ALIAS0,' + P.DimName AS 'Alias'
FROM SuspendParent P
WHERE P.DimName = 'Years'
-- Join header and body
UNION
-- Parent record
-- The dimension ...