Making SQLPLUS Output Usable

Hi -
I’ve been dealing with a legacy Oracle DB and having issues getting connected directly into EM (other thread). However, I realized that I could write a .bat file to run sqlplus and output the file to a log/file. My issue now is that to parse that output may be even more problematic.

As an example:
@echo select * from GL.GL_CODE_COMBINATIONS; | sqlplus username/password@DB > C:\Users\arbeltz\output_fulldataset.txt

this would return ~1.5M Rows but SQL Plus does some interesting formatting that I can’t seem to get EasyMorph to read

As an example, just a rowcount looks like this on the output

But the data set would look more like this:

Hi Adam,

Can you attach a file with sample output? I will try to wrangle it in EasyMorph.

Can you try like

(@echo SET LINESIZE 32000; &@echo SET PAGESIZE 32000; & @echo select * from GL.GL_CODE_COMBINATIONS; ) | sqlplus username/password@DB > C:\Users\arbeltz\output_fulldataset.txt

and see how output looks like?

Thanks for the response. On my end I get an error when we add the brackets, if you take them away then the results are the same

Hi @dgudkov -
I’ve attached a sample file with just name names and owners

SELECT owner, table_name FROM dba_tables;

04_Output_TableNames.txt (574.6 KB)

Hi @dgudkov - have you had an opportunity to see how this could be parsed in EM?

Not yet, this week I’m half-time off. I will have a chance to look at it next week.