Insert a blank line between records

Hi,
I am creating a sqlplus report and want to insert a blank line or some seperator to seperate the records between the start and end points of the loop to make it more readable.
ex : The output currently look like this.
ColumnA       ColumnB
1                  2
2                  3
3                  1
4                  5
5                  6
6                  4I want the output to look like this
ColumnA       ColumnB
1                  2
2                  3
3                  1
4                  5
5                  6
6                  4Thanks for the help in advance!

Hi,
You probably work with this table every day, and you probably struggled with this particular query for a while before posting a question, so you're very familiar with the table, the data, and the application.
Perhaps no one else in the world is in that position. Don't assume we know what your data is, or where it came from.
Are you getting the data from a query like this?
SELECT     columna
,     columnb
FROM     table_x
START WITH          columna     IN (1, 4)
CONNECT BY NOCYCLE     columna     = PRIOR (columnb)
;If so, that's the kind of thing you should say clearly in your first message, rather than hint at in your third.
As Ow said, you should manufacture a column for use in the BREAK command, and use COLUMN ... NOPRINT if you don't want to see it in the results?
The question here is, what is an appropriate column? CONNECT_BY_ROOT seems to work perfectly for your example
BREAK     ON my_break_column     SKIP 1
COLUMN     my_break_column     NOPRINT
SELECT     columna
,     columnb
,     CONNECT_BY_ROOT     columna     AS my_break_column
FROM     table_x
START WITH          columna     IN (1, 4)
CONNECT BY NOCYCLE     columna     = PRIOR (columnb)
;The rest of this message is an merely a tangent. I find it interesting, but feel free to skip it.
You might think CONNECT_BY_ISCYCLE was an obvious choice for a BREAK oclumn: you want to skip a line after every output row where CONNECT_BY_ISCYCLE = 1.
Unfortunately, BREAK always works when a column value changes. That is, you can't tell it "Please skip one line after rows where columnz = 1"; all you can say is "Please skip a row before rows where columnz is different than it was on the previous row". (At least that's what I think: I would love it if someone proved me wrong!)
So we have to manufacture some column that keeps its value for an entire loop. The SUM of CONNECT_BY_ISCYCLE (in DESCending order, as returned by the CONNECT BY query) would work. Analytic ORDER BY clauses seem to destroy the order imposed by CONNECT BY, so you'd have to do the CONNECT BY in a sub-query, capture the ROWNUM to preserve the order, and use the analytic SUM function in the main query:
WITH     oq     AS
     SELECT     columna
     ,     columnb
     ,     ROWNUM               AS r_num
     ,     CONNECT_BY_ISCYCLE     AS cycle_val
     FROM     table_x
     START WITH          columna     IN (1, 4)
     CONNECT BY NOCYCLE     columna     = PRIOR (columnb)
SELECT     columna
,     columnb
,     root
,     SUM (cycle_val) OVER (ORDER BY ROWNUM DESC)
--               AS my_break_column
FROM     oq
ORDER BY     r_num
;The only reason for actually doing this is to learn about CONNECT BY queries. CONNECT_BY_ROOT, as shown above, works much better for your requirements.

Similar Messages

  • Export Excel Data only causes blank line between 2 lines of records

    Hi,
    I wrote a complete winform application using CR2008.
    For information :
    C# Framework 3.5
    Windows XP SP2 or Windows Server 2003 SP1
    CR2008 SP1
    Application allow to preview report. In the preview window (CR activx) there is a "letter icon" to export report in several format.
    -RPT
    -PDF
    -DOC
    -XSL
    -XSL Data only
    When I export with "Excel Data only" format, I always have a blank line between 2 lines of records in Excel.
    Is there a way to supress them from VS2008 ?
    Thanks a lot for your reply,

    Hello, Jonik;
    Do you see the same blank lines when you export to Excel Data only in the Crystal Reports designer?
    Elaine

  • Insert a blank line in a form

    Is there any way to insert a blank line into a form? The only thing I can think of is to insert an empty display as text item with no label.
    Is there an easier way?

    Hello,
    Playing with the cell height, in the HTML Table Cell Attributes – like style="height:50px" – and with the Horizontal / Vertical Alignment of the label and element, can produce whatever space you need between your form elements.
    Regards,
    Arie.
    Message was edited by:
    ageller1

  • Need a Blank line between Text field data

    hello friends, Happy New Year..
    i have a varchar2(200) size field and i am Entreing data into it like this;
    Chairman  Name1
    Member    Name2
    Member    Name3
    Member    Name4
    Member    Name5
    Member    Name6
    Secretary Name7what to do is, insert an a blank line between all lines of this text field. The output to like this ;
    Chairman  Name1
    Member    Name2
    Member    Name3
    Member    Name4
    Member    Name5
    Member    Name6
    Secretary Name7The names are separated by pressing Enterkey (i dont know its equivalent chr(10) or chr(13).
    TYVM.

    You can also try the below :
    Assumption here is that you will always have data in that column in 7 lines.
    rec.rowno in (2,4,6,8,10,12,14) is included to create empty row in between each row.
    create table test(a varchar2(200));
    insert into test values('Chairman  Name1
    Member    Name2
    Member    Name3
    Member    Name4
    Member    Name5
    Member    Name6
    Secretary Name7');
    commit;
    select
           case
             when rec.rowno = 1 then
                   substr(a,1,instr(a,chr(10),1,1) - 1)
             when rec.rowno in (2,4,6,8,10,12,14) then
                  null
             when rec.rowno = 3 then
                   substr(a,(instr(a,chr(10),1,1)+1),instr(a,chr(10),1,2))  
             when rec.rowno = 5 then
                   substr(a,(instr(a,chr(10),1,2)+1),instr(a,chr(10),1,3))                          
             when rec.rowno = 7 then
                   substr(a,(instr(a,chr(10),1,3)+1),instr(a,chr(10),1,4))              
             when rec.rowno = 9 then
                   substr(a,(instr(a,chr(10),1,4)+1),instr(a,chr(10),1,5))
             when rec.rowno = 11 then
                   substr(a,(instr(a,chr(10),1,5)+1),instr(a,chr(10),1,6))
             when rec.rowno = 13 then
                   substr(a,(instr(a,chr(10),1,6)+1))                                            
           end name1,
           null signature,
           null "DATE"
      from test, (select rownum rowno from dual connect by level <= 14) rec;Edited by: neel_s on Dec 31, 2009 1:07 PM

  • No blank line between address node in smartform

    hi all ,
    customer want to delete the blank line between address , is there a way to solve this ? i just want to use the address node.
    regards
    Kevin

    For the paragraph format used with the ADDRESS command, indicate that you don't want blank lines.
    Eg.    /: ADDRESS PARAGRAPH ZD
    So for this Paragraph Format 'ZD'  check the checkbox 'No Blank Lines'.

  • TB 31.4 when compsing a message, has introduced a spurious blank line between the address boxes and subject box.

    When writing a new message I used to see two lines of address boxes followed by the subject line. So, when sending an email to a single recipient, that persons address would remain on screen as I composed the email.
    As of version 31.4 the initial "Write" window shows a single address line, the subject line, and a blank line between them. The consequence is that, upon entering the recipient's address, it immediately scrolls up and can no longer be seen. This happens regardless of how I enter the address i.e. start to type, select from address book and hit ENTER or TAB, or indeed if I choose an address from the address book sidebar. (See "capture1.png")
    If I increase the space available for the header data in the "Write" window I still get a blank line between the address lines and the subject line (see "capture2.png"). Furthermore, the next time I go to compose an email I am back with the original version of the "Write" window, as shown in "capture1.png".

    You might want to drop the author an email and let him know. It is not a major thing, but something that would probably require only a minor fix.
    I have found him helpful, but slow to reply. He is always on holidays when I email him.

  • Insert a blank line at the start of a text file

    I'd like to insert a blank line at the start of a text file.
    I presume SED would be the best to use? Any help on code would be greatly appreciated?

    Hi David,
       That is a little more difficult in sed and awk than it seems like it should be. I'll assume that you know how to handle the redirection and I'll just post the actual sed and awk commands. If you're comfortable with multiline statements in sed it could be done with the following:
    sed '1s/./\
    Programmatically more complicated but easier to type would be:
    sed '1{x;p;g;}'
       I think that it's conceptually simpler in awk using the BEGIN address like so:
    awk 'BEGIN{ print }//'
       You'll probably get other responses using other tools. I'm certainly curious to see what develops.
    Gary
    ~~~~
       "And I don't like doing silly things (except on purpose)."
          -- Larry Wall in <[email protected]>

  • On an iPad, how do I insert a blank page between two using iWork Pages?

    I realize how many times I used the word 'pages' in the question, I was unable to think of a less confusing way to word it. :)
    I am using an iPad with Pages loaded on it. All software is up-to-date. I have downloaded a few templates apps to use with it. I have figured out how to add a blank page to the end of the document (by hitting enter at the base of the previous page before it). However, I would like advice or assistance adding a blank page between two existing pages. The other "trick/work around" is not effective. I'd even appreciate learning how to change the order of the pages so I may place the blank sheet where I need it.
    Hope this makes sense. Any advice would be appreciated. Thanks in advance,

    Position the cursor where desired by touching the screen. In the selection bubble that appears,  i.e., Select, Select All, Paste, Insert, choose Insert and from the insert menu choose Page Break. Two Page breaks will produce a blank page.

  • How can I insert a vertical line  between two underlined unfilled with text lines.  I am trying to construct an invoice and I need a break.  If I try any of the shapes or inset functions it eliminates my underlined lines and shifts the whole document.

    I am trying to construct an invoice.  How can I install a vertical line between two or more underlined lines to create a break.  I have tried the insert, shapes and nothing works.  If I try any of the functions the whole document shifts to the right and I loose some of the lines.  Is there a work around, or is I work not able to do what I want?   
    Thanks
    Armand

    It sounds as though you may have "Object Causes Wrap" activated for the Line Shape. This will push other content away.
    See the Wrap Inspector.
    Jerry

  • Reporting Toolkit: How to insert a blank line into an MS Word Report?

    Hello,
    I have created an MS Word report, but I haven't been able to find out how to "write" a blank line to the report.  I've tried every combination of \n, \\n, "\n", '\n', \\n etc., but I haven't had any good luck.
    Thanks,
    Chris

    Hello,
    If you're using "append report".vi it's has one input for "new line".
    Message Edited by Jorge Amaral on 05-02-2008 03:28 PM
    Software developer
    www.mcm-electronics.com
    PS: Don't forget to rate a good anwser ; )
    Currently using Labview 2011
    PORTUGAL
    Attachments:
    append.PNG ‏3 KB

  • Blank line Between Page

    Hi All
    I want to generate text file by report.
    but my output have one blank record at between page but I don't want it.
    I want to list data in tabular style like using
    sql script select statement but I have to use a report.
    Please Tell me.
    null

    doble click on report_name
    and in property section
    go report_escape then in after page value
    clear this
    <hr size=5 noshade>
    siddharth singh
    null

  • Is it possible to INSERT a blank page Between existing pages?  Everytime I try it inserts the page at the END of the document.

    Everytime I try it inserts the page at the END of the document.  The HELP is no help, and I can't find any other documentation on being able to do this.  Appreciate the feedback.  Thanks!  - ph

    AP,
    As Fruhulda notes, a Section Break is an Inline character that will move all text below it to the next page. With a combination of graphics and text, and with the graphics having the property of Object Causes Wrap turned on, you will get these apparently odd behaviors. This is why I often favor the Page Layout mode myself. As many experienced users will say, you can do anything in a WP doc that you can do in a PL doc, but in my opinion the WP features often get in the way of simple operation when graphics are involved.
    Glad you are on track now.
    Jerry

  • How can i Insert a blank line an output file from my code

    I hav a problem in printing the charecters at th partyicular positon by getting the getFilePointer SO p-lz do help

    It's not so simple as you might have in mind.
    The following may serve to give some idea for your purpose..
    import java.io.*;
    public class RandAcc {
    public static void main(String[] args) throws Exception{
    try{
    long filePointer=0L;
    java.io.RandomAccessFile rf = new java.io.RandomAccessFile("in.txt","rw");//arbitrary input text file
    System.out.println(String.valueOf(rf.getFilePointer()));
    int q=0;
    while((q=rf.read())!=-1){
        filePointer=rf.getFilePointer();
        System.out.print(String.valueOf(q)); 
        System.out.print(": file pointer is at ");     
        System.out.println(String.valueOf(filePointer));
    rf.seek(0L);//reset the filepointer
    System.out.println(String.valueOf((char)rf.read()));//initial position
    rf.close();    
    catch (Exception e){
        throw e;
    }

  • Blank lines between [ pre ] tags are now being removed

    Using [ pre ]
    SQL> select 'where has the space gone' from dual;
    'WHEREHASTHESPACEGONE'
    where has the space gone
    Elapsed: 00:00:00.60Using [ code ]
    SQL> select 'where has the space gone' from dual;
    'WHEREHASTHESPACEGONE'
    where has the space gone
    Elapsed: 00:00:00.60Unfortunetley [ code ] does not recognize internal [ b ] tags for bold
    Can this be fixed?
    Message was edited by:
    3360
    Sorry, forget it. I had to use IE instead of Firefox a couple of weeks back and it is just the browser, I checked and the posts look fine in Firefox.
    Message was edited by:
    3360
    Message was edited by:
    3360

    2 years later, is it possible to get a fix regarding this inconvenient for the IE users ?
    Or does Firefox usage became mandatory to read properly the code ?
    Nicolas.

  • Small square boxes appearing on blank lines (UPDATED) - The question is, how to get rid of them?

    *******  As to my display name "All I tried were in use" - when I registered at the Adobe site to use the Browser Lab, I tried something like 10 or 12 user names and finally gave up and went with "All I tried were in use" - my name is Bob
    ------------------------------- UPDATE --------------------
    The problem, small square boxes showing on lines in Freetext Tool comments, is not limited to blank lines, as I originally reported here. These boxes are showing up at the end of every line. It does not matter if the line break is hard or soft, whether the line is empty or not.
    Please read the original post bearing mind that the  problem is occurring at the end of all lines.
    Also - here is a screen capture of a part of one comment box, showing the square lines. I didn't show the entire box because the material above the area I'm showing is a tad private or confidential. Here is the image showing the boxes - note that there is no box at the end of the last line in the comment.
    -------- Original Post ------------
    We have a copy of Acrobat 5.0. and up until now it has done what we need, which is not much more than adding bookmarks, links, and some touch up. I know it is very old and I know things change. I'm hoping this has nothing to do with the release we are using. I would think this would be a backward compatibility issue if it is a problem with newer Reader versions dealing with PDFs "edited" with 5.0.
    I am having small square boxes showing up on blank lines. (read my update above  - the boxes are at the end of all lines, soft break or hard break))
    I'm a programmer (37+ years in most all aspects of Data Processing) and I decided to learn the PHP programming "language" to add some server side processing to some of my web sites. So, I found a fairly good manual on PHP in PDF form and have been using it.
    I quickly found that the PDF didn't have a single link in it and no bookmarks, so I've been adding them as I look up a particular subject. I'm also adding comments and notes to document things not in the original manual or to add comments that would help other programmers` (who know  other languages) to adjust to PHPs' way of thinking - for example: in all the other languages I know (perhaps two dozen) to get rid of a file, you "delete" it. In PHP you "unlink" it.
    I've added a lot of comments and notes like that and when I view the PDF in Reader (on this computer I have 9.4.2) I'm seeing small square boxes on empty lines. The lines were created when I pressed Enter twice to insert a blank line between paragraphs. (again, read the update at the top of this message - the boxes are at the end of all lines, soft break or hard break)
    How can I get rid of them?
    They are not present when I've got the PDF open with Acrobat, only when I'm using an Acrobat Reader.
    They are also not present if I look at the comments using the Comments navigation panel - that is, they still show on the page, but they don't show in the copy of the comment displayed in the navigation panel.
    They are not present in Notes or when I use one of the shape tools (Square Tool, Circle Tool, or Line Tool) to create notes. They are only present in Freetext Tool comments
    They are clearly being show where there are successive line feed/carriage return characters - but how do I get rid of them?
    I JUST THOUGHT OF SOMETHING - I realized that I'd not printed any of the pages on which I have placed comments and wondered if the boxes show when printing the PDF with Reader -- they do. They are not present if I use Acrobat, not a Reader, to print the same page.
    Any assistance you can provide will be greatly appreciated.
    Please don't tell me to get a newer version - an expenditure like that is simply and totally out of the picture. For us, this is a Depression, not a Recession - we are self-employed and our businesses have been severely hammered since 2006 - we are down to about 1/4 of our income before the big guys trashed the economy.
    Bob
    P.S. Do you know that you can have a heart attack without chest pain, shortness of breath, or left arm  pain? Well, you can! I've had two and the first one nearly killed me because I had no clue it was a heart attack. You can read about it first one here.  Pass this on, it could save a life.
    My second heart attack occurred on October 4, 20112 - it began, around 3:15 AM, as the first one did, with a headache. It turned out the stent implanted in 2002 had been completely clogged by too much tissue grown. The doctor put another stent inside the first one.

    Problem Resolved - it is a font issue. Apparently Acrobat can't handle particular fonts and it is best to stick with a very small slection of fonts - Arial, Helvetica, Times Roman.
    I haven't test a lot of fonts. If I do, I'll post there results here.
    Bob

Maybe you are looking for

  • .vi's unable to run because of real-time Startup error

    See that attached files for the error. Whenever I try and deploy the code onto the robot the attached error comes up. Is there any fix for this or is this a new error? I have also tried a completely new C-Rio project so that it is the basic settings

  • Help! ORA-03113 while compiling certain packages!

    Hello everyone Recently we migrated our PLSQL code from Oracle 8.1.7.0 to 9.2.0.4. While compiling our packages in 9i, we are getting the ORA-03113: end-of-file on communication channel error. This happens only when we compile two particular packages

  • Connection Pooling in Weblogic Server6.1

    Hi All.., I want to implement Connection pooling in my EJB application.When i use a oci driver i am getting the following error.Can anyone plz help me out?. Thanks & Regards., B.Naveen Kumar Starting Loading jDriver/Oracle ..... <Jul 2, 1999 12:57:04

  • Using right mouse button as secondary button

    I have just received a replacement Apple wired mighty mouse because I couldn't get the right mouse button to work as a Secondary button. However, I have exactly the same problem with the new mouse! I am using the latest update to OS X 10.4.8, with th

  • Query regarding Asset quantity.

    Dear Experts, I have query regarding Asset quantity. While creating Goods receipt (MIGO) users give the Material (Asset) quantity but when I check in Asset master or in any sap asset reports system not show the quantity in Asset master or any Asset r