Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    13

    Question Unanswered: LINESIZE makes my files too large

    I am running Oracle 8.1 and using SQL*Plus. Do you know if there is a way to stop returned data from breaking to the next line? I need one continuous row of data for each record I retrieve. If I use the LINESIZE function, I have to make it large enough so that when I open the spooled file, I do not see a few line breaks for each row of data. Of course, in instances where the file's to large to open, I run multiple queries with a data range (in hopes to make the files small enough to open). I have been searching online for some sort of information. However, I'm wasting time. Is their an easier way to stop the breaking and keep the spooled file size down?

    When I spool this data, I have files as small as 1.26MB and as large as 146 MB. I've noted an increase with the increase of the linesize. My primary goal is to put this into an Excel spreadsheet.

    For some of these queries, I will get near 20,000 rows returned (I need them all) and for each row I may have about 300 characters or so.

    What else can I do?
    Last edited by sfoster; 07-27-04 at 11:17. Reason: needs better title.

  2. #2
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Here's an example of something you can do ... If you are trying to write a spool file for an spreadsheet ... (This produces a tab delimited file) ..
    Change the linesize to 300 or so ...

    set linesize 120
    set header off
    set pagesize 0
    set feedback off
    set trimspool on

    spool c:\test.txt

    select username||chr(9)||sid||chr(9)||serial#||chr(9)||pr ogram from v$session;

    spool off

    HTH
    Gregg

  3. #3
    Join Date
    Jul 2004
    Posts
    13

    Thanks... disregard this reply.

    Disregard the reply below. I stumbled onto something else - HEA. That's the command.



    Oracle doesn't recognize header. I tried repheader and it won't recognize it. However, I can do help repheader and it comes up. I tried reph and it won't recognize that either. What else is there?
    Last edited by sfoster; 07-27-04 at 11:49. Reason: found answer to second question.

  4. #4
    Join Date
    May 2004
    Location
    BA [ARG]
    Posts
    137
    Well, that's a common error.

    In Oracle, the correct sentence is:
    set head off

    Saludos....

  5. #5
    Join Date
    Jul 2004
    Posts
    13
    Thanks for your help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •