Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    11

    Unanswered: help with SQLPLUS

    Hello everyone,
    I am having a little trouble with the SQLPLUS formatting. I am trying to spool a file with the contents of a table but I keep on getting the field names repeatedly(depending on "pagesize")
    Something like this:

    CO COUNTRY_NAME REGION_ID
    -- ---------------------------------------- ----------
    :
    :
    :
    CO COUNTRY_NAME REGION_ID
    -- ---------------------------------------- ----------
    :
    :
    :

    However, I just need to have the fieldnames only once at the top ( cos I need to load it in Matlab) :
    CO COUNTRY_NAME REGION_ID
    -- ---------------------------------------- ----------
    :
    :
    :
    :
    :

    It works by setting "pagesize" to a high value. But I just want to avoid the risk of the fieldnames getting repeated (in case of a very large table).
    Is there a way to dynamically get the output required?

    Thanks,

  2. #2
    Join Date
    Jan 2004
    Location
    India
    Posts
    191
    Hi,
    Try with this.

    set heading off;
    spool c:\...;
    -----
    ---
    ----
    ---
    spool off;
    set heading on;


    Thanks
    Pagnint
    (No need to search web before posting new question)

  3. #3
    Join Date
    Mar 2004
    Posts
    11
    Hi,
    But I do need the heading once at the top.
    set heading off; turns off all the occurences of the heading.





    Originally posted by paginit
    Hi,
    Try with this.

    set heading off;
    spool c:\...;
    -----
    ---
    ----
    ---
    spool off;
    set heading on;


    Thanks

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Heading appears at the top of every page. Therefore, increase the page size, for example

    SQL> set pagesize 100

    (I think the default is 24.)

  5. #5
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    89

    Re: help with SQLPLUS

    Originally posted by viranihardik
    Hello everyone,
    I am having a little trouble with the SQLPLUS formatting. I am trying to spool a file with the contents of a table but I keep on getting the field names repeatedly(depending on "pagesize")
    Something like this:

    CO COUNTRY_NAME REGION_ID
    -- ---------------------------------------- ----------
    :
    :
    :
    CO COUNTRY_NAME REGION_ID
    -- ---------------------------------------- ----------
    :
    :
    :

    However, I just need to have the fieldnames only once at the top ( cos I need to load it in Matlab) :
    CO COUNTRY_NAME REGION_ID
    -- ---------------------------------------- ----------
    :
    :
    :
    :
    :

    It works by setting "pagesize" to a high value. But I just want to avoid the risk of the fieldnames getting repeated (in case of a very large table).
    Is there a way to dynamically get the output required?

    Thanks,
    set header off
    set verify off
    set pagesize 1000

    now try
    Thanks and Regards,

    Praveen Pulikunnu

Posting Permissions

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