Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Output
Might also need something like:
column url_column_name format a120
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk Practical Oracle 8i: Building Efficient Databases Publishers: Addison Wesley Longman Book bound date: 8th Dec 2000 See a first review at: http://www.ixora.com.au/resources/index.htm#practical_8i Order from Amazon via: http://www.jlcomp.demon.co.uk David Fitzjarrell wrote in message <8vc7j5$3sp$1_at_nnrp1.deja.com>...Received on Mon Nov 20 2000 - 17:27:23 CST
>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.