Since it seems to be related to your tax law, I would be extremely careful when writing the code.
Can you please explain a bit better what you data looks like and what the expected result is?
I just love the old join syntax and the optional parameter
CD.FISCAL_YEAR = FCI.FISCAL_YEAR (+)
Just be aware the Laravel doesn't support the oracle SQL to 100%. so I suggest working with database views instead of writing the queries in the query builder.
Tray2, I have a table queryTable, and my DB Admin have written a sql statement in queryTable->querysql which should run a query and export the query into either MS Excel Spreadsheet format or PDF format. So I initially need to grab all of the columns that are in queryTable->querysql so I can display them when exporting into either Excel format or PDF format. Trying to export to Excel without using any plugins.
In regards to the data, depending on the query, it varies. But need to output into Excel or PDF. Thanks.