PES_MACRO_DATES returns a set of dates as columns in the results set for the specified time scale and date range. This is useful when getting dates for column headers of reports.

The parameters for this macro are:
The following example shows this macro querying for dates between January and April by calendar month:
SELECT * FROM PES_MACRO_DATES(tmp, Calendar Month, 1/1/2006, 4/30/2006)