Brendan Parochelli Posted May 26, 2022 Share Posted May 26, 2022 I have a simplified report using ORA SQL that provides an XLSX output. I would like to have the existing query below populate in Sheet 1 of the XLSX and add a second query that will populate in Sheet 2. So far all information on Compound Reports and BYTOC seems does not seem applicable or working as expected to reports written entirely in SQL. Report : ENGINE SQLORA SET DEFAULT_CONNECTION &Server.(BANREP,BANPPRV,BANDEVL).Choose_Server. SQL SQLORA PREPARE SQLOUT FOR SELECT * FROM TBRACCD WHERE 1=1 AND TBRACCD_TERM_CODE = '202110 'AND TBRACCD_PIDM = '701785'; END TABLE FILE SQLOUT LIST * ON TABLE PCHOLD FORMAT XLSX END Second Query To be Added : SELECT * FROM TBRACCD WHERE 1=1 AND TBRACCD_TERM_CODE = '202113 'AND TBRACCD_PIDM = '701785'; Link to comment Share on other sites More sharing options...
David Beagan Posted May 27, 2022 Share Posted May 27, 2022 You can use the legacy compound feature. Link to Documentation Here is an example: SET COMPOUND=OPEN TABLE FILE ggsales SUM UNITS BY REGION ON TABLE PCHOLD FORMAT XLSX END SET COMPOUND=CLOSE TABLE FILE ggsales SUM DOLLARS BY REGION ON TABLE PCHOLD FORMAT XLSX END Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now