Skip to content

Instantly share code, notes, and snippets.

@neurotech
Created August 18, 2015 11:33
Show Gist options
  • Save neurotech/854cb0b92d8a872acc29 to your computer and use it in GitHub Desktop.
Save neurotech/854cb0b92d8a872acc29 to your computer and use it in GitHub Desktop.
WITH report_vars AS (
SELECT
('[[From date=date]]') AS "REPORT_START",
('[[To date=date]]') AS "REPORT_END",
('[[Report Period=query_list(SELECT report_period FROM report_period WHERE completed != 1 ORDER BY start_date)]]') AS "REPORT_PERIOD"
FROM SYSIBM.sysdummy1
)
SELECT * FROM report_vars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment