Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Output

Re: Output

From: David Fitzjarrell <oratune_at_aol.com>
Date: Mon, 20 Nov 2000 22:11:56 GMT
Message-ID: <8vc7j5$3sp$1@nnrp1.deja.com>

In our last gripping episode kryptogenic_at_my-deja.com wrote:
> I'm running a script which selects from a table that holds the logs
 for
> our website. When I select the information I need and spool it to a
> file, I need to then change the format using awk. The problem is that
> the url is so long that it creates a newline just for the url. When I
> parse the file with awk, it incorrectly grabs the url because of the
> newline. Is there anyway to set something so that the select will
> create on "line" for each record of data. I understand that the data
> will wrap to the next line or two but I do not want a newline until it
> grabs the next record. If you need more information let me know.
>
> Thanks.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

I believe what you are looking for is this:

set linesize xxxx

where xxxx is the total length of the output line. Since you are breaking on 80-character lines simply add up the number of lines you have per record and set your linesize to that number. For example if the query is returning the record in 3 pieces set your linesize to 3*80, or 240:

set linesize 240

Do this at the start (as the very first line) of your script. You should be able to adjust this value to obtain one line per record and have very little extra whitespace at the end of the line.

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Nov 20 2000 - 16:11:56 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US