Ok, Here's my issue.
I'm redoing a set of queries to produce reports from a manual process to an automated process. The requirement was that I use SQL*PLUS to produce to reports. I can get the queries to produce the reports using SPOOL with several SET options. I get close to matching the exact output that the manual process produced but I still get huge whitespace in the records. I know this is from SQL*PLUS liking to make everything pretty but it's really annoying.
I've tried to concat the fields together like I've seen elsewhere but as soon as I get it to concat right, I get an GROUP BY error because I know have them all concat'd and not selecting them individually.
So, I guess I have 2 questions.
ONE: Since I know the order I want the column to display in, do I still need to group by section.
TWO: is there another way to get rid of the extra spaces other then concat'ing all the fields. I tried using the following: TRIM, TRIM BOTH, LTRIM(RTRIM()) but none of them get rid of the extra spaces.
Here are the set commands I'm using:
SET TERMOUT OFF
SET TRIMSPOOL ON
SET TRIMOUT ON
SET LINESIZE 1024
SET FEEDBACK OFF
SET COLSEP |
SET PAGESIZE 0
SET TAB OFF
This gets me close but I still get the extra spaces.
Any help would be appreciated as I've burnt any hours on this already.
I'm redoing a set of queries to produce reports from a manual process to an automated process. The requirement was that I use SQL*PLUS to produce to reports. I can get the queries to produce the reports using SPOOL with several SET options. I get close to matching the exact output that the manual process produced but I still get huge whitespace in the records. I know this is from SQL*PLUS liking to make everything pretty but it's really annoying.
I've tried to concat the fields together like I've seen elsewhere but as soon as I get it to concat right, I get an GROUP BY error because I know have them all concat'd and not selecting them individually.
So, I guess I have 2 questions.
ONE: Since I know the order I want the column to display in, do I still need to group by section.
TWO: is there another way to get rid of the extra spaces other then concat'ing all the fields. I tried using the following: TRIM, TRIM BOTH, LTRIM(RTRIM()) but none of them get rid of the extra spaces.
Here are the set commands I'm using:
SET TERMOUT OFF
SET TRIMSPOOL ON
SET TRIMOUT ON
SET LINESIZE 1024
SET FEEDBACK OFF
SET COLSEP |
SET PAGESIZE 0
SET TAB OFF
This gets me close but I still get the extra spaces.
Any help would be appreciated as I've burnt any hours on this already.