Any chance to rewrite this code?

Can this code be rewritten more efficiently?

Oracle version: 10.2
 PROC_CODE             SYS_REFCURSOR;
 
 IF (OBJ_NAME = 'PROC' OR OBJ_NAME = 'MAT1') AND RGN_CODE = 'EU'
   THEN
      OPEN PROC_CODE FOR
         SELECT   PROC_EXT_UNIQ_ID,
                  PROC_ASSIGNED_TO,
                  PROC_OWNER_EXT_UNIQ_ID,
                  PROC_CUST_EXT_UNIQ_ID
           FROM   TRACK_BIU_PROC
          WHERE   PROC_COUNTRY_CODE = RGN_CODE AND SKIP_FLAG = 'A' 

      LOOP
         FETCH PROC_CODE
            INTO
                      PROC_UNIQ_ID, PROC_ASSIGNED_TO, PROC_OWNER_ID, PROC_CUSTOMER_ID;
        
         EXIT WHEN PROC_CODE%NOTFOUND;

         IF PROC_ASSIGNED_TO IS NULL AND PROC_OWNER_ID IS NULL
         THEN
            BEGIN
           
               SELECT   MANH_MGR
                 INTO   ASH_WM_CD
                 FROM   HEW_RAM_MASTER
                WHERE   MANH_NO = PROC_CUSTOMER_ID
                        AND FETCH_CODE = p_ftcode;
            EXCEPTION
               WHEN NO_DATA_FOUND
               THEN
                  ASH_WM_CD := '+';
            END;
Published by: BlueSkies July 18, 2012 06:03

Use SQL Direct does not use REFCURSOR. Your two SQL can be combined like this.

 select t.proc_ext_uniq_id,
     t.proc_assigned_to,
     t.proc_owner_ext_uniq_id,
     t.proc_cust_ext_uniq_id,
     nvl(h.manh_mgr, '+') manh_mgr
   from track_biu_proc t
   left
   join hew_ram_master h
     on h.manh_no = t.proc_customer_id
    and h.fetch_code = p_ftcode
  where t.proc_country_code = rgn_code
    and t.skip_flag = 'A' 

Tags: Database

Similar Questions

  • Pass the array to the formula node Eval (any chance to avoid this?)

    Hello

    I have not installed on my PC of MATLAB.

    I need to be able to say from the entry Panel custom formula "y = sin(Fm*2*pi*t[i]) + 2 * sin(3*Fm*2*pi*t[i]) + 3 * sin(4*Fm*2*pi*t[i])..."

    This form may contain a variable of harmonics (sine or cosine functions), but strict number of input parameters: Fm, t [i].

    FM - is a frequency.

    [i] t - is a time (ramp model) which is a table

    Can I pass array as a parameter of t [i] entry in formula node? How to do what other parameters, which are constants?

    Is there another method how to implement this - using the variable functions count?

    You are still far too complicated and it's still not scalable for a variable number of terms. You must be able to get out of math based text and think in terms of real LabVIEW.

    Here's a quick example using the terms in your first post (I show only a picture, because I have more LabVIEW 7.1).

    Modify if needed.

    NOTE:

    If you have more than a couple of terms generally, I tenacious feel that it would be simpler to configure a table complex stick (with the desired amplitude and frequency positions) and do an inverse FFT on this.

  • iTunes has charged my bank instead of use the balance on my iTunes. Any chance to stop this?

    I just bought and sent a gift card only to discover that my Bank has been accused and not my iTunes account. How to reverse the charge to use the bank account to use my iTunes account balance.

    A gift card is not electronic media, so probably not eligible for usage of your iTunes Store credit.  credit balance iTunes Store can be used for all types of electronic media, including songs, apps, ebooks, audio books, movies (or rental), TV shows, etc.  Another example: charitable donations.  The iTunes Store has recently provided a way to make a donation to support the restoration of the disastrous flood of Louisiana.  But you can't use your iTunes Store credit. payment came from your designated payment method Apple ID.

  • Hi, I m looking for a decoding of the 0x6101be5 fault code. Any idea to solve this problem?

    Hi, I m looking for a decoding of the 0x6101be5 fault code. Any idea to solve this problem?

    Type of the printer is Photosmart D5460

    Thanks a lot for hel

    steviedanielle

    It could be a work around. each time u replace each cartridge. Turn on the printer and check if that make all the difference... Although the chances of losing these cartridges are more unless your next printer uses the same cartridge

  • Help with this code please...

    Hi all

    I have a repeating line in a table (+ \-bouton on each line to add / remove). On each line, the user selects a value in a list drop-down down (drop-down list is filled with a literal JavaScript object if it has no chance)

    What I have to do is to check the duplicate drop-down selections on different lines and warn the user that they have selected a value twice.

    I currently have this code in the change event of the ComboBox that works very well, but for the first line only -how to twist it works for all instances of the repeated line "FullRowSubForm"?

    If (xfa.event.newText is form1. WorkforceDepSubForm.WorkforceLineSubform.FullRowSubForm.RepeatableRow.WorkforceRow1. WorkforceNameTextField.rawValue)

    {

    xfa.host.messageBox ("BEWARE you have already selected" + xfa.event.newText + "\n" + "\n" + "that one instance of dependencies should be chosen - please choose another addiction or delete.");

    }


    Thanks in advance

    Ellis

    Hello

    Your repetitive element is FullRowSubForm, don't know if that's right... it maybe too .parent is in the code to add

    In any case, it should work.

    If (form1. WorkforceDepSubForm.WorkforceLineSubform.resolveNodes ("FullRowSubForm. [RepeatableR OE. WorkforceRow1.WorkforceNameTextField ==------"" + xfa.event.newText + "\"]").length > 0) {}

    Concerning

    Bruce

  • This code cannot possibly. Why is it a failure?

    LV 2010 (Yes 2010), Win Vista.

    I have a SCREEN UPDATE event, occurring at 2 Hz.

    The event features an array of values, one for each channel.

    Four CHANNEL SELECTORS lead an INDEX TABLE operation.

    The four selected channels are shown separately on digital indicators and then combined with a waveform graph.

    The small subVIs are there to produce a NaN value to draw if the channel selector is - 1 (none).

    Currently, they are modified to generate a value for "123.0", for debugging purposes.

    AID indicates that the TABLE INDEX will produce a default value of 0 if the input index is outside the bounds of the array.

    However, in certain circumstances (see JING http://screencast.com/t/0kO0GDhlo0E), indicators of the "VALUE of the GRAPH' fail to update.

    In this video, I put the indicators to the values of 1, 2, 3, 4, before to start the program.

    I DO NOT set the DEFAULT value, simply enter the numbers in the lights on the Panel.

    The two selected channels are apparently normally updated.  The other two, who remain at ZERO (-1) do not update.

    I expect to see a zero, or SOMETHING, but the '3' and '4' never change.

    This code is called, as evidenced in the table of progress, but the values do not change.

    If I change the channel on a direct channel, then back to ZERO, it returns 0.  Which is expected.

    But why it isn't updated first?

    If I exchange the channel around selectors, the problem swaps with her. Any selector set to NONE has the corresponding indicator unchanged compared to the starting value.

    ON THE CODE:

    It is a CONCAVE VI, inserted in a secondary SCHOOL.

    Here is the embed code:

    The idea is that each control on the page is a secondary, each will receive an instance of a VI.

    For each school, I open a new ref becomes this VI (he put to be reentrant) and insert this ref in the secondary.

    I put a few values of control and launch it running.

    HIGHLIGHTS:

    1... If I change the OPTIONS = 8 options = 0 in the above, the problem goes away. Everything works as expected.

    2... N = 1 in the above, is simply to limit the number of instances, for debugging purposes.

    3... I get no error at any time.

    4... I tried with and without wire at the entrance to REFNUM REFERENCE OPEN VI VI TYPE SPECIFIER.  No change.

    A research on this topic raises some issues of 2008 with LV 8.0, and a suggestion there to serve the point inserted into a LIVING had no effect here.

    So, why not the seeing if the index is - 1, initially?  It's as if the code is not there.

    And why making it not reentrant fixed it?

    (I think I got this way so I can have multiple instances).


  • Any chance of volume being increased beyond maximum on a laptop

    original title: hearing is damaged by chemotherapy any chance of volume being increased beyond maximum on a laptop

    recent chemotherapy ruined my hearing of mid-range, is it possible that I can increase the volume on my laptop, an amilo fujitsu, without dragging round additional speakers, beating rather point to have a laptop

    Hi Vaughan,

    Please contact Support technique Fujitsu http://www.fujitsu.com/us/support/ for help with this computer-specific issue (and change the country up if necessary before you start).

    Good luck!

    Kosh

  • Need help solving any internet connection. This happened to me several months ago and the supplier

    Need help solving any internet connection. This just started today, but it's happened to me several months ago and at that time the provider thought it was software related and suggested that I have to contact HP. I have a HP 2006 m7674n, Windows XP. For several days, I worked with HardBeatZ on a different issue that has been resolved today. However, for several days, I had been working msconfig to track down the cause of the problem; This resulted in several reboots the computer - this would have something to do with it? Also, I just started getting a RUNAS box popping up. HardBeatZ has provided a link to a possible solution to this, but since I can't do internet connection I can't get the fix. Right now I'm on a laptop with Wi - Fi for the same service internet/modem as my PC. I changed nothing onmy PC in the last days of several for the internet connection or services.  I always use eithernet connection from the router to the computer. I tried Wi - Fi today with my PC but not connect. I tried to unplug the router and reconnect but it does not solve the problem. I did a Network Diagnostic and printed the report; Here are the warnings and error messages in this report:

    1. under the terms of the bridge diagnosis; Warning: "www.microsoft.comcould hostname not be resolved (0x2afc error code). Could be the gateway or DNS problem.

    2. under diagnosis of layer IP; Corrupted IP routing table. Default route, road closures, route host itinerary local subnet and local are all valid; Invalid entries in the ARP cache. ACTION: the ARP cache has been emptied. »

    3. UNDER HTTP, HTTPS, FTP Diagnostic; all three had this warning: ' 12007 connection error at www.microsoft.com: the server name or address cannot be resolved. " and the error was unable to establish a connection.

    Still under network adapter diagnosis; It shows the connection status of network as "connected."

    Also, I have an older computer that I connected with eithernet and was able to connect to the internet but has been disconnected because the version of Windows is too old to support the connection. But I could briefly connecting on HP website before you log out. The point being I think it's a computer problem and not an internet router or provider problem.

    I read a few entries on this site and it seemed that the recovery of the system was the only solution. I hope that there are other things to try before I resort to that.

    I would appreciate any advice on the steps to diagnose the problem and insight as to what may have caused this to happen. Thank you. dt2012

    Sorry... still with you... OK, we know that your network card is good and we know that your first post;

    1. under the terms of the bridge diagnosis; Warning: 'host www.microsoft.com name could not be resolved (0x2afc error code). Could be the gateway or DNS problem.

    2. under diagnosis of layer IP; Corrupted IP routing table. Default route, road closures, route host itinerary local subnet and local are all valid; Invalid entries in the ARP cache. ACTION: the ARP cache has been emptied. »

    3. UNDER HTTP, HTTPS, FTP Diagnostic; all three had this warning: "error 12007 connecting to www.microsoft.com: the server name or address cannot be resolved." and the error was unable to establish a connection.

    4. still under network adapter diagnosis; It shows the connection status of network as "connected."

    For me, it seems that Internet Explorer is corrupted or damaged. Your computer is shipped with Microsoft Windows XP Service Pack 2 Media Center Edition 2005 but since you can have updated to XP SP3 or upgraded to a newer version of Internet Explorer. Please try the options listed in this document to Microsoft titled "how to reinstall or repair Internet Explorer" , since there are several options depending on your system configuration, please post if you need help to solve your problem.

  • Need help with this code to update the user interface example

    I'm triying to understand the differences between the three methods to manage UI interactions.
    I'm really confused with these three terms when triying them figure out in a real case.
    Basically, I know that I should use invokeLater, invokeAndWat, or getEventLock() to avoid
    This exception: java.lang.illegalStateException: engine access UI without holding the lock on the event

    The code below illustrates the function of the invokeAndWait method, but if I replace it with
    invokeLater or getEventLock() the program will work exactly the same way.
    Could you please change the code to show the differences between the three
    methods of updating the user interface?

    / public final class HelloWorldMainScreen extends form {}

    private LabelField labelField;
    public HelloWorldMainScreen() {}
    labelField = new LabelField ("Hello World");
    Add (labelField);
    Thread MainScreenUpdaterThread = new MainScreenUpdaterThread (this);
    thread. Start();
    }

    {} public void appendLabelText (String text)
    labelField.setText(labelField.getText()+"\n"+text);
    }

    }

    SerializableAttribute public class MainScreenUpdaterThread extends Thread {}
    HelloWorldMainScreen screen;

    public MainScreenUpdaterThread (screen HelloWorldMainScreen) {}
    this.mainScreen = screen;
    }

    public void run() {}
    for (int i = 0; i)< 10;="" i++)="">
    try {}
    Thread.Sleep (5000);
    } catch (InterruptedException ex) {};
    UiApplication.getUiApplication () .invokeAndWait (new Runnable() {}
    public void run() {}
    mainScreen.appendLabelText ("Update");
    }
    });

    }
    }
    }

    These three concepts are very confusing for a lot from people so all explanatory source code
    describing their functions will be highly useful for everyone, I think.

    Thanks in advance!

    With respect to the effect, there is no difference between methods.  The difference is the way in which the result is achieved.  So we can't change the code to show you the difference.

    As we are unable to demonstrate the difference, you have to do with an explanation.  To understand the explanation, you'll need to understand the thread of events, so if you have not already, please consider this:

    http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865

    If the three options are differentiated by the processing order:

    (a) invokeLater executes the update on the thread of events.  The transformation takes place at a later stage and the code which is in order after the invokeLater will actually run before the code within the invokeLater.

    (b) invokeAndWait also manages the update on the thread of events, which means that all other events that await on the thread of events will be run before this code.  But any code after the invokeAndWait will not be executed.

    (c) the synchronized option, like invokeAndWait, runs the update of the UI before moving on to the following code.  The difference is that the code to run on the event Thread is not executed before code in the synchronized block.

    If this is meaningless, so that probably does not matter too much.  in general, you should use invokeLater, except if you need to update the user interface occur in the order with your background processing.  If so, use invokeAndWait. It has synced are very few occasions where you must use the block, and it should be very small updates to the user interface and you should understand the implications this could have on the wire events.

  • Can someone explain why this code is not overwrite another file on the sd card?

    I use a table of bitmap with a few different images. According to a trigger, I want to change the wallpaper of the home screen blackberry in the image of my choice. I can do that for 1 single image, it is not updated while it should be. Here is my code, help! :

    * Note [D.kF] is an array of Bitmap

    * D.bgNumber evolves according to the program (that is to say, it takes a different image)

    Card graphics graphics = Graphics.create (D.kF [D.bgNumber]);

    Encoder JPEGEncodedImage = JPEGEncodedImage.encode(D.kF[D.bgNumber],100);
    try {}
    ExtendedFileConnection fconn = (ExtendedFileConnection) connector
    .the ("file:///store/home/user/pictures/image.jpg",
    Connector.READ_WRITE);
    fconn.enableDRMForwardLock ();
    {if(!fconn.) Exists())}
    fconn. Create();
    }
    OutputStream os = fconn.openOutputStream ();
    OS. Write (Encoder.GetData ());
    OS. Close();
    fconn. Close();
    } catch (Exception e) {}
    System.out.println ("output file error:" + e.getMessage ());
    }

    HomeScreen.setBackgroundImage("file:///store/home/user/pictures/image.jpg");

    Sorry, I borrowed this code for my own purposes, so I'm quite foggy as to its functions. I have just made a run through in the Simulator and noticed that the image has been "locked" in the actual file. He says DRM Forward Lock. Now I read a little about it and I thought it was a necessary element of this encoding.

    In any case, I reduced on the line of lock forward and his now appear correctly as the home screen. So I guess its resolved, but, you, what is the purpose of the lock?

  • Enter administrator or power on password system disable gave me this code 71570710 HP mini

    Please help me

    Enter the administrator or the power on password

    deactivation of the system gave me this code 71570710 HP mini

    71570710

    Try ablo.

    64458336

    REO

    I must inform you that these services are not endorsed by HP, and that HP is not responsible for any damages that may occur to your system using these services. Please be aware that you do so at your own risk.

  • This code (online) will not be validated... said obsolute

    Hello

    I have a simple div that W3C will not be validated. It is said to center align is deprecated

    < div align = "center" > my cool copy here... blah blah blah< / div >

    How can I Center my copy in a DIV, if I can't use this code?

    Any help is greatly appreciated

    Thank you!

    Babs

    Alignment attributes have been deprecated in HTML 4.

    HTML5 does not support.

    Nancy O.

  • How to optimize the performance of this code?

    I have two clips on a flash project. One of them is fixed and the other can be moved with the arrow keys of the keyboard. The two clips have irregular shapes, so HitTestObject and HitTestPoint does not work very well. I have a function that detects the collision of two clips using bitmap. I wanted to update the position of the Movie clip mobile so I put the function of collision detection under the ENTER_FRAME event listener code. It works fine, but when I add many fixed film clips (about 10 clips fixed in an image), the game (.swf file) becomes slower and slows down the performance of the PC. I thought that my collision detection function has a negative effect on the performance of the PC, so I used the class on this page: https://forums.adobe.com/thread/873737
    but the same thing happens.

    You told me how to do to speed up execution of my codes?

    Here's the part of my code:

    stage.addEventListener (Event.ENTER_FRAME, myOnEnterFrame);

    function myOnEnterFrame(event:Event):void

    {

    If (doThisFn) / / doThisFn is a variable to allow or prevent the kind of mobile film clip moved with arrow keys

    {

    If (left & &! right) {}

    Player.x = speed;

    Player.rotation = player.rotation - speed;

    }

    If (right & &! left) {}

    Player.x += speed;

    Player.rotation = player.rotation + speed;

    }

    If (up & &! down) {}

    Player.y = speed;

    }

    If (down & &! up) {}

    Player.y += speed;

    }

    The clips of film sets are wall1, wall2, wall3, wall4,... and so on
    the following code checks to see how many walls exist on each image and pushes them in table wallA

    for (var i: int = 0; i < 1000; i ++) / / you can put up to 1000 object of wall in the table wallA

    {

    If (this ['wall' + i]) / / if the wall object exists, push it into the table wallA

    {

    wallA.push (this, ['wall' + i]);

    }

    }

    for (i = 0; i < wallA.length; i ++)

    {

    If ( h.hitF (player, wallA [i]) | gameOverTest) / / this code checks whether or not the player (the mobile clip) hit the walls

    {

    trace ("second try");

    gameOver.visible = true;

    doThisFn = false;

    }

    }

    I think the following codes are easy to turn and run. I think that the performance problem is due to previous codes.


    If (player.hitTestObject (door))

    {

    Win.Visible = true;

    doThisFn = false;

    }

    If (key) / / if there is a key on chassis

    {

    If (player.hitTestObject (key))

    {

    Key.Visible = false;

    switch (currentFrame)

    {

    case 4:

    wallA [0] .visible = false;

    .x wallA [0] = 50000;

    break;

    case 5:

    wall14. Play();

    wall8.x = 430;

    break;

    }

    }

    }

    }

    }

    It's a simple question that doesn't usually have a simple answer.

    Here is an excerpt of a book (Flash game development: in a Social, Mobile and 3D world) I wrote.

    Optimization techniques

    Unfortunately, I don't know any way completely satisfactory to organize this information. In what follows, I discuss memory management first with sub-themes listed in alphabetical order. Then I discuss the management of CPU/GPU with subheadings listed in alphabetical order.

    This may sound logical, but at least, there are two problems with this organization.

    1. I don't think it's the most useful way to organize this information.

    2. memory management affects the CPU/GPU use, so that everything in the section of memory management can also be listed in the section CPU/GPU.

    In any case, I'll also list information in two other ways, from the easiest to the most difficult to implement and more for much less.

    Two of these later inscriptions are subjective and dependent on experience developer and capabilities, as well as environmental test and the test situation. I very much doubt there would be a consensus on the order of these lists.  However, I think that they are still valid.

    Easier to the more difficult to implement

    1. do not use the filters.

    2. always use the reverse for loops and avoid loops and avoid while loops.

    3. explicitly stop timers for their loan for gc (garbage collection).

    4. use the weak event listeners and remove headphones.

    5. strictly type variable when possible.

    6. explicitly disable interactivity mouse when interactivity smile not necessary.

    7. replace dispatchEvents with callback functions whenever possible.

    8 it would be gc stop sounds for the sounds and SoundChannels.

    9. use the DisplayObject most basic need.

    10. always use cacheAsBitmap and cacheAsBitmapMatrix with air applications (i.e., mobile).

    11. reuse of objects when possible.

    12 Event.ENTER_FRAME loops: use different listeners and different listener functions applied to DisplayObjects as little as possible.

    13. the pool instead of creating objects and gc objects ' ing.

    14. use partial blitting.

    15. use step blitting.

    16 use Stage3D

    Biggest advantage less

    1. Use the blitting Stadium (if there is enough memory system).
    2. Use Stage3D.
    3. Use partial blitting.
    4. Use cacheAsBitmap and cacheAsBitmapMatrix with mobile devices.
    5. Disable explicitly interactivity mouse when interactivity smile not necessary.
    6. Do not use filters.
    7. Use the most basic necessary DisplayObject.
    8. Reuse objects whenever possible.
    9. Event.ENTER_FRAME loops: use different listeners and different listener functions applied to DisplayObjects as little as possible.
    10. Use reverse for loops and avoid the do loops and while loops.
    11. The pool instead of creating objects and gc'ing.
    12. Strictly, type variable when possible.
    13. Use weak event listeners and remove headphones.
    14. Replace dispatchEvents by the callback functions whenever possible.
    15. Explicitly stop timers on loan for the gc.

    16 stop sounds for the sounds and SoundChannels be gc would be.

  • Hi, I can't download photos from the camera, error 1201, any idea what is - this?

    Hi, I can't download photos from the camera, error 1201, any idea what is - this?

    A common problem on a MAC, less frequent on Windows based on my reading of the reports here in this forum

    You don't have WRITE permission in the folder where Lightroom is trying to copy the photos to (this file is put in the import dialog box in the Destination panel), so change your permissions.

    For future reference, the 201 is not the error code and no use for us here, it's the number of photos that are affected by this error. In the future, just give the complete error message.

  • Anyone had any chance to get the 'Chat line' to answer a question, not to mention that the declarant is unavailable...

    Anyone had any chance to get the 'Chat line' to answer a question, not to mention that the declarant that it is not available at this time?

    Nevermind, I got a refund.

Maybe you are looking for