Download multi line in statement of DBMS with header

Hello everyone,

I wrote a code plsql as follows, but I need to have a heading for the exit with its value like this:

DETAILS OF THE EMPLOYEE:

YJOSEPH4 | YOUSEFJOSEPH | 15 NOVEMBER 15

YJOSEPH5 | YOUSEFJOSEPH | 15 NOVEMBER 15

HYOUSEF6 | HASSANYOUSEF | 15 NOVEMBER 15

.

.

.

.

THE CODE I CREATE IS:

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

DECLARE
V_USER_ID VARCHAR2 (50);
NUMBER OF V_EMP_NO;
V_FIRST_NAME VARCHAR2 (30);
V_LAST_NAME VARCHAR2 (30);
DATE OF V_REG_DATE;
V_SQL_SATEMENTS VARCHAR2 (1000);
NCOUNT THE NUMBER;
CURSOR C IS SELECT * FROM EMP;
BEGIN
OPEN C;
SELECT COUNT (*) FROM NCOUNT FROM USER_TABLES WHERE TABLE_NAME = 'EMP ';
IF (NCOUNT < = 0) THEN
V_SQL_SATEMENTS: =' CREATE TABLE EMP)
USER_ID VARCHAR2 (40) PRIMARY KEY,.
NUMBER OF EMP_NO,
FIRST NAME VARCHAR2 (30),
VARCHAR2 (30) LAST_NAME,.
DATE OF REG_DATE)';

RUN IMMEDIATELY "DROP TABLE EMP;
IMMEDIATELY RUN V_SQL_SATEMENTS;
END IF;

SELECT NVL (MAX (EMP_NO), 0) + 1
IN V_EMP_NO
YOUSEF. EMP;
INSERT YOUSEF. EMP (USER_ID, EMP_NO, FIRST_NAME, LAST_NAME, REG_DATE)
VALUES (SUBSTR (: LAST NAME, 1, 1) |: LAST_NAME |) V_EMP_NO, V_EMP_NO,:FIRST_NAME,:LAST_NAME,TO_DATE(SYSDATE,'DD-MON-YY'));
LOOP
EXTRACT THE C IN V_USER_ID, V_EMP_NO, V_FIRST_NAME, V_LAST_NAME, V_REG_DATE;
WHEN THE EXIT %C NOTFOUND;
DBMS_OUTPUT. PUT_LINE (' DETAILS OF THE EMPLOYEE: "");
DBMS_OUTPUT. PUT_LINE (V_USER_ID |'|) ' || V_FIRST_NAME | V_LAST_NAME |' | ' || V_REG_DATE);
END LOOP;
CLOSE C;
END;
/

THE OUTPUT OF THIS CODE IS LIKE:

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

DETAILS OF THE EMPLOYEE:

YJOSEPH4 | YOUSEFJOSEPH | 15 NOVEMBER 15

DETAILS OF THE EMPLOYEE:

YJOSEPH5 | YOUSEFJOSEPH | 15 NOVEMBER 15

DETAILS OF THE EMPLOYEE:

HYOUSEF6 | HASSANYOUSEF | 15 NOVEMBER 15

DETAILS OF THE EMPLOYEE:

HYOUSEF7 | HASSANYOUSEF | 15 NOVEMBER 15

IF YOU HAVE ANY IMPROVEMENT TO THE CODE DON'T HISITATE TO TELL ME.

Hello

Why not put the line DBMS_OUTPUT. PUT_LINE (' DETAILS OF THE EMPLOYEE: ""); outside, the loop can be after the insert statement.

If it does not, your needs, please let us know the reason.

Kind regards

Cool

Tags: Database

Similar Questions

  • Upgrade to 3.6.15. Now my Add ons (1 password, Download Helper, Multi line Bookmark Toolbar) disappeared. Everyone knows about this problem? Any ideas on how to solve this problem? Thank you.

    Upgrade to 3.6.15. Now my Add ons (1 password, Download Helper, Multi line Bookmark Toolbar) disappeared. Everyone knows about this problem? Any ideas on how to solve this problem? Thank you.

    There may be a problem with one of the files which stores details of the installed extensions. Try to delete these files as described in the section "Corrupt extension files" of this link - https://support.mozilla.com/kb/Unable+to+install+add-ons

    Although this article is not specifically about your problem, the method indicated in the corrupted files extension section can help. When you restart Firefox after you delete these files, the list of installed extensions is rebuilt and cela hopefully solve your problem.

  • I downloaded Multi Access Tool from Mcafee with Firefox Mozilla, how do I reinstall if it does not work properly?

    I downloaded Multi Access Tool from Mcafee with Firefox Mozilla, how do I reinstall if it does not work properly?

    My sincere apologies, my Mcafee came via the Optimum/Cablevision, not Mozilla. I now managed to solve my problem and appreciate the 2 above responses. Thank you.

  • How to build a JTree with nodes multi-line Windows L and am FJt

    Although I already found 2 ways to build nodes multi-line JTree but both methods work very well in Java by default appearance and when I change my windows look and feel then it fails. I can't understand what is the problem. The two ways by which I build multi line nodes are:

    First: Using html in nodes
    as the DOSB linea < br > < html > < / html >

    Secondly: By implementing TreeRenderer and change it accordingly, such a class is given below
    class ModifiedTreeCellRenderer extends JPanel implements TreeCellRenderer {
        protected JLabel icon;
        protected TreeTextArea text;
        
        public ModifiedTreeCellRenderer() {
            setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
            icon = new JLabel() {
                @Override
                public void setBackground(Color color) {
                    if (color instanceof ColorUIResource)
                    color = null;
                    super.setBackground(color);
                }
            };
            add(icon);
            add(Box.createHorizontalStrut(4));
            add(text = new TreeTextArea());
        }
        
        @Override
        public Component getTreeCellRendererComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
            String stringValue = tree.convertValueToText(value, isSelected, expanded, leaf, row, hasFocus);
            setEnabled(tree.isEnabled());
            text.setText(stringValue);
            text.setSelect(isSelected);
            text.setFocus(hasFocus);
            if (leaf) {
                icon.setIcon(UIManager.getIcon("Tree.leafIcon"));
            } else if (expanded) {
                icon.setIcon(UIManager.getIcon("Tree.openIcon"));
            } else {
                icon.setIcon(UIManager.getIcon("Tree.closedIcon"));
            }
            return this;
        }
    
        @Override
        public Dimension getPreferredSize() {
            Dimension iconD = icon.getPreferredSize();
            Dimension textD = text.getPreferredSize();
            int height = iconD.height < textD.height ? textD.height : iconD.height;
            return new Dimension(iconD.width + textD.width, height);
        }
    
        @Override
        public void setBackground(Color color) {
            if (color instanceof ColorUIResource)
                color = null;
            super.setBackground(color);
        }
    
        class TreeTextArea extends JTextArea {
            Dimension preferredSize;
            
            TreeTextArea() {
                setLineWrap(true);
                setWrapStyleWord(true);
                setOpaque(true);
            }
    
            @Override
            public void setBackground(Color color) {
                if (color instanceof ColorUIResource)
                color = null;
                super.setBackground(color);
            }
    
            @Override
            public void setPreferredSize(Dimension d) {
                if (d != null) {
                preferredSize = d;
                }
            }
    
            @Override
            public Dimension getPreferredSize() {
                return preferredSize;
            }
    
            @Override
            public void setText(String str) {
                FontMetrics fm = getToolkit().getFontMetrics(getFont());
                BufferedReader br = new BufferedReader(new StringReader(str));
                String line;
                int maxWidth = 0, lines = 0;
                try {
                    while ((line = br.readLine()) != null) {
                        int width = SwingUtilities.computeStringWidth(fm, line);
                        if (maxWidth < width) {
                            maxWidth = width;
                        }
                        lines++;
                    }
                } catch (IOException ex) {
                    System.out.println(ex);
                }
                lines = (lines < 1) ? 1 : lines;
                int height = fm.getHeight() * lines;
                setPreferredSize(new Dimension(maxWidth + 6, height));
                super.setText(str);
            }
    
            void setSelect(boolean isSelected) {
                Color bColor;
                if (isSelected) {
                    bColor = UIManager.getColor("Tree.selectionBackground");
                } else {
                    bColor = UIManager.getColor("Tree.textBackground");
                }
                super.setBackground(bColor);
            }
    
            void setFocus(boolean hasFocus) {
                if (hasFocus) {
                    Color lineColor = UIManager.getColor("Tree.selectionBorderColor");
                    setBorder(BorderFactory.createLineBorder(lineColor));
                } else {
                    setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
                }
            }
        }
    }
       
    but the two methods in the event of failure in a Windows look and feel, can anyone help with this?

    Published by: user8978073 on April 30, 2011 10:24

    Published by: user8978073 on April 30, 2011 10:25

    Can't check right now, but - afair, windowsLAF sets the rowHeight to a fixed value (16 or 18 or something like that). Consult the setRowHeight and make sure that there<= 0="" to="" indicate="" that="" it="" should="" be="">

  • model of multi line search with as

    Hi all

    I use oracle 9i. I want to search for multi - line pattern.

    for example

    Update tablename
    Set the columnname.

    I used select * from user_source where text like "update tablename set columnname %" but this only seems to work if update tablename set columnname is in the same line.

    Thank you.

    Well, no wonder it doesn't work. USER_SOURCE stores a single line of text per line, so the text in the column by definition cannot contain the multiline strings. One solution could be a LEAD analytic function:

    SQL> create or replace
      2    procedure p1
      3      is
      4      begin
      5          update emp
      6             set ename = ename;
      7  end;
      8  /
    
    Procedure created.
    
    SQL> select  distinct name
      2    from  (
      3           select  s.*,
      4                   lead(text) over(partition by name order by line) next_text
      5             from  user_source s
      6          )
      7    where text like '%update emp%'
      8      and next_text like '%set ename%'
      9  /
    
    NAME
    ------------------------------
    P1
    
    SQL> 
    

    SY.

  • DataGrid with multi-line headers

    Hello!

    How can I have a DataGrid with header and so to speak.

    Something like this:

    [Main header]

    [sub1] [sub2] [sub3]

    Thank you!

    There is an example of SplitDataGridColumn on my blog

    --

    Alex Harui

    Flex SDK Team

    Adobe System, Inc..

    http://blogs.Adobe.com/aharui

  • Trying to create a multi-line dialog box

    I worked on a study PDF guide. At the end of each chapter is a self test, and I have some javascript which marks the review when a user clicks a button. Currently, I use a window app.alert to notify the user what responses it is correct and display explanations on incorrect answers. Unfortunately, some of the explanations may be a little long, so I had some tests auto split in several alerts. I have a snippet of code (below) for example to a dialog box, but have been unable to find examples of a multi-line dialog box. A thread has responses as "it is not easy", but no solid examples. Someone at - it an example of a simple dialog box, a line that I could adjust to my needs?

    var oDlg = { 
        description: { name: "Test Dialog", elements: [ { name: "Hello World", type: "static_text", }, { type: "ok", }, ] } 
    }; 
    // Dialog Activation 
    app.execDialog(oDlg);
    
    

    I tried to do something like that, but it barfs on the first carriage return:

    var sText = "Question 5: Incorrect! The correct answer is B\r\rA, C, and D are incorrect. && and || are both short-circuit operators. With &&, when the left side evaluates to false the right side is never evaluated. And with ||, when the left side evaluates to true, the right side is never evaluated.\r\rIn the first statement, i1 does not equal 99 when it is evaluated, so the second expression is printed. However, it is decremented BEFORE the print statement, so the combined value of i and j is 299.\r\rIn the second statement, the left side of the equation evaluates to false, so the right side is never evaluated. Thus the second expression is printed out.\r\rIn the third statement, i3 equates to 100, so the first expression is printed out.\r\rFor the last statement, the left side of the expression is evaluated to true, so the right is never evaluated. The first expression is printed out.\r\rThe final result is 'Value2: 299, Value2: 300, Value1: 299, Value1: 300'";
    
    var oDlg = { 
    description: { name: "Test Dialog", elements: [ { name: SText, type: "static_text", }, { type: "ok", }, ] } 
    }; 
    // Dialog Activation 
    app.execDialog(oDlg);
    

    Any help would be appreciated.

    Here is a basic sample:

    Dialog1 var = {}

    DoDialog: function() {}

    Return app.execDialog (this);

    },

    initialize: function {(dialogue)

    var dlgInit = {}

    "not1": this.strnot1

    };

    Dialog.Load (dlgInit);

    },

    Description: {}

    name: "dlg1."

    elements:

    [

    {

    type: "display."

    elements:

    [

    {

    type: "cluster."

    item_id: "cls1."

    name: "Notes."

    elements:

    [

    {

    type: 'static_text. "

    Multiline: 'true ',.

    item_id: "not1."

    Width: 300,

    height: 300,.

    }

    ]

    }

    ]

    },

    {

    type: "ok."

    }

    ]

    } / / description

    };

    var sText = "Question 5: Incorrect! The correct answer is B\r\rA, C, and D are incorrect. & and | are only two short circuit operators. With &, when the left is set to false, the right side is never evaluated. And with |, when the left evaluates to true, the right side is never evaluated.\r\rIn the first statement, i1 is not equal 99 when it is evaluated, so the second expression is printed. However, it is decremented BEFORE the print statement, so the combined value of i and j is 299.\r\rIn that the second statement, the left side of the equation is set to false, then the right-hand side is never evaluated. The second expression is so printed out.\r\rIn the third statement, i3 is equivalent to 100, so the first expression is printed out.\r\rFor the last statement, the left side of the expression evaluates to true, then the right is never evaluated. The first expression is printed out.\r\rThe end result is ' value2: 299, value2: 300, value1: 299, value1: 300 ft;

    Dialog1.strnot1 = sText;

    Dialog1. DoDialog();

  • How to get a multi line region to call a procedure on each row updated

    Hi all

    I want to offer the possibility of reparenting a certain number of rows in a table. Fix routine is a pl/sql package procedure.

    What I want to do is see the kids lines in a region, and then select a new parent (if a child is in need of a new parent). Then, I want to deal with all the lines by calling the procedure where a change to the parent company did.

    If there is a way to do this? (And if all goes well, it is clear that I am doing).

    Basically: Multi line form, can I use a procedure on each line that I want to update when I select Apply Changes?

    Kind regards
    Steve

    Published by: spilgrim on June 25, 2009 15:15

    Steve,

    You can do more things with tabular shapes when you understand more about how they work. The approach varies a bit depending on whether you leave Apex manage them or do it manually, but the concepts are the same.

    When the page is sent to you get a series of paintings dealing with the page that discusses the section:
    http://download.Oracle.com/docs/CD/E14373_01/apirefs.32/e13369/apex_app.htm#CHDICJDA

    Denes Kubicek has a few good demos on this point, a here:
    http://HTMLDB.Oracle.com/pls/OTN/f?p=31517:170

    You need to browse looping with these berries calling your procedure every time. However, it is not really easy the first time you do it.

    Kind regards
    Dan

    http://danielmcghan.us
    http://sourceforge.NET/projects/tapigen
    http://sourceforge.NET/projects/plrecur

    You can reward this answer by marking as being useful or correct ;-)

  • Pop up multi line string causes missing "error".

    I need to display a string of long text (multi line) in a pop-up message.

    If I do this with a very long string in the .c file it works (I have several \n in the chain so that it looks OK in the pop-.

    However, if I try to extend the string of text on several lines THAT CVI is complaining, how to do this, I don't want to use a too large number of columns.

    That's what he does not like:

    case EVENT_RIGHT_CLICK:
    MessagePopup ('Run Test Jig Interface Test Help',')
    This test verifies that this program can communicate with
    the ATJ hardware.\n\n this program asks equipment and
    firmware revision of the ATJ and then records the results in this section as well as in the test report");
    break;

    Thank you

    You can split the text on multiple lines by using the line continuation character ' \ ', in this way:

    MessagePopup ("Run Test Jig Interface Test Help",
       "This test verifies that this program can communicate with " \
       "the ATJ hardware.\n\n This program requests the hardware and " \
       "firmware revison of the ATJ and then records the results in this " \
       "section as well as in the test report");
    
  • Smartphones blackBerry how to reset apps downloaded to its original state

    HII, I am newbie on the use of blackberry.
    Is that possible to reset apps downloaded in its original state, just as installed apps Android hh? Coz, there is 'clear data' feature on Android that can do.
    Thank you

    Oh, I see what you want to do... Unfortunately there is no way that I can think of short of uninstalling the application, restart and then reinstall the application. Some applications may have an internal reset option, but that is specific app.

    So now, there is another option of deletion of user data on the device and which will have the same effect, but which will remove also all the data on your device, including messages, contacts, etc. It is perhaps the way to go - back up your data with the BlackBerry Desktop Software, wipe the data on the device (let your media card and applications intact), and then do a selective restore just the databases you want (depending on the application, some can save data in databases).

    In any case, I know that's not ideal, but at least it's a work around. Good luck!

  • How can I add multi line selection in a drop-down list

    I just started with Acrobat DC. Everything is simple, until it isn't. I try to add items to my drop-down list. It's easy. I'm trying to make the choice of multi line. It is an inspection report and the choice will not fit on a single line. So after making the choice, can not read the answer. Thank you-Tim

    It is possible to do it, but only with a script and it's a kind of buggy. In other words, not really a good idea.

  • AutoComplete - see value in the form of multi line + return value.

    Hi Experts,

    I had a simple solution for AutoComplete to see the multi line like: select line1 | Chr (10) | Line2 | Chr (10) | line 3 of une_table.
    In onblur DA it is a process that reduces the value, set the fields another request based on the process of pl/sql.

    After the upgrade to the latest version of apex + modified model - the integer value is displayed as a single line only (no need to any text is indicated).

    I want to manage something like: ExtJs - Ajax search field
    http://Apex.Oracle.com/pls/OTN/f?p=PLAYPEN:1:264121214928301:

    Is there a solution to the APEX to use AutoComplete with multi display value line without incorporating the ExtJs?
    Sorry for my English :)

    Thank you!
    Concerning
    J :D

    I'll add my plugin in 2 or 3 days...

    Welcome

  • How do I Center a text entry field can be single or multi-line?

    I have created a form in Adobe Acrobat Pro XI and have almost everything I like.  One of my latest problems trying to get a text in a field of centered text.  The entrance is sometimes a single line and multi-line sometimes.  If I put in place for multi-line entries are centered, then the single line looks like offshore... and vice versa.  Is it possible to have the centered text automatically in the text field single or multi-line?

    Unfortunately, there is no way to set up a field so that the text is guaranteed to be centered vertically in both cases. If you set up so that the rich text formatting is enabled, it is possible for a user centered vertically, but this isn't something you can preconfigure so that it remains in effect when the field is cleaned. For a user to do, with the emphasis placed on the ground that they would have to display the toolbar properties (Ctrl + E), click on the "more..." "> paragraph > alignment > intermediate text [button]

  • How can I increase the attack in a multi-line text box?

    Is this possible?

    I found this ad a few years where someone has asked a similar question:

    http://forums.Adobe.com/thread/286972

    This feature has never been added? If this is not the case-how can I make the code work posted in response to that post?  Just hide the lines would be a good alternative, I think. I tried to add the code to my existing PDF, but seems not to do anything, the lines are still visible when you type in the field.

    No, leading to control has been added and it probably never will be.

    The code at this other thread is not complete because the functions that it calls are not displayed. They are not integrated. Here is a link to a document with a multi-line field that behaves in this way: https://workspaces.acrobat.com/?d=AG6oZ3bi3DYHokxDPeWN7A

    There are several small scripts in various events that control the behavior.

  • FormsCentral Adobe multi-line text field

    I am trying to create a form that will expand the fields of history/medical notes as indicated by the patient.  I tried incorporating fields "(multi-line) text field ', but get a field with a scroll bar, rather than a growing field.  Moving to other fields, or registration or import the file does not change the scope of expanded scroll.

    Any help appreciated.

    Many LiveCycle Designer is uninstalled when you install Acrobat 11, you must be eligible to receive the latest free version, so you can continue to use the dynamic forms designer.

Maybe you are looking for

  • Highlighter?

    Windows 7, with Thunderbird 38 is a simple I say simple new highlighter tool or add that even an old guy like me can understand?

  • Satellite L655 - 130G: what is the 130 GB partition for?

    You are not sure if it's ok to ask here?There are a score of 130 GB not used not drank the system? and I think that it is not for the recovery software,What it is? Can I use it?

  • Hangs at startup

    I have a HP Pavilion a1540n.  As a result of an error in MS outlook, I had to reboot.  Upon reboot, I get to the bibliographic information page and the computer crashes.  It does not respond when I try to press F1 for Setup or F2 to continue... Help,

  • Windows 7 drivers Atheros AR9285 Qualcom

    I think I'm having crashes because of my wi - fi adapter. There are new drivers for Windows 7 Qualcom Atheros AR9285? I get a blue screen and have to reboot. I saw on a post that the Qualcom was at fault. Thank you

  • Download blackBerry 10 native SDK Beta issue.

    Hi all: I encounter an error message when you try to download 10 native SDK Beta BlackBerry or BlackBerry 10 Dev Alpha Simulator. When I click on the download link, I encounter the following error: Error! Error downloading due to export restrictions.