Thanks!
No need to apologize for helping me... I ran your statment in RSS after removing operators (like IFNUL on dates) and it gets the column names. Very cool. It also shows two rows for the join names, and a row for each of the join fields (two fields joined = 4 rows).
I could probably make that work. However, I had to move forward with this project (for now) and I'm just using my IFS tools to write it from RPG.
I spent some time looking at the DATA-GEN info on IBM's site. I was reading the example generator program. I don't quite understand it, but it seems like column headers are possible within the datagen program. I would need to modify the CSVGEN code to insert the column headings:
https://www.ibm.com/docs/en/i/7.5?topic=code-example-data-gen-generator
Specifically, in the "genStartTable" example procedure.
Very interesting.
Thanks again!
Greg
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Bryan Dietz
Sent: Wednesday, February 28, 2024 3:51 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: CSVGEN?
sorry for not letting this go, but I'm curious if you could still "automatically" get the column names is you ran this:
select * from table (
qsys2.parse_statement('put your SQL in this space you''l have to add a quote to any single quotes in the SQL like field = ''ABC'' '));
https://www.ibm.com/docs/en/i/7.4?topic=services-parse-statement-table-function
I just ran across and tried on a couple of SQLs that I have that have joins.
Bryan
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.