I want to format query results in oracle and save them into an output file.
I tried this query:
spool "result.txt"
SELECT STA_CODE,DATE_CREATION,DATE_FIN_INSTANCE,DATE_FIN_TRAITEMENT FROM DEMANDE;
spool off;
In my output file, the result looks like:
STA_CODE DATE_CRE DATE_FIN DATE_FIN
------------------------- -------- -------- --------
200 09/05/17 09/05/17 09/05/17
400 09/05/17 09/05/17 09/05/18
I want then to write a java code that takes for each line the result and match it with name of column: for example STA_CODE=200, STA_CODE=400, DATE_CRE=09/05/17, DATE_CRE=09/05/18 .... I'm biginner in JAVA and I can't write that Bit of code. Is possible to directly format query results and then parse the output file without doing any transformation with java.