Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2007
    Posts
    9

    Unanswered: reg column output ins sqlplus

    Hi,

    I have an output after running a query.. which has 16 columns of different length in TOAD.. but if i run the same in sqlplus i am getting only 2 columns.. rest is vanished.. can u help me

    given the details as

    linesize 4000
    pagesize 100

    i can see only 2 columns instead of 16 columns..

    how do i go about this

    thanks

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    I can't see ANY columns or any query so I can't begin to guess what is wrong.

    PLEASE learn to use CUT & PASTE so we can see what you see.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Apr 2007
    Posts
    9
    thanks for the time..

    for eg..

    if my output shd be

    col1,col2,col3,col4,col5,col6,col7,col8,col9......

    i am getting the output in sqlplus as

    col1,col2 ..( only 2 colums i get,, whereas it shd be 16)

    hope u got what i am trying to convey..


    to be more precise, this is the output

    A B C D E F G H I K
    100 -1 19090 abc 20000 xxx 878 dfkdjfkd fdkfkd fkd

    it is a simple query, selecting similar rows from 2 tables using union

    select
    col1,
    col2,
    col3,
    col4
    from table1,table2,table3
    where table1.col1=table2.col1
    .
    .
    .
    union
    select
    col1,
    col2,
    col3,
    col4
    from table1,table2,table3
    where table1.col1=table2.col1
    Last edited by r.vasikaran; 04-04-07 at 12:38.

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    It seems that you can not see the rest of the columns as they are out of the visible part of the screen. Try to spool query output into a file and view it using any of available text editors.

    In a few words:
    Code:
    SPOOL my_output.txt
    
    SELECT col1, col2, ... FROM ...;
    
    SPOOL OFF;

  5. #5
    Join Date
    Apr 2007
    Posts
    9

    yes it is working

    after setting the column length , i am able to view and spool as well..

    now the problem i am getting is the space between two lines.. .. is there any way i can reduce the space between two lines..

    now the output is

    A B C D


    A B C D

    whereas i need as

    A B C D
    A B C D

    While viewing in sqlplus i am getting like this.. but while spooling .. i am getting lot of spaces between the lines..

    Anyways thanks so much for the inputs.

  6. #6
    Join Date
    Apr 2007
    Posts
    9

    csv format

    Hi,

    is there anyway i can spool the output in csv format..

    if so.. what is the command..

    thanks in advance
    Last edited by r.vasikaran; 04-05-07 at 06:50. Reason: need to get some input on CSV format spooling

  7. #7
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Yes, there is. Change column separator:
    Code:
    SQL> set colsep ,
    SQL> select * from dept;
    
        DEPTNO,DNAME         ,LOC
    ----------,--------------,-------------
            10,ACCOUNTING    ,NEW YORK
            20,RESEARCH      ,DALLAS
            30,SALES         ,CHICAGO
            40,OPERATIONS    ,BOSTON
    
    SQL>

Posting Permissions

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