1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Extra spaces between two queries

Discussion in 'SQL PL/SQL' started by Bharat, Jul 9, 2012.

  1. Bharat

    Bharat Community Moderator Forum Guru

    Messages:
    1,747
    Likes Received:
    147
    Trophy Points:
    1,805
    Location:
    Vijayawada, India
    Hi all,

    We have written two queries just like

    Code (Text):
    select empno,ename,job,sal,deptno from emp;
    select empno,ename,job,sal,deptno from emp where deptno=30;
    in between spool on and off. But in output we are getting one line gap between those two outputs. Can anyone suggest me to get out of that line. I want to remove that line. Please help me on this.
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    I don't see that behaviour:

    Code (SQL):
     
    SET pagesize 0 feedback off termout off
     
    spool spool_gap.lst
    SELECT empno,ename,job,sal,deptno FROM emp;
    SELECT empno,ename,job,sal,deptno FROM emp WHERE deptno=30;
    spool off
     
    And the output:

    Code (SQL):
     
          7369 SMITH      CLERK            800         20
          7499 ALLEN      SALESMAN        1600         30
          7521 WARD       SALESMAN        1250         30
          7566 JONES      MANAGER         2975         20
          7654 MARTIN     SALESMAN        1250         30
          7698 BLAKE      MANAGER         2850         30
          7782 CLARK      MANAGER         2450         10
          7788 SCOTT      ANALYST         3000         20
          7839 KING       PRESIDENT       5000         10
          7844 TURNER     SALESMAN        1500         30
          7876 ADAMS      CLERK           1100         20
          7900 JAMES      CLERK            950         30
          7902 FORD       ANALYST         3000         20
          7934 MILLER     CLERK           1300         10
          7499 ALLEN      SALESMAN        1600         30
          7521 WARD       SALESMAN        1250         30
          7654 MARTIN     SALESMAN        1250         30
          7698 BLAKE      MANAGER         2850         30
          7844 TURNER     SALESMAN        1500         30
          7900 JAMES      CLERK            950         30
     
     
  3. Bharat

    Bharat Community Moderator Forum Guru

    Messages:
    1,747
    Likes Received:
    147
    Trophy Points:
    1,805
    Location:
    Vijayawada, India
    Dear David,

    Sorry for late response. I have gone through your code and its not giving exact result what I need. Iam using Benthic software here. Is there any issues with it.
     
  4. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    That doesn't tell me much, really. WHICH Benthic software sre you using? Any third-party tool can have 'issues'' because of the design. Posting such questions without fully reporting the software you are using and examples of the results won't get you any usable response, as you've proven by my initial answer to your question.
     
  5. Bharat

    Bharat Community Moderator Forum Guru

    Messages:
    1,747
    Likes Received:
    147
    Trophy Points:
    1,805
    Location:
    Vijayawada, India
    Hi David,

    Sorry for not posting software details at initial post. Iam using Golden32 Benthic software. We are using licensed version of this one. You can see what it is from below link if you are not clear about that. I too can't explain exactly about that because Iam new to that tool.

    Benthic software link
     
  6. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Licensed or not it's likely the way the software processes multiple queries in a batch; there MAY be a setting you can change in the user interface to eliminate those extra lines. I cannot tell you what that setting would be as I don't use that software.
     
    Bharat likes this.