Blank line between lines of query output

Is it possible to add a blank line between two rows of the query output?

Sanjay

user12957777 wrote:
Is it possible to add a blank line between two rows of the query output?

Sanjay, it's a problem of client - customer is responsible for rendering data. If whites are needed, then the customer must make as a result.

Under the projection of the cursor SQL is not a good idea.

Tags: Database

Similar Questions

  • Insert a blank line in the query output

    Is it possible to insert a blank line between two rows of the query output?

    In the EMP table, the column LINES is as follows:

    LINES
    1
    2
    3
    4
    1
    2
    3
    1
    2
    3
    4
    5

    I want to insert a blank line after every 1

    Please suggest.

    Sanjay

    I'm quite puzzled why you need rows in the dataset returned by a select statement that is empty.
    If you are using Oracle reports to the release date, you define the presentation of the report to have spaces between the rows returned by the select and have do not need to have the select statement returns a blank line after each line of data. If the output should be obtained by using another client, I think that the customer will have facilities for output formatting.

    Admit that you really need "blank lines" between data lines, I see only one way: use a temporary table and do an insert into select temporary_table (...) ... from... where... Then, in this temporary table, you can insert 'empty rows', which is actually not really empty, because they must have some fields that give the order of the rows. And then select in temporary_table, you place your order by the columns that are used to give the order for the release.
    Thus

    insert into temporary_table (
    ....
    )
    select ...
    from ...
    where ...
    ;
    for r in (
    select col1, col2, col3  -- columns used for order by
    from temporary_table
    order by col1, col2, col3
    )
    loop
      insert into temporary_table (col1, col2,col3, col4)
      values (r.col1,r.col2,r.col3, null);
    end loop;
    -- this way, a select * from temporary_tabel order by col1, col2, col3, col4 will return a blank row after each data row
    
  • Insert a blank line after each line grouped

    Oracle 11.2.0.1

    Windows XP

    I need to create a table (who have more to exported to the Excel SQL Developer) something like this:

    The user Scott Table Emp


    create the table temptbl as

    SELECT

    -case when lead (deptno) OVER (ORDER BY deptno) = deptno then empno otherwise null end AS empno.

    -case when lead (deptno) OVER (ORDER BY deptno) = deptno then ename otherwise null end AS ename.

    -case when lead (deptno) OVER (ORDER BY deptno) = deptno then job otherwise null end AS work,

    -case when lead (deptno) OVER (ORDER BY deptno) = deptno then null deptno otherwise end up LIKE deptno

    WCP

    Table created.

    SQL > select * from temptbl;

    EMPNO, ENAME, DEPTNO JOB

    ---------- ---------- --------- ----------

    7782 CLARK MANAGER 10

    PRESIDENT OF 7839 10 KING

    7566 JONES MANAGER 20

    FORD ANALYST 20 7902

    7876 ADAMS CLERK 20

    SMITH CLERK 20 7369

    7521 WARD SALESMAN 30

    7844 TURNER SELLER 30

    7499 ALLEN SALESMAN 30

    EMPNO, ENAME, DEPTNO JOB

    ---------- ---------- --------- ----------

    7900 JAMES CLERK 30

    MANAGER OF 7698 30 BLAKE

    14 selected lines.

    SQL >

    But it is not giving me the last row of deptno.  If I have to display the data on sqlplus then I can use break on jump 1, but since I create my correct query table (around 10 K lines), I just want to insert a blank line after each data grouped.

    Thank you.

    Select empno, ename, job, decode (empno, null, null, deptno) deptno emp

    Group by grouping sets ((empno, ename, job, deptno), deptno)

    /

    EMPNO, ENAME, DEPTNO JOB
    ----- ---------- --------- ----------
    7782 CLARK MANAGER 10
    PRESIDENT OF 7839 10 KING
    7934 MILLER COMMITTED 10

    SMITH CLERK 20 7369
    7566 JONES MANAGER 20
    7782 CLARK MANAGER 20
    SCOTT ANALYST 20 7788
    7876 ADAMS CLERK 20
    FORD ANALYST 20 7902

    7900 JAMES CLERK 30
    7499 ALLEN SALESMAN 30
    7521 WARD SALESMAN 30
    7654 MARTIN SALESMAN 30
    SALESMAN 7698 BLAKE 30
    7782 CLARK MANAGER 30
    7844 TURNER SELLER 30

  • Import spaces dataSet XML < p > < /p > to create a blank line

    I would like to import a dataset that contains a text-data content which has several elements of text < /p > < p > in there, one of them being a blank separation 'paragraph' to put a simple newline in the text box is bound.
    What happens is that when I import an XML file, the < p > tag empty has ignored spaces, and the empty line does not get produced.  Even when you export a dataset with a variable which has been produced since a textframe who has a blank line between a line above and below, when imported back, the line disappears. In simple terms, is it possible to make my empty line desired with any type of parameter or cunning XML? I tried to put a nextline in CDATA in the 'empty' < p > and assigning to the attribute "XML: Space ="preserve"' on the empty < p >.»BlankLine_XML_1.jpgBlankLine_XML_2.jpgBlankLine_XML_3.jpg

    The only way I found to do this is to use the number of the non-breaking space entity, but in the end, you catch a space character, but also a line break:

    First Line

    Third Line

    Note for some reason you need to use the number of the entity and not the entity name (sign & nbsp;-it won't let me the real entity of type).

  • How to make SQL * more count the comment and blank line numbers?

    Hello

    Parameter
    Value of the parameter
    Oracle versionEnterprise Edition Release 11.2.0.1.0 - 64 bit
    OPERATING SYSTEMLinux Fedora Core 17 (X86_64)

    I would like to know, is it possible to force SQL * Plus to provide the number of the current in the source file line whenever there is an error? I often put in the first line of my script SQLBLANKLINES the VALUE ON that I may be able to put several consecutive blank lines in my code (I do that sometimes, when I find that it is appropriate to make my code more readable or a sequence of instructions which I believe make their logic more comprehensible for the reader of the Group)

    Now the problem is that SQL * Plus will ignore these empty lines and whenever there is an error, the line number in the error message does not match the actual line number in the source file, but it seems to be the last non-empty line in the file.  Consider the following example:

    SET SQLBLANKLINES ON;

    DECLARE
        var PLS_INTEGER := 10;
    BEGIN


       
        var := 20
    END;
    /

    In the code above on line 9 (also counting blank lines), there is an error (no semicolon at the end of the var: = 20) but when I run the script

    SQL * also, here is the error message I get


    SQL > @myscript.sql;

    END;

    *

    ERROR on line 8:

    ORA-06550: line 8, column 1:

    PLS-00103: encountered the symbol "END" when expected in the following way:

    * & = - + ; <>/ is mod remains not rem

    < an exponent (*) > <>or! = or ~ = > = < = <>and like2 or

    like4 likec between | submultiset of type multiset Member

    The symbol ';' was replaced by 'END' continue.


    SQL >


    As you can see the error message indicates that the error was found on line 8, while in the file, it's really on line 9

    As long as the number of lines in the script is limited, this may not be a problem and we can quickly find the actual line number in the code that causes the error, but for a code, including hundreds (or even thousands) of lines and with many comments and blank lines, find line number given by SQL * error message more becomes complicated.

    So my question: is it possible to make SQ * more properly draw the line numbers, as they appear in the source file?

    Thanks in advance,

    Kind regards

    Dariyoosh

    Hi, Dariyoosh,

    The line numbers in error messages are always from the beginning of the statement, but not the file.  The back-end which checks the errors and generates the error message, has no idea if this statement has appeared in your file, even if the statement was in a file at all, or if it comes from multiple files, each with its own line 1.

    You can divide your scripts into parts, so that the long statements, which may lead to error messages, are each in a separate file, so the statement starts on the line 1 of the file.

    For example, you can call a script called fubar.sql, which looks like this:

    SET SQLBLANKLINES ON;
    
    @@fubar_1
    

    Which calls another script, called fubar_1.sql, located on the same directory as fubar.sql, that looks like this

    DECLARE
        var PLS_INTEGER := 10;
    BEGIN
    
        var := 20
    END;
    /
    

    You never call him directly fubar_1.

  • Avoid blank lines at the top of the column

    So I create posts of all the two weeks and I had a question that would make my job easer.

    I've been messing around with the widow and orphans, but I have a slightly different problem.

    We use returns between paragraphs (a blank line between paragraphs), and I was wondering if there was a way to use GREP or showing something to automatically prevent blank lines at the top of a column.

    Right now, I have remove and re-add returns throughout the editing process, which as you can guess, can become messy and easy to miss.

    I wish I had where I don't have to do it all on my own, so the empty lines would be 'hide' automatically if at the top of a column, but would return if things get moved around.

    Thoughts?

    Thanks for the help.

    kwilly_1572 wrote:

    We use returns between paragraphs.

    .. can get messy and easy to miss.

    It's a reason that should not do this way. Correctly using the space before and/or after the space solves your problem.

  • Extra blank line inserted after the page break

    Hello

    I currently have problems with alignment using templates in BI Publisher.
    I am trying to create a model that will print on a pre-printed form.
    Each group in the State should be separated by page, so the Group has a <? split-of-page-break:? > before <? end-for-each? >.
    However, when the next page begins, there is a blank line inserted. This messes up the alignment in total.

    Code looks like this:
    <? for-each-group: G_Document; / DOCUMENT? > <? sorting: current-group () / DOCUMENT; ' ascending '; data-type = "text"? > <? for - each:current-group()? >
    -INSERT table MODEL HERE-
    <? split-of-page-break:? > <? end-for-each? >

    Output is like this:

    (Page1) < TABLE MODEL >
    Jump to Page <>
    (Page 2) < new line >
    < TABLE MODEL >
    Jump to Page <>
    (Page 3) < new line >
    < TABLE MODEL >
    Jump to Page <>
    ...

    I found this old thread Split-of-Page-Break insert extra line that has exactly the same problem, however, I tried all the proposed solutions, even the last one, and I still have the problem.
    Any help would be greatly appreciated.

    Kind regards
    Jovee

    If your issue is resolved can you please close the message and give me a few points.

  • The blank lines and features button in table question

    Readers,

    I have a table with data from a read-only VO. I have a button in each row of the table designed to call a method in the MB. There are 2 issues here
    (1) when I put the table content to 'whenAvailable' or lazy, I get empty rows in the table, how ever my button feature is called on each press (once, twice, thrice etc.). the query returns only 2 rows
    (2) when I put the dissemination of contents of the "immediate" table, I get blank lines in the table, how ever my button feature is called only once. After pressing the button once if I try to press on again by MB method is not called.

    Hope m clear. Please advice

    thnks
    11.1.1.5 Jdev

    Hello

    try to set the immediate property button and make immediate content delivery

    BTW, did you call action in the def file?

    ~ Abhijit

    Published by: Abhijit Dutta, October 20, 2011 12:14

    Published by: Abhijit Dutta, October 20, 2011 12:15

  • Concatenate a BLANK line in a text string?

    Hello

    BCZ of some reason implement comments and COMMMETS_HISTORY features on my_form with 2 boxes (text boxes several lines), well.

    Say, user_1 enetred a comment and clicked on the provided button (say his name is INSERT_MY_COMMENT_TO-COMMENT_HISTORY_BOX), then the entered comment moved to the historic area, well.

    Now, so again same user (or user workflow fly next) enetres another for feedback and clicking on the button, then it also moved to the area historical, well, but we need a BLANK line between the first and the 2nd comment for purposes of READABILITY, and good look

    is it possible by concatenating an empty line for comment_first by user_1, pls provide me with JS snippet

    Thank you

    Well,.

    I don't know how you push the story comments now, but usually you can add newlines with a script.

    This could look like this:

    HistoryField.rawValue = HistoryField.rawValue + "\n\n" + CommentField.rawValue;
    
  • SQL add a blank line will cause

    Hello

    Currently, I use a temporary table to add a blank line to the top / the beginning of my results of the query. I'm moving to stored procedures in MS SQL and wanted to know if it is possible to add a blank line directly in my SQL, so I can remove the solution in the temporary table.

    Any thoughts on this is appreciated!

    cfwild

    Hello

    Thanks for the idea. It worked perfectly! For those seeking just a line insert empty 'above' the results of the query, here was the final code:

    SELECT the category
    SYNDICATION
    UNION
    SELECT "
    ORDER BY category

    Once again, thank you for the help!

  • Make blank lines appear in a form field

    I need to move text that I understand a number of places in a record which will be published later in a field. I would like to have a blank line between each group of data (like a blank between paragraphs line).

    The only way I can do this must include < br > < br > after each section. This information appears perfectly everywhere EXCEPT in a form field where appear the br and paragraphs run together.

    The display in the form fields is HTMLEditFormat(). If I come from the information coming from these areas, everything works perfectly. I need to find a way to create the information elsewhere, so it appears correctly in these areas so that the information can be changed.

    The fact of note than when I look at the records in the database, the information which was launched from the form field display like this message. You see returns and empty between the information, but not s < br > lines. The information that generates I also I have include the < br >. So the question is - how do I save this information so that it contains flashbacks without introducing < br > s?

    I thought about it - we use the Chr() function, so the solution is:

    myVar = "#information ##chr (13) ##chr (10) # chr(10##MoreInfo#).

    CHR13 is a return and chr10 is a line break

  • How to write a double waveform in an Excel file without blank lines of cells

    Hello

    I am writing two waveforms in an Excel file, I'm almost there, but the stumper is that after each data line, a blank line appears in the XL file.

    Probably something simple I forgot because I am fairly new to this.

    Thanks in advance,

    Joel


  • How to eliminate blank lines in addresses mailing label?

    I'm merging the address fields in an Excel 2007 spreadsheet to labels in Word 2007.  Not all labels to use all the fields of the address of the spreadsheet, if I want to be able to ignore a blank in this field entry so that there is not a blank line to the address on the label.  I remember in earlier versions this was done automatically.  How can I remove the blank lines in the merged label?

    Thank you for visiting the Microsoft answers community.

    The question you have posted is related to Microsoft Office, and would be better suited in the Group Discussion of Microsoft Excel. Please visit this link to find a community that will provide the support you want.

    Lisa
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Add text from the command line to the output so that I can know how a command has been run when it generated the output

    This is a question and a suggestion...

    I would like to be able to precede or add if it works, the command line in the output file that creates the order.

    Example:

    I run dcdiag with switches, etc. and create an output file of results that gets saved or sent to a person or just put it in a folder. Of course, it could be that someone else ran the command and then sent the file. Anyway the problem is the same - what was the exact command line that has been executed to achieve these results?

    Question:

    Is there a known way to do from the command line that I can apply to any command?

    Suggestion:

    If this isn't the case, then I would suggest MS to include this function in all the BACK and PowerShell commands able to produce text output.

    If all goes well they monitor this forum and find it's a great idea and send me a check (pinky in my cheek) a meeellion of dollars. Then I and I alone will rule the world.

    Here you go:

    d:\>format i: / FS: NTFS > format.txt
    d:\>echo i format: / FS: NTFS > format.txt

  • question about wordpad, because the lines are separated by a blank line

    When I type in WordPad, the lines are separated by a blank line, that is, the 1st line climbs to the 3rd line, with the 2nd empty line, it takes double up typing something.  It's the same thing with the types of different fonts.

    I tried to use 1.0 spacing of lines in the tab "paragraph" Section; but this tab doesn't seem to work properly.  The lines are always separated by a blank line.

    Looking forward to your reply and thank you.

    Wu Carlotta

    Set the line spacing to 1.0 and uncheck the ' Add 10pt space after paragraphs... :-)

Maybe you are looking for

  • 255 G1: help

    Hello Please tell me if there isn't chipest driver for my new G1 of 255 HP... I can't find Please I'm waiting...

  • State Emergency necessary files for install Windows 7 SP1

    Hello guys,. Please help by sending me to the manifest files following so I can fix the corupted who will let me install SP1 for Wndows7 64-bit: winsxs\manifests\amd64_36970e9fa8c87b2e6578ec508855417d_31bf3856ad364e35_8.0.7600.20600_none_a55cf8877285

  • HP5400N print additional page

    Hello I have an OfficeJet Pro 5400N and have just replaced the black print head. I allowed the printer to make flow through of routine tests. When the function print something (document only, pages I do not print photographs) I always get an extra pa

  • Tripwire to PIX/IOS/CatOS agents?

    My client is installed Tripwire and they have made Solaris agents and now look at my network devices. Does anyone have experience with this? I can't find any useful information on the web about the functioning of these 'agents '. I almost expect an a

  • reduced performance index

    Hello I have recently done a test of l index performance from my pc. It showed before the one below 5.6 and now 5.5. I posse this computer for 6 months. a d ram 8 gb hp and a 7380 hd radeon graphics card. I would like to know the reason behind this d