How to get only the new lines

Hello

I have a table as below

emp_id (integer)
id_est (integer)
dt_est (date)

for each emp_id I have several id_est with several dt_est... as below

emp_id id_est dt_est
1 1 10-01 - 2009
1 2 2009 - 01 - 13
2 3 2009 - 01 - 10
2 4 2009 - 01 - 12
2 5 2009 - 01 - 14
3 6 2009 - 01 - 12
4 7 2009 - 01 - 15
5 8 2009 - 01 - 17
5 9 2009 - 01 - 19

I would get just the news lines function date each emp_id, so my result should be as below

emp_id id_est dt_est
1 2 2009 - 01 - 13
2 5 2009 - 01 - 14
3 6 2009 - 01 - 12
4 7 2009 - 01 - 15
5 9 2009 - 01 - 19

How I do that?

Thank you

Hello

Try this code.

Salim cordially.

SELECT   id_emp, MAX (id_est), MAX (dt_est)
    FROM t
GROUP BY id_emp

Tags: Database

Similar Questions

  • How to get only the whole ticks on a horizontal axis of a graph?

    Hello
    Could someone help me find oout how to get only the whole ticks on a horizontal axis of a graph?
    When I have a number less than 5, I get like 0, 0.2, 0.4 ticks... while I want it to be 0, 1, 2...

    Thank you
    Yann

    healer

    Try this Clara. Put this inbetween your chart labels:



    Set the interval to meet your needs of 'tick '.

  • How can I view the new lines when line is inserted in a VO in Popup

    Hi Experts,

    JDEV version 12.1.3.0

    I have a page jsff where I show the data as below. This table is read-only

    image1.jpg

    If I click on the button create.

    I open a pop-up window. During the initial loading of popup I am inserting a line at the VO. The page main jsff and popup VO are inspired by the same iterator. Screenshot below.

    Untitled.jpg

    But however I note when popup open should see the newly single line.

    But its showing an old recordi, first line of the VO.  How can I avoid showing the old line of the pop-up window. The jsff and the popup are inspired by the same iterator.

    Thank you

    Roy

    Hello

    Requirement is not like that. We must show new lines in the table. Done with the visible property of inputText in the transitional attribute value column on 'Y '.

    On insertion, I put transitional attribute as "O".

  • How to get only the year of a date?

    I try to shoot only the year of a date and does not know how this can be done. I tried the SUBSTR function but its does not not how I think. What I want to do, it is write a condition indicating the year of birth of point = current year minus 23, I have a calc than the figures of the age of the difference in the date of birth and the current year, but I'd really like to just write a condition based just a years. Is this possible?

    Hello
    SUBSTR only works on a string. To extract parts of a date, you must use the TO_CHAR command.

    For the year, you would use this: TO_CHAR (the_date, 'YYYY')

    To_char takes 2 switches, the date to be handled and the part to be extracted, with the portion between apostrophes.

    Once you get used to manipulate dates as this other common areas are: DD - extracts the day of the month, MY snippet code to 3 characters for the month.

    For example, you can use this: TO_CHAR(sysdate,'DD-MON-YYYY') and it converts the current date, June 7, 2012 to June 7, 2012

    Hope this helps
    Best wishes
    Michael

  • How to save only the selected line

    Hi all

    I have a page master / detail with two regions advanced table.
    Region of the main table has a transient 'SelectFlag' attribute to display the detail records.

    When I make a few changes to a master record and save it is save all records on the page.

    I want to save only the selected record.

    How to get there?

    Help, please. :)

    You need to loop through the rows using RowSetIterator.

    Reference http://oracleanil.blogspot.com/2010/05/delete-exercise-delete-row-from-table.html

    -Anand

  • Get only the first line of duplicate data

    Hello

    I have the following situation...
    I have a table called employees with column (object, name, function) where "re" is the primary key.

    I import data within this table using an xml file, the problem is that some employees may be repeated inside this xml file, which means, I'll have repeated "re", and presents the columns is a primary key of my table.

    To work around this problem, I created a table called employees_tmp that has the same built as employees, but without the primary key constraint, on this way I can import the XML inside the employees_tmp table.

    What I need now is to copy that data employees_tmp used, but for cases where the "re" is taken, I just want to copy the first line found.

    Just an example:

    EMPLOYEES_TMP
    ---------------------
    RE FUNCTION NAME
    ANALYST GABRIEL 0987
    MANAGER GABRIEL 0987
    RANIERI ANALYST 0978
    VICE PRESIDENT RICHARD 0875


    I want to copy the data to employees looks like

    EMPLOYEES
    ---------------------
    RE FUNCTION NAME
    ANALYST GABRIEL 0987
    RANIERI ANALYST 0978
    VICE PRESIDENT RICHARD 0875

    How would I do that?

    I really appreciate any help.

    Thank you

    Try,

    SELECT re, NAME, FUNCTION
      FROM (SELECT re,
                   NAME,
                   FUNCTION,
                   ROW_NUMBER () OVER (PARTITION BY re ORDER BY NAME) rn
              FROM employees_tmp)
     WHERE rn = 1
    

    G.

  • How to get back the new 'old' section with 9 tiles instead of 8?

    I find 8/12 tiles (if you press Ctrl + scroll wheel down) boring, is there a way the GET the classic "new tab" page with 9 tiles back?

    PS I already tried to change the number of columns (5-3) subject: config / browser.newtabpage.colums I had 9 tiles but it's horrible

    When I set browser.newtabpage.columns to 3, nine thumbnails block is centered, leaving white areas on the left and right.

    You try to find a way to stretch out them or just space them more far out? I don't think that there is a parameter for it, but it might be possible to apply a rule of custom page style. I think that someone who will need to experiment with it for a while before offering a recipe for this.

  • How to get only the central panel to resize and display a scroll bar?

    I have a window (frame) that has three panels - upper, middle and lower. When the window is narrowed down, I need a scroll bar is displayed for the central panel only. If the maximum possible vertical shrinkage would be the sum of the upper and lower panels and a small amount (to display the scroll bar of the central panel). So the upper and lower panels should always be completely (height wise). Please review my code and suggest corrections. I tried the couple in different ways, but without success... The code below is my latest attempt.
    Thank you...
    import java.awt.*;
    import java.awt.Color.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    
    import javax.swing.*;
    import javax.swing.plaf.ComponentUI;
    
    public class PanelResizingA extends JPanel implements MouseListener, MouseMotionListener
    {
    
         /**
          * @param args
          */
         public static void main(String[] args)
         {
              JFrame frame = new JFrame ("All Panels");
              PanelResizingA allThreePanels = new PanelResizingA();
              JScrollPane allHorizontalScroll = new JScrollPane();
              //frame.add(allHorizontalScroll);
              allHorizontalScroll.setViewportView(allThreePanels);
              allHorizontalScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
              allHorizontalScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
              frame.getContentPane().add(allHorizontalScroll);
              frame.setVisible(true);
              frame.pack();
         }
         
         private JPanel topPanel;
         private JPanel midPanel;
         private JPanel bottomPanel;
         private JPanel allPanels;
         private JScrollPane midVerticalScroll;
         private JScrollPane allHorizontalScroll;
         private JLabel posnCheckLabel;
         private int panelWidth = 0;
         private int topPanelHt = 0;
         private int midPanelHt = 0;
         private int bottomPanelHt = 0;
         private int allPanelsHt = 0;
         private Point pointPressed;
         private Point pointReleased;
         
         public PanelResizingA()
         {
              createAllPanels();
         }
         
         private void createAllPanels()
         {
              topPanel = new JPanel();
              midPanel = new JPanel();
              bottomPanel = new JPanel();
              allPanels = new JPanel();
              posnCheckLabel = new JLabel("Label in Center");
              
              panelWidth = 300;
              topPanelHt = 150;
              midPanelHt = 200;
              bottomPanelHt = 150;
              allPanelsHt = topPanelHt + midPanelHt + bottomPanelHt;
              
              //topPanel.setMinimumSize(new Dimension(panelWidth-150, topPanelHt));
              //topPanel.setMaximumSize(new Dimension(panelWidth, topPanelHt));
              topPanel.setPreferredSize(new Dimension(panelWidth, topPanelHt));
              topPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
              
              midPanel.setMinimumSize(new Dimension(panelWidth-150, midPanelHt-150));
              midPanel.setMaximumSize(new Dimension(panelWidth, midPanelHt));
              midPanel.setPreferredSize(new Dimension(panelWidth, midPanelHt-3));
              midPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
              midPanel.setLayout(new BorderLayout());
              midPanel.add(posnCheckLabel, BorderLayout.CENTER);
              //midPanel.add(new PanelVerticalDragger(midPanel), BorderLayout.SOUTH);
              
              //bottomPanel.setMinimumSize(new Dimension(panelWidth-150, bottomPanelHt));
              //bottomPanel.setMaximumSize(new Dimension(panelWidth, bottomPanelHt));
              bottomPanel.setPreferredSize(new Dimension(panelWidth, bottomPanelHt));
              bottomPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
              
              allPanels.setMinimumSize(new Dimension (panelWidth-150, allPanelsHt-300));
              allPanels.setMaximumSize(new Dimension(panelWidth+25, allPanelsHt+25));
              allPanels.setPreferredSize(new Dimension(panelWidth, allPanelsHt));
              
              midVerticalScroll = new JScrollPane();
              //midPanel.add(midVerticalScroll);
              midVerticalScroll.setViewportView(midPanel);
              midVerticalScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
              midVerticalScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
    
              allPanels.setLayout(new BoxLayout(allPanels,BoxLayout.Y_AXIS));
              allPanels.add(topPanel);
              allPanels.add(midPanel);
              allPanels.add(bottomPanel);
              
              this.add(allPanels);
              addMouseListener(this);
              addMouseMotionListener(this);
         }
         private void updateCursor(boolean on)
         {
              if (on)
              {
                   setCursor(Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR));
              }
              else
              {
                   setCursor(null);
              }
         }
         @Override
         public void mousePressed(MouseEvent e)
         {
              pointPressed = e.getLocationOnScreen();
              updateCursor(true);
         }
    
         @Override
         public void mouseDragged(MouseEvent e)
         {
              mouseReleased(e);
              pointPressed = e.getLocationOnScreen();
         }
    
         @Override
         public void mouseReleased(MouseEvent e)
         {
              pointReleased = e.getLocationOnScreen();
              
              Dimension allPanelsPrefSize = this.allPanels.getPreferredSize();
              Dimension midPanelPrefSize = this.midPanel.getPreferredSize();
              Dimension allPanelsSize = this.allPanels.getSize();
              Dimension allPanelsMinSize = this.allPanels.getMinimumSize();
              int midPanelPrefHt = midPanelPrefSize.height;
              int midPanelPrefWidth = midPanelPrefSize.width;
              int maxHtDelta = allPanelsPrefSize.height - allPanelsMinSize.height;
              //int deltaY = pointPressed.y - pointReleased.y;
              
              Point panelLocation = this.getLocation();
              Dimension size = this.getSize();
              if (size.height < allPanelsSize.height)
              {
                   int deltaY = pointPressed.y - pointReleased.y;
                   if (deltaY < maxHtDelta)
                   {
                        midPanelPrefHt = midPanelPrefHt-deltaY;
                   }
                   else {midPanelPrefHt = this.midPanel.getMinimumSize().height;}
                   this.midPanel.setPreferredSize(new Dimension(midPanelPrefWidth, midPanelPrefHt));
                   this.midVerticalScroll.setViewportView(this.midPanel);
                   allPanels.setLayout(new BoxLayout(allPanels,BoxLayout.Y_AXIS));
                   allPanels.add(topPanel);
                   allPanels.add(midVerticalScroll);
                   allPanels.add(bottomPanel);               
              }
              midVerticalScroll.revalidate();
              pointPressed = null;
              pointReleased = null;
         }
    
         @Override
         public void mouseEntered(MouseEvent e)
         {
              updateCursor(true);
         }
    
         @Override
         public void mouseExited(MouseEvent e)
         {
         }
    
         @Override
         public void mouseClicked(MouseEvent e)
         {
         }
    
         @Override
         public void mouseMoved(MouseEvent e)
         {
         }
         
         
    }
    Published by: 799076 on October 8, 2010 12:53

    Published by: 799076 on October 8, 2010 12:55

    If you are using a BorderLayout, then Center will develop and reduce both the need and therefore should work as you wish. For example,.

    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import javax.swing.*;
    
    public class PanelResizingB extends JPanel {
       private static final Dimension PANEL_SIZE = new Dimension(300, 150);
       private String[] labelStrings = {"Top Panel", "Middle Panel", "Bottom Panel"};
    
       public PanelResizingB() {
          setLayout(new BorderLayout());
    
          JPanel[] panels = new JPanel[labelStrings.length];
          for (int i = 0; i < panels.length; i++) {
             panels[i] = new JPanel(new BorderLayout());
             panels.add(new JLabel(labelStrings[i]));panels[i].setPreferredSize(PANEL_SIZE);}
    
    add(panels[0], BorderLayout.NORTH);add(new JScrollPane(panels[1]), BorderLayout.CENTER);add(panels[2], BorderLayout.SOUTH);}
    
    private static void createAndShowUI() {JFrame frame = new JFrame("PanelResizingB");frame.getContentPane().add(new PanelResizingB());frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.pack();frame.setLocationRelativeTo(null);frame.setVisible(true);}
    
    public static void main(String[] args) {java.awt.EventQueue.invokeLater(new Runnable() {public void run() {createAndShowUI();}});}} 
    
  • How to get to the new provision hbox when children are hidden

    I use an HBox contrainer to action buttons of layout along the bottom of a set of pages that make up a wizard.  As a general rule, these pages are instantiated only once to start the wizard and persist throughout the life of the wizard.  Meanwhile, a user can move backward much between pages.  However according to the State of the workflow, buttons on different pages will be deactivated / reactivated and some get completely hidden only to reappear later.  This happens dynamically based on the use of stocks.

    In this scenario, the disabled buttons are fine but hidden buttons mess things up. For example, if the third in a row of four buttons button is hidden, therefore a strange gap in the row of buttons.  Even if the first of the three buttons should be hidden, the other two buttons are adjacent, but not centered as it should.

    So my question is, is anyway to remove a button from the layout without actually removing the Hbox children list button?  Or are there other ways to have the provision to rely only on the visible buttons?  It is this feasible?

    The reason why I don't want to completely remove the button of the HBox is so I have to create a follow-up mechanism to the right sequence in which buttons should appear so that when they are added in later, I add in the right place in the list of buttons.  I can do this, but I hope that there is an integrated solution.

    -Ken

    In addition to the visible property, you want to set the includeInLayout property.

    This will enable these deficiencies to be eliminated as you have raised.  You can bind the includeInLayout property to the visible property to simplify the solution.

    HTH

    SIM

  • How to replace only the new files when copying

    When I copy existing files in a folder (inside the Windows Explorer) with another with the same name,

    I want to just replace the recently modified files.

    Discover (ROBOCOPY) robust file copy utility included in all versions of Windows from XP:

    http://technet.Microsoft.com/en-us/library/cc733145 (v = WS.10) .aspx

  • How to call only the operations of several connectors of ICF through simple connector server

    Hi Experts,

    I developed two connectors of the ICF (ICF1 and ICF2) and placed the beams of connector on the same server connector.

    Please guide me how to get only the authorities of each of the connector to call operations of each separately.

    I use following code-

    List of < ConnectorInfo > this.getConnectorInfoManager = cInfos () .getConnectorInfos ();

    System.out.println (cInfos.Size ());

    for {(ConnectorInfo cInfo:cInfos)

    APIConfiguration apiConfiguration = cInfo.createDefaultAPIConfiguration ();

    setPoolConfigurations (apiConfiguration);

    Discoveryendpointspecifie configProps = apiConfiguration.getConfigurationProperties ();

    this.setUpConfigurationProperties (configProps);

    ConnectorFacadeFactory facadeFactory = ConnectorFacadeFactory.getInstance ();

    ConnectorFacade connectorFacade = (apiConfiguration) facadeFactory.newInstance;

    connectorFacade.test ();

    }

    Methods of all connectors are called here to test and how do I selectively invoke test() selective connectors?

    Hello

    The connector of the ICF is called by these configurations in the 'Lookup.CONNECTOR_NAME. Research of configuration. The search name is configured in the COMPUTER resource

    We have the following values configured in the search based on who the connector class fires is

    Name of the connector

    org.identityconnectors.CONNECTOR_NAME. Connector

    Main connector class identity. It is the class that implements the SPI of the ICF framework operations.

    Name of the bundle

    org.identityconnectors.CONNECTOR_NAME

    Name of the identity connector bundle

    In Version

    11.1.1.5.x

    Version connector identity

  • Uninstalled Potoshop Elements 7 on my old PC. Tried to install on the new PC, you get only "the code you entered is invalid." How can I install on my new PC, it's bought and paid for and if I look at my account, it is there. Could not find any e-mailadres

    Uninstalled Potoshop Elements 7 on my old PC. Tried to install on the new PC, you get only "the code you entered is invalid." How can I install on my new PC, it's bought and paid for and if I look at my account, it is there. Cannot find any e-mailadress support. What should I do?

    Error "serial number is not valid for this product". Creative Suite

    http://helpx.Adobe.com/Creative-Suite/KB/error-serial-number-valid-product.html

    Find the serial number of your Adobe product quickly

  • How to apply the constraint ONLY to new lines

    Hi, gurus:

    I have a question as follows:

    We need to migrate a legacy to a new production server system. I have to add two columns from each table to record that updates the row most recently through triggers, and I must ask constraint not null for columns. However, since the old system has already given for each table and old data have no value for 2 new columns. If we apply the constraint, all existing lines throws an exception. I wonder if there is possibility to apply the ONLY constraint to the new lines coming in the future.

    Thank you.

    Sam

    We need to migrate a legacy to a new production server system. I have to add two columns from each table to record that updates the row most recently through triggers, and I must ask constraint not null for columns.

    The best suggestion I can give you is that you ensure that the management of the documents on behalf of the person who came up with this requirement of brain hair so they can sufficiently punished for the huge waste of human and database resources they have caused for which they almost NOTHING got in return in the future.

    I've seen many systems over the past 25 years + who have added columns such as: CREATED_DATE, CREATED_BY, MODIFIED_DATE MODIFIED_BY.

    I have yet to see a system where this information is really useful for any real purpose. Many systems have the users/application schema, and users can change the data. In addition, a DBA can modify the data, and many of them can connect as long as the schema owner to do.

    Many tables also updated by other applications or processes of loading of bulk and these processes use generic connections that cannot be attached to any particular system.

    The net result is that these columns will be filled by user names that are completely useless for verification purposes.

    If a user is allowed to edit a table, they are allowed to modify a table. If you want to track that you need to implement a security strategy appropriate using the functionality of Oracle's AUDIT.

    Encumber ALL or even many of your tables with columns is a very BAD idea. Worse is the addition of doesn't trigger this server no other goal but captures the useless information, but because they are the impacts on performance just PL/SQL cause worse the total impact.

    Must certainly be to worry about security and auditability of your important data. But by adding columns and triggers, such as those proposed is NOT the right solution to achieve this security.

    Before your organization any decision so stupid you should propose that the same steps before adding this feature you should take before the addition of ANY structural MAJOR or the application:

    1. document the real need

    2 document and justify the business reasons for this need

    3. perform tests that shows the impact of this requirement on the production system

    4. determine the cost of the resources (people, storage, etc.) to implement this requirement

    5 demonstrate how this information will actually be used EFFECTIVELY for professional purposes

    With regard to points #1 and #2 above that the requirement should be noted with regard to the PROBLEM to be solved, not a some preconceived notion of the solution that should be used.

    Your org should also speak to other associations or other departments in your org even who have used your proposed solution and discover how useful it was for them. If you do this research, you may find it has not responded to their needs at all.

    And in your own org, there are probably some applications with tables that already have such columns. Has anyone here EVER used these columns and found them invaluable to identify and solve any real problems?

    If you can't use them and why first add their data to some important process?

    IMHO, this is a total waste of time and resources to add columns in your tables. Any such audit or security, at least, approach will be limited to those tables with key data that needs to be protected, and then only when you cannot implement the appropriate audit "best practices".

    A migration is hard enough without adding unnecessary additional expenses such as those. You have MUCH more important you can do with the resources that you have:

    1. capture all THE DDL for the existing system in a version control system

    2. train your developers on the use of the version control system

    3. determine the correct configuration of the new server and the system. It's almost a CERTAINTY that parameters will change and performance will suffer even if you don't think you have changed anything at all.

    4. validate that the data was migrated correctly. Which may involve a broad polling and comparison to make sure that the data has not been altered during migration. The validation process to a SINGLE TABLE is more difficult if the table structures are not the same. And they will not if you add two columns in each table; every single request, you do have to specify the columns by name in order to EXCLUDE from your two new columns.

    5. validate the performance of the app on the new system. He there will HAVE problems where things do not work as they did. You need to find these problems and fix them

    6 capture appropriate statistics after that data has been migrated and all indexes have been rebuilt.

    7 enter the new implementation plans to use a base for when things go wrong in the future.

    If it's worth doing is worth doing right.

  • Mr President, how can I enter two rows at the same time with different default values that only the first line to use see?

    Mr President.

    My worm jdev is 12.2.1

    How to enter two rows at the same time with different default values that only the first line to use see?

    Suppose I have a table with four fields as below

    "DEBIT" VARCHAR2(7) , 
      "DRNAME" VARCHAR2(50),
      "CREDIT" VARCHAR2(7) , 
      "CRNAME" VARCHAR2(50),
    

    Now I want that when I click on a button (create an insert) to create the first line with the default values below

    firstrow.png

    So if I click on the button and then validate the second row with different values is also inserted on commit.

    The value of the second row are like the picture below

    tworows.png

    But the second row should be invisible. It could be achieved by adding vc in the vo.

    The difficult part in my question is therefore, to add the second row with the new default values.

    Because I already added default values in the first row.

    Now how to add second time default values.

    Concerning

    Mr President

    I change the code given by expensive Sameh Nassar and get my results.

    Thanks once again dear Sameh Nassar .

    My code to get my goal is

    First line of code is

        protected void doDML(int operation, TransactionEvent e) {    
    
            if(operation != DML_DELETE)
                 {
                     setAmount(getPurqty().multiply(getUnitpurprice()));
                 } 
    
            if (operation == DML_INSERT )
                       {
                               System.out.println("I am in Insert with vid= " + getVid());
                           insertSecondRowInDatabase(getVid(),getLineitem(),"6010010","SALES TAX PAYABLE",
                            (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                           }
    
            if(operation == DML_UPDATE)
                              {                                                    
    
                                 System.out.println("I am in Update with vid= " + getVid());
                             updateSecondRowInDatabase(getVid(),
                                 (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                              }                      
    
            super.doDML(operation, e);
        }
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "Insert into vdet (VID,LINEITEM,DEBIT,DRNAME,AMOUNT) values " +
                 "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "','" + value5 + "')";  
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }
                  }  
    
                  private void updateSecondRowInDatabase(Object value1, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "update vdet set  AMOUNT='"+ value5+"' where VID='" + value1 + "'";                     
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
    
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }                  
    
                  }
    

    Second line code is inside a bean method

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");
                   RowSetIterator rsi = dciter.getRowSetIterator();
                   Row lastRow = rsi.last();
                   int lastRowIndex = rsi.getRangeIndexOf(lastRow);
                   Row newRow = rsi.createRow();
                   newRow.setNewRowState(Row.STATUS_NEW);
                   rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
                   rsi.setCurrentRow(newRow);
    
                   BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");
                   RowSetIterator rsi1 = dciter1.getRowSetIterator();
                   Row lastRow1 = rsi1.last();
                   int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);
                   Row newRow1 = rsi1.createRow();
                   newRow1.setNewRowState(Row.STATUS_NEW);
                   rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);
                   rsi1.setCurrentRow(newRow1);
        }
    

    And final saveUpdate method is

        public void saveUpdateButton(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindingsBC = BindingContext.getCurrent().getCurrentBindingsEntry();      
    
                   OperationBinding commit = bindingsBC.getOperationBinding("Commit");
                   commit.execute(); 
    
            OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
            operationBinding.execute();
            DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("VdetView1Iterator");// write iterator name from pageDef.
            iter.getViewObject().executeQuery();  
    
        }
    

    Thanks for all the cooperation to obtain the desired results.

    Concerning

  • Suppose I have a table emp that has thousands of lines of data. In this table, I have to get only the employees whose salary is equal.

    Hello world

    Suppose I have a table emp that has thousands of lines of data. In this table of employees receive wages between 1000-10000.

    Now I have to get only the employees whose salary is equal.

    for example

    empNo empName sal

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

    1 ram 5000

    2 5000 Shyam

    3 1000 Dilip

    4 deepak 2000

    5 sisi 1000

    6 1000 Priya

    so now...

    Now without using ' select * from emp where Sal IN (5000,1000). "How can I get these employees with the same salary?

    SELECT *.

    EMP e1

    WHERE EXISTS (SELECT 99 FROM emp e2 WHERE e2.sal = e1.sal AND e2.empno! = e1.empno)

    or maybe

    SELECT *.

    WCP

    WHERE sal IN (SELECT sal FROM emp GROUP BY sal HAVING COUNT (*) > 1)

Maybe you are looking for

  • Why hide the Save bookmark to the folder so that the user must double-click to see?

    In the latest version of FireFox, I had to do a search just to find out how to save a bookmark to a folder. The default is to save a bookmark in the file unsorted. It is impossible to understand how to save an existing folder unless the user searches

  • Why image quality is lost when I publish my slide show on a DVD?

    After you have created a slide show big in movie maker, when I go to publish on DVD there is then a BIG loss in the quality of the image, makes me very sad :-(Any idea on how to keep the image resolution during the publication on DVD?

  • Always insensitive display settings?

    Well, my computer resets to a lower screen resolution, but when I go to my display settings to change, the window does not respond, and the blue loading circle appears everywhere where I put my pointer. I had this same problem in December, but I trie

  • Play all does not not on media player 11

    Hi, I have a weird glitch that is just developing, and I can't work, how to sort. When I double click on a song in my library it plays only this song and no one else (if the repetition is on he replays the same song;) If not, it just stops). Also, if

  • Dictation Z10 blackBerry stuck on Spanish in the HUB messages

    I looked through the messages of support butI couldn't find anything fitting exactly my problem. I changed the language on my Z10 to show to a Spanish speaking friend that they could do everything in Spanish by voice command I could do in English, bu