What is the wriong with this statement as some times it is not working

Hi
Please fnd below code
UPDATE napp_ngs3pr_onhand_stg nn3o1
SET nn3o1.status = 'ERROR'
,nn3o1.error_message = 'Duplicate Record'
,nn3o1.last_updated_by = p_user_id
,nn3o1.created_by = p_user_id
,nn3o1.request_id = p_request_id
,nn3o1.file_name = NVL (p_file_name, nn3o1.file_name)
,nn3o1.last_update_date = l_sysdate
WHERE nn3o1.status = 'NEW'
AND partner_name = p_partner_name
AND nn3o1.ROWID > any (select nn3o2.ROWID
FROM napp_ngs3pr_onhand_stg nn3o2
WHERE 1=1 --status IN ('NEW', 'SUCCESS', 'ERROR')
AND nn3o1.partner_name = p_partner_name
AND nn3o1.subinventory = nn3o2.subinventory
AND TRUNC (nn3o1.onhand_date) = TRUNC (nn3o2.onhand_date)
AND nn3o1.part_number = nn3o2.part_number
above query is not working properly some times when two files contains same data and loaded into table and processed one by one in diffrent sessions which are follwed each other.
If I use dbms_lock.sleep in procedure to invoke the second procedure then above statement working properly.
Please adivse.
Thanks
Raghav

Hi, Raghav,
Sorry, I don't know what you need.
Whenever you have a question, post
(1) The version of Oracle you're using
(2) A little sample data *just enough to show what the problem is)
(3) The results yu want from that sample data
Your query can be useful, too. Always format code, and post it between {code} tags to preserve the formatting on this site.

Similar Messages

  • Please tell me what is the problem with this code

    Hai,
    Iam new to Swings. can any one tell what is the problem with this code. I cant see those controls on the frame. please give me the suggestions.
    I got the frame ,but the controls are not.
    this is the code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ex2 extends JFrame
    JButton b1;
    JLabel l1,l2;
    JPanel p1,p2;
    JTextField tf1;
    JPasswordField tf2;
    public ex2()
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setTitle("Another example");
    setSize(500,500);
    setVisible(true);
    b1=new JButton(" ok ");
    p1=new JPanel();
    p1.setLayout(new GridLayout(2,2));
    p2=new JPanel();
    p2.setLayout(new BorderLayout());
    l1=new JLabel("Name :");
    l2=new JLabel("Password:");
    tf1=new JTextField(15);
    tf2=new JPasswordField(15);
    Container con=getContentPane();
    con.add(p1);
    con.add(p2);
    public static void createAndShowGUI()
    ex2.setDefaultLookAndFeelDecorated(true);
    public static void main(String ar[])
    createAndShowGUI();
    new ex2();
    }

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ex2 extends JFrame
        JButton b1;
        JLabel l1,l2;
        JPanel p1,p2;
        JTextField tf1;
        JPasswordField tf2;
        public ex2()
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            setTitle("Another example");
            b1=new JButton(" ok ");
            p1=new JPanel();
            p1.add(b1);
            p2=new JPanel();
            p2.setLayout(new GridLayout(2,2));
            l1=new JLabel("Name :");
            l2=new JLabel("Password:");
            tf1=new JTextField(15);
            tf2=new JPasswordField(15);
            p2.add(l1);
            p2.add(tf1);
            p2.add(l2);
            p2.add(tf2);
            Container con=getContentPane();
            con.add(p1, BorderLayout.NORTH);
            con.add(p2, BorderLayout.CENTER);
            pack();
            setVisible(true);
        public static void createAndShowGUI()
            ex2.setDefaultLookAndFeelDecorated(true);
        public static void main(String ar[])
            createAndShowGUI();
            new ex2();
    }

  • Vector, what is the problem with this code?

    Vector, what is the problem with this code?
    63  private java.util.Vector data=new Vector();
    64  Vector aaaaa=new Vector();
    65   data.addElement(aaaaa);
    74  aaaaa.addElement(new String("Mary"));on compiling this code, the error is
    TableDemo.java:65: <identifier> expected
                    data.addElement(aaaaa);
                                   ^
    TableDemo.java:74: <identifier> expected
                    aaaaa.addElement(new String("Mary"));
                                    ^
    TableDemo.java:65: package data does not exist
                    data.addElement(aaaaa);
                        ^
    TableDemo.java:74: package aaaaa does not exist
                    aaaaa.addElement(new String("Mary"));Friends i really got fed up with this code for more than half an hour.could anybody spot the problem?

    I can see many:
    1. i assume your code snip is inside a method. a local variable can not be declare private.
    2. if you didn't import java.util.* on top then you need to prefix package on All occurance of Vector.
    3. String in java are constant and has literal syntax. "Mary" is sufficient in most of the time, unless you purposly want to call new String("Mary") on purpose. Read java.lang.String javadoc.
    Here is a sample that would compile...:
    public class QuickMain {
         public static void main(String[] args) {
              java.util.Vector data=new java.util.Vector();
              java.util.Vector aaaaa=new java.util.Vector();
              data.addElement(aaaaa);
              aaaaa.addElement(new String("Mary"));
    }

  • My computer died and I had to buy another one.  Now I can't sync my ipod classic.  What is the deal with this?  I added songs about three months ago and it was fine.  Now it won't sync.  It says it has a duplicate file.

    My computer died and I had to buy another one.  Now I can't sync my ipod classic.  What is the deal with this?  I added songs about three months ago and it was fine.  Now it won't sync.  It says it can't sync because there is a duplicate file.

    There are server problems right now with iMessage effecting some users.  See http://www.apple.com/support/icloud/systemstatus/.

  • What's the go with this latest update. Half my apps don't work and the iPad runs slower? How do I go back to the old operating system?

    What's the go with this latest update. Half my apps don't work and the iPad runs slower? How do I go back to the old operating system?

    Make sure your apps are updated.  You might try Settings > iTunes & App Store > Automatic Downloads - Updates = "On".
    You cannot go back to an old operating system.

  • HT202213 My apple TV no longer finding my movies and photos. What's the deal with this?

    My apple TV no longer finding my movies and photos. What's the deal with this?

    That would be awesome, if the nearest service area wasn't 4 hours away.... It would cost me just as much in gas to drive down there as it would just to buy a cheap replacement off of ebay...

  • Trying to set up a linksys router but the cd says it works with OSX 10.6 and later. I am currently running the newest version of mountain lion.... what is the matter with this OSX   update needed?

    trying to set up a linksys router but the cd says it works with OSX 10.6 and later. I am currently running the newest version of mountain lion.... what is the matter with this OSX   update needed?

    Your install disk must look like this
    and not like this.
    Those gray disks are machine specific and will only work with model of Mac that they shipped with.

  • What is the deal with this thing?

    My computer no longer recognizes my ipod mini, won't charge it, or anything. It isn't responding to anything. I have tried resetting it so many times. All it does is show the "Do not disconnect." screen, and the backlight turns on when I press a button on the click wheel. My computer does not acknowledge that the ipod is connected to it at all, so I just diconnected it. However, the screen still says the same thing! I cannot find anyway to get some help off the Apple site. There are e-mail addresses or anything, which is completely annoying. My ipod mini is 13 months old and cost way too much money for this to be happening. Is it lost for good? What is the deal with this thing? Seriously, please help.

    First of all, try another port on your computer. Some ports are not connected direct to the motherboard and do not recognize the iPod as well as those that are. Reset the iPod each time you connect it to another port.
    Still no joy, see these.
    Your Windows PC doesn't recognize iPod.
    iPod appears in Windows Explorer but does not appear in iTunes.
    iPod does not appear in iTunes.
    Fast user switching in Windows XP is not supported.
    Strange iPod behavior.
    When restoring the iPod, put it into disk mode first.
    Putting iPod into disk mode.

  • What is the deal with this frekin battery life, it wont even make it through a 10 hour work day, very angry with this iphone 4s

    what is the deal with this freaking short battery life it is far less then apple advertises, This is pathetic....I bought this phone because it was advertised,....  to be the best on the market ...........................any suggestions?

    Wait for the software update that Apple has already said will be coming in a few weeks.

  • I was playing candy crush and I had too much problem with my bill your charge too much I want to know what is the problem with this game cost

    HELLO
    I was playing candy crush and I had too much problem with my bill your charge too much I want to know what is the problem with this game cost

    Take it up with iTunes Support - we are not Apple here, we are just users like you:
    http://www.apple.com/support/itunes/ww/
    Cheers,
    GB

  • What is the problem with this Stored Procedure

    Hi ,
    What is the problem with this Stored Procedure ?Why is it giving errors ??
    CREATE or replace  PROCEDURE getEmpName
    *(EMP_FIRST OUT VARCHAR2(255))*
    BEGIN
    SELECT ename INTO EMP_FIRST
    FROM Emp
    WHERE EMPNO = 7369;
    END ;
    */*

    You don't specify precision in procedure arguments.
    (EMP_FIRST OUT VARCHAR2(255))should be
    (EMP_FIRST OUT VARCHAR2)Since you asked what's wrong with it, I could add that it needs formatting and the inconsistent use of upper and lower case is not helping readability.

  • HT1386 how can i do this in the itunes 11? the "Sync with this [device] over Wi-Fi" option is not available in the summary

    the "Sync with this [device] over Wi-Fi" option is not available in the summary part on the new itunes. Anyone know where this option is on itunes 11?

    If you feel misled then that is how you feel and I understand that. You are entitled to feel that way. But the iPad DOES work with Leopard 10.5.8 but you have to sync with the cable. When I bought my iPad1 - I was using a MacBook running 10.5.8. I upgraded to Snow Leopard in anticipation of the next generation of Apple iDevices and this past Christmas I received a new MacBook Pro running Lion 10.7. I still have the MacBook running Snow Leopard and my wife uses that one as her own laptop now.
    As the iPad became more popular - users cried for a PC free device as well and now the iPad is PC free as long as you are running iOS 5. So apple has provided a way to use an iPad without the need for a computer at all. I really believe that Apple has provided a way for many people to take advantage of their newest device and it does not necessitate the purchase of a new computer or OS.
    I am by no means defending Apple, but I think they have done a pretty amazing job with a device that is still just under two years old. It is still "backwards" compatible with two older versions of Mac Operating systems and with two MS operating systems as well.
    I realize that everybody cannot dump their current computer and OS every time a new device hits the market, but at some point, software is upgraded, computers are upgraded and new phones, MP3 players, iPods, and iPads are released. Unfortunately, if you want the latest and greatest technology, sometimes you just have to bite the bullet and spend the money.

  • What is the problem with this code?

    dear sirs...
    i have a page that does not contain any binding, it contains the following event:
    public void onCheck(DataActionContext ctx)
    ViewObject V=ctx.getBindingContext.findDataControl("AppModuleDataControl").getApplicationModule.findViewObject("empview1");
    V.setWhereClause("");
    V.executeQuery();
    V.first();
    note that the above code works if the table emp is on the page, however, if the page is not bound to the page (it does not contains the table) the statement in the bold will fire an exception saying that there is no binding. i am sure the V is not set to null.
    another problem appears, if i put the table and execute it within jdeveloper, it works correctly, however, if i run if i deploy the application into application server, the code never runs as if there is some kind of an error.
    i hope that you can anser me about the following;
    1- if the code above correct?
    2- how can i view the log for the application?
    3- System.out.println("test"); in jdeveloper works okay, in the application server, does it cause some kind of an error?
    thanks for any help & best regards

    If you don't close the ResultSet, different things happen based on which database you're running. You can keep read locks that you don't need. It wastes resources, and as different databases react differently to it, you might have weird bugs down the road that result from your practices of not properly closing ResultSets, PreparedStatements, and Connections. Put this in a loop like you've got here, and the effects may or may not get amplified.
    I write a close() for a ResultSet just as soon as I open it, just to make sure I don't forget. In a situation like this one, I would write something like so:
    for(int i = 0;i<someValue;i++)
    try
    //some code
    rs = pstmt.executeQuery();
    //some code that uses rs
    catch(Exception e)
    finally
      if (rs != null)
        rs.close();
      if (pstmt != null)
        pstmt.close();
    }

  • What is the problem with this Xcopy in PostBuild?

    I am having the following post-build command in a Visual Studio project:
    xcopy  $(ProjectDir)Data $(OutDir)\
    The Data is a directory in the project folder which I want to have copied to bin/debug or bin/release after build completes successfully.
    I am getting an error as below:
    The command "xcopy  E:\Lavanya Deepak\Projects\matrimonial\Data bin\Debug\" exited with code 4.

    Why are you using Xcopy for something that Visual Studio can do already?
    http://support.microsoft.com/kb/306234
    http://msdn.microsoft.com/en-us/library/0c6xyb66%28v=vs.80%29.aspx
    Besides, this is a issue with XCOPY, not with Visual C# or Visual Studio (wich this forum is about). Perhaps you better look into the documentation or ask in a admin Forum?
    -1 for not an answer to the question.
    This does not address the need for XCOPY. This is NOT an answer. How does this help transfer *.ascx files along with the compiled code behind into the respective directories of a local website for debugging.  Umbraco requires this as an example.
    Also, this could be an issue with Visual studio as the XCOPY works in VS 2012 and via the command prompt but NOT VS 2013 for me.

  • What is the problem with this block

    i create atable with one column a write ablock to insert the numbers 1 to 10 except 6,8
    but this block insert all values even 6,8 so why my condition does not work
    this is the block:
    declare
    i number :=1;
    begin
    while (i<=10) and (i!=6 or i!=8) loop
    insert into work (result) values(i);
    i:= i+1;
    end loop;
    end;

    test@ora>
    test@ora>
    test@ora> --
    test@ora> set serveroutput on size 1000000
    test@ora> declare
      2    i number :=1;
      3  begin
      4    while (i<=10) and (i!=6 or i!=8) loop
      5      dbms_output.put_line('i = '||i);
      6      i:= i+1;
      7    end loop;
      8  end;
      9  /
    i = 1
    i = 2
    i = 3
    i = 4
    i = 5
    i = 6
    i = 7
    i = 8
    i = 9
    i = 10
    PL/SQL procedure successfully completed.
    test@ora>
    test@ora>
    test@ora> --
    test@ora> set serveroutput on size 1000000
    test@ora> declare
      2    i number :=1;
      3  begin
      4    while (i<=10) loop
      5      if (i!=6 and i!=8) then
      6        dbms_output.put_line('i = '||i);
      7      end if;
      8      i:= i+1;
      9    end loop;
    10  end;
    11  /
    i = 1
    i = 2
    i = 3
    i = 4
    i = 5
    i = 7
    i = 9
    i = 10
    PL/SQL procedure successfully completed.
    test@ora>
    test@ora>
    test@ora>isotope

Maybe you are looking for

  • How to use Logical database in function module?

    I will create a function module in HR. but how to use Logical database  in function module ?  Logical database PNP always show screen.in function (RFC) code , it is a matter.

  • Mac Pro won't boot after forced shutdown

    Hi all, hopefully someone will be able to help with this. This is a Mac Pro (don't have the exact spec right now, but will have later, I think it's a dual), which is used to run ProTools. It has no internet or network connections. It's running OS X 1

  • Can't get IPOD to work with CD player in car

    I have an ipod fifth generation Model number A1136 and a Pioneer DEH-21ooIB and i keep getting message number 11 which in the manual says its a communication failure and to disconnect the cable from ipod once ipod main menu is desplayed connect the c

  • Can't import CDs into iTunes

    This is a repeat of a problem that I reported back in Oct, but never got any solution. When I first installed iTunes on this computer I was able to copy a CD into iTunes with no problem. Since that time I haven't been able to copy another CD. I unins

  • 12 days of christmas keeps crashing

    12 days of christmas app keeps crashing. I have deleted and reinstalled it, signed out of my itunes and signed back in, and restarted my phone several times, and my phone keeps crashing.