Question about changing code progammatically

In our code base there are many pkgs, procedures, and functions that have an email in the exception block. This email needs to be removed/updated.
Can these objects be updated in a loop? Would you use execute immediate to re-compile? Would a cursor be used to determine from all_source which objects needed to be updated?
Has anyone done this before or do we need to re-compile each, one at a time?

Something like that could work:
begin
   for c in
      (select object_name,
              replace (dbms_metadata.get_ddl (object_type, object_name),
                       '[email protected]',
                       '[email protected]'
                      ) stmt
         from user_objects
        where object_type in ('PROCEDURE', 'PACKAGE', 'FUNCTION', 'TRIGGER')
          and dbms_metadata.get_ddl (object_type, object_name) like
                                                         '%[email protected]%')
   loop
      execute immediate cast (c.stmt as long);
   end loop;
end;

Similar Messages

  • Some question about sql code

    for example:
    select
    from testtable
    outputs below results:
    item_desc
    950gapple(z)110ml*40
    650gbanana(z)215ml 1x18
    make above example outputs below result:
    item_desc
    a950gapplez110ml40
    a650gbananaz215ml1x18
    how to write above sql code?
    who can help me?
    thanks

    Jameel Provided solution to one of your other thread
    a question about sql code
    Try the below query. You can modify the TRANSLATE function to add the characters you want to remove from the string.
    select 'a'||replace(translate(str,'()* ','`'),'`') from testtable

  • Question about changing a Snow Leopard Server network settings

    We have an Xserve running Mac OS X Server 10.6.8, the primary services running on it are afp, smb, dhcp, dns, jabber and the calendar sever.
    Right now we have a router connecting two networks together, 192.168.0.0/24 and 192.168.1.0/24. The Xserve has a static IP address in the 192.168.0.0/24 range.
    In order to combine two phone systems into one I am required to combine the above networks, this will involve removing the router and changing the subnet mask on every device from 255.255.255.0 to 255.255.254.0, any device that is currently part of the 192.168.1.0/24 network will also need to have it's router setting changed from 192.168.1.1 to 192.168.0.1. That part should all be easy.
    However, this is my first experience expanding a network past a standard class C and am wondering if there is anything I need to watch for on my Snow Leopard Sever.
    Specifically I wonder about dhcp settings, right now there are two dhcp servers, the Xserve which provides dhcp for 192.168.0.0/24 and the router that provides dhcp for 192.168.1.0/24. Once the router is removed the Xserve will need to provide dhcp for the entire network.
    Looking at the Xserve dhcp configuration right now I have one subnet defined providing addresses 192.168.0.5 to 192.168.0.125.
    Can I simply click the + to add another subnet and add for instance a range of 192.168.1.5 to 192.168.1.125?
    Will it simply give out all of the ip addresses in the first range and then start with the 2nd? Or do I need to find a single range of ip addresses large enough to meet my needs? (e.g. 192.168.1.5 to 192.168.1.225 or something).
    Is there anythign else to watch for after making this type of network setting change?
    Thanks in advance.

    Thank you for your very detailed reply.
    I understand the problems that can arise using 192.168.0.x and 192.168.1.x and if this were a new project I would definitely switch to something else, however in this case we have been using these ip ranges for years (they were in use here long before I started) and I don't want to have to redo all of my dns settings at the same time I make these other changes so I'm going to stick with the same ip's we are using at least for now. Anyone here needing vpn access has already dealt with this issue but we  have very few vpn users so it has not been a major problem for us to date.
    My biggest question is about increasing the size of the dhcp pool. For instance, after I change all the network settings and set up a /23 network is it possible to have a single dhcp pool that includes some ip's in the 192.168.0.x range and others in the 192.168.1.x range? I guess what I am asking is when I am in Server Admin and click on DHCP one of the tabs across the top is "Subnets". Right now there is a single "subnet" configured that provides addresses from 192.168.0.5 to 192.168.0.125.
    Ideally I would like one dhcp pool that provides ip's in the range of 192.168.0.5 to 192.168.0.125 and then if all of those are used up, moves to 192.168.1.5 to 192.168.1.125. Can I do that by simply adding another "Subnet"  so there are two? Or do I have to find one larger single range? (e.g. 192.168.1.5 to 192.168.1.225?) You may have already answered this indicating I have to have a single larger range but I just want to be sure.
    The parts about changing subnet masks, and routers and all that I think I have a pretty good understanding of.
    Your last paragraph is something I have been worried about, I do have a feeling that after making this change there will probably be unforseen issues that will need to be resolved, I'm just hoping it is not too many. For the scope of this thread I will just focus on issues that may arise with the Snow Leopard Server however.
    Again, thank you for your help.

  • Question about changing values of a total by selecting a check box.

    OK, so what I did was create a form for my workplace that totals the value an employee's quality of work. what i want this form to do is: In one cell the total is a 100 point value. In one column i have a markable checkbox and in the column next to that there is a point value for that particular category. what i want is to be able to check a box next to category and have the corresponding point value deducted from the "100" total. for example if I check the box next a value of 40, then the 100 becomes a 60 automatically. I am new to numbers, and any spreadsheet app for that matter so any help would be greatly appreciated.

    Tommyboy29 wrote:
    Another question about my last post: numbers will only let me add 2 to 3 cells in the formula to change the "total" number of 100. is there a way to add more then 3 cells? i have 9 cells total that i want to have the ability to subtract from that same total?
    There is no such limit in Numbers. I'm guessing that you ran out of room in the formula edit line in the Formula Bar.
    Grab the double line and pull it down to expand the edit area.
    Jerry

  • Ucs question about major code F0283 and dce interfac and chassis number?

    dear,
    Introductions:
    one 6120 connect  chassis 1 one 2104-1 and   chassis 2 one 2104-1
    chassis 1 have sever 3/4/5/6/7/8  (all sever is B200 M3,two 2104)
    chassis 2 have sever 1/2/3/4/5/7 (sever 1/2/3/4 is B200 M3,two 2104)
    question
    1.major code F0283
    all server have  major code F0283 ,but all sever  still can use.what this? How I did it?
    affected object:sys/chassis-1/blade-6/fabric-A/path-1/vc-722
    description: ether vif 1/6 a-722 down,reason: unknown
    chassis 1 have sever 3/4/5/6/7/8
    chassis 2 have sever 1/2/3/4/5/7
    i shutdown all ,and start the problem is also.
    affected 
    i shutdown all ,and start the problem is also.
    2.on chassis 1 sever-1 adapter 1 dce interface (dce interfac 1 and dce interface 5)
    ony one use? 
    3.
    chassis 1 have sever 3/4/5/6/7/8
    chassis 2 have sever 1/2/3/4/5/7
    but i reboot ,
    chassis 2 have sever 3/4/5/6/7/8
    chassis 1 have sever 1/2/3/4/5/7
    so the profile is disorder
    i shtdown all,and start chassis 1 ok ,later chassis 2
    the problem is ok..what this ?

    Hi Hailing,
    The transport VIF for server is down.The Cisco UCS Manager raises this fault when any of the following scenario occur:
    •Endpoint(switch/fabric  interconnect) reports the connectivity state on virtual interface as  one of: a.down, b.errored, c.unavailable.
    Verify  that the blade discovery was completed successfully. Check the states  on all of the communicating ports in an end to end manner.
    If connectivity seems correct, recommision the server.
    Also, please make sure you are using the correct drivers of the OS installed in the server as Padma recommended you.
    I hope this helps.
    David

  • Question about changing TimeCode of media clip

    Hello,
    The short I'm working on was shot in 35mm, 24fps. First of all, some info about the project:
    - One-light transfer to BetaSP PAL (the dailies were sped up by 4% to match PAL's framerate), with burned in TC and keycodes
    - Made a dupe of the dailies in DVCam PAL with slave codes so that the DVCam's address track matches the burned in TC
    - Captured each lab reel as one long media clip into FCP (8 reels in total)
    - Creat subclips for each scene and for sync'ing audio.
    Everything worked out fine except for 1 lab reel. During the DVCam dupe, the TC jumped by 1 frame half way into the reel. So in the last half of this reel, the address track is 1 frame off (comparing to the burned in TC). Luckily, the TC jump didn't occur during any important scene.
    Since making another DVCam dupe was not an option (long story about working in Asia), I thought of a way around this. I divided this reel into 2 sections at the point where the TC jump occured. I created an Auxiliary Code for the section with the 'bad' TC so that the Aux Code matches the burned in TC.
    Now the rough cut is done. I need to export an EDL to re-telecine the neg for full grading.
    My question: is it a bad idea to do an EDL with both regular TC and Aux Codes? Or should I just change the TC on the 'bad' reel ?
    Sorry for the length explanation. Thanks in advance.
    G5 2.3GHz Dual Core, 4.5GB RAM, 2 500GB drives   Mac OS X (10.4.4)   Powerbook G4 on OS 10.3.9
    G5 2.3GHz Dual Core, 4.5GB RAM, 2 500GB drives   Mac OS X (10.4.4)   Powerbook G4 on OS 10.3.9
    G5 2.3GHz Dual Core, 4.5GB RAM, 2 500GB drives   Mac OS X (10.4.4)   Powerbook G4 on OS 10.3.9

    You're probably fine using the Aux TC in your EDL.
    In that case, should I create Aux TC for the lab reels with the correct TC as well (with the Aux TC being the same as the address track? That way the EDL would only deal with just the Aux TC rather than a mixture of regular TC and Aux TC.
    you could make a new DVCam PAL from your
    captured footage (restoring the matching TC with the
    burned in TC) and then recapture the media you used
    from the fixed section.
    I don't have access to a deck that allows preset TC. Would it be the same if I just change the TC on the bad section? I know that typically it's not advisable to change TC in media clips. But in this case, it's just the dailies, not the final media.
    TD

  • Question about changing ID3 images

    Hey everyone. I recently changed my podcast artwork. I use Powerpress, so changing the MAIN artwork was quite easy. So for this question, I am referencing only the individual art that is displayed with each individual episode.
    I know that for iTunes to recognize a change in episode artwork, that it cannot have the same name as the previous. The new artwork embedded does have a new name but is it the artwork that needs a different name, or the entire mp3 that needs a new name? Once artwork becomes embedded as ID3 I'm not sure if it loses its name altogether. So I need to know specifically what needs a new name for iTunes to update my episode art? Pic name or mp3 name?
    Thanks for your time!

    Thanks for the response Roger.
    So just to be clear, I have changed the images embedded in my MP3s. I then re-uploaded them to Libsyn using the replace function. So I now have MP3s with the exact same name as before, but with a new image embedded. Are you saying iTunes will see the image change in each episode even though the name of my MP3 is exactly the same?
    So far, iTunes has immediately updated my main podcast image but all my individual episodes still have the old image.
    You can probably see what I'm talking about by searching iTunes for Netflix Junkies. You'll see that 'episodes' has different artwork than 'podcasts' in the search results. Do I just need to wait it out? Or rename my mp3s?
    Keep in mind, there is another podcast with the same name no artwork. This is not my podcast but someone else's.
    Thanks again!

  • Quick Question About Javascript Code

    I'm trying to write some code in JavaScript so that a different image will display every time someone loads my homepage. I have come across a section called
    'imgct' what does "ct" stand for?
    Please excuse the stupid question but this is my first time!
    If anyone could point me in the right direction of how to do this aswell I would be extremely grateful!
    Thanks
    Kyra

    I'm so sorry about this, it just doesn't seem to be working, I did what you suggested but it still doesn't show up in my browser. :S
    The is the code view of my page now:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link href="Style_sheet.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    homeImg = newArray(
    "Images/Homepage/Image1.jpg",
    "Images/Homepage/Image2.jpg",
    "Images/Homepage/Image3.jpg",
    "Images/Homepage/Image4.jpg",
    "Images/Homepage/Image5.jpg"
    ImgCt=homeImg.length;
    function swapImg() {
        if (document.images) {
            randomNum=Math.floor((Mathrandom()*ImgCt));
            document.images ["homePicture"].src = homeImg[randomNum];
    window.onload = swapImg()
    </script>
    </head> 
    <body>
    <div class="container">
      <div class="header">
    *//There is a spry menu bar that goes here//*
        <!-- end .header --></div>
      <div class="content">
      <img src="" name="homePicture" width="627" height="250" id="homePicture" /> </div>
      <noscript><img src="Images/Homepage/Image2.jpg"/></noscript>
    As you can see I have also tried to add in a 'noscript' tag incase someone doesn't have javascript enabled etc. although when I preview it in IE I see both 'Image2' and the image placholder where teh random image is meant to appear, but doesn't.
    I'm very grateful for all the help you are giving me!
    Thank you
    Kyra

  • Question about changes in currentRow

    Dear Community,
    In Creator 2004Q4 data tables you can use the "currentRow" in value binding expressions as currentRow['column']. Now with Creator 2, one must use currentRow.value['column']. I would like to know what else has changed about this. Can any of you explain or point me to the appropiate tutorial/article about the currentRow concept?
    Thank you in advance.
    Antonio.

    As far as I can recall, nothing besides the notation
    has changed. Under the covers, currentRow is a
    temporary request attribute used when iterating the
    rows of a table. As such, it can be used in binding
    expressions. We changed the notation when we
    introduced data providers. The new notation ensures
    when evaluating an expression that what you want is
    the value for the current row and the specified field
    key. (To get the value, the data provider's getValue
    method will be called.)Thank you for your answer. I have a more specific question:
    I'm using arrays of DTO (Data Transport Objects) with Tables. Everything wasf fine until I've had to deal with a DTO with a nested class, ie:
    public class MyHelperDTO {
      private String name;
      public String getName() {
        return name;
      public void setName(String name) {
        this.name = name;
    public class MyDTO {
      private Long id;
      public Long getId() {
        return id;
      public void setId(Long id) {
        this.id = id;
      private MyHelperDTO helpDTO;
      public MyHelperDTO getHelpDTO() {
        return this.helpDTO;
      public void setHelpDTO(MyHelperDTO helpDTO) {
         this.helpDTO = helpDTO;
    }It is possible to access the properties of the inner DTO from a currentRow, ie. currentRow.value['helpDTO'].value['name']? I've actually solved in another way, but I'm still curious about it.
    Thank you in advance.
    Antonio.

  • LAST QUESTION ABOUT MY CODE (promise)

    Here is my final code for the 6/49 lottery game (it's a more simplified version so don't mind that there is no Bonus Number) sorry for the long code...
    I'll just post my question here for those who don't want to go through all of this.
    I want to throw an exception and let it catch it after the first input box appears. So let's say I entered text or a null value in the first input box then it would loop back to the beginning of the program and output a message saying "You entered a wrong value!"
    But in the code that I have, even if I enter text or just press enter without inputting anything, it just moves on to the next input box, until on the 6th input box it says "invalid value".
    So how would I proceed in doing this?
    THANKS!
    import java.util.Random;
    import javax.swing.*;
    public class Game
         public static void main (String args[])     
              mGame();
         }//end main
         public static void mGame()
              JOptionPane.showMessageDialog(null, "Ali Uz\n110231263", "About", JOptionPane.PLAIN_MESSAGE);
              Random randomNumbers = new Random();
              String sInput,
                      win = "";
              int iNumber1=0,
                   iNumber2=0,
                   iNumber3=0,
                   iNumber4=0,
                   iNumber5=0,
                   iNumber6=0,
                   match=0,
                   randNumber,
                   prize=0;
             int array [] = new int [50];
              try
                        //get the numbers from the user
                        sInput=JOptionPane.showInputDialog ("Enter winning number 1.");
                        sInput=JOptionPane.showInputDialog ("Enter winning number 2.");
                        sInput=JOptionPane.showInputDialog ("Enter winning number 3.");
                        sInput=JOptionPane.showInputDialog ("Enter winning number 4.");
                        sInput=JOptionPane.showInputDialog ("Enter winning number 5.");
                        sInput=JOptionPane.showInputDialog ("Enter winning number 6.");
                        //convert strings to integers
                        iNumber1=Integer.parseInt(sInput);
                        iNumber2=Integer.parseInt(sInput);
                        iNumber3=Integer.parseInt(sInput);
                        iNumber4=Integer.parseInt(sInput);
                        iNumber5=Integer.parseInt(sInput);
                        iNumber6=Integer.parseInt(sInput);
             }//end try
              catch (Exception e)
                        System.out.println ("Invalid input please try again");
                        System.exit (0);
              }//end catch
              for (int i=1; i<=6; i++)
                   randNumber = 1 + randomNumbers.nextInt(49);
                   array [randNumber] = randNumber;
                   if (randNumber==iNumber1)
                             match++;
                   else
                             if (randNumber==iNumber2)
                                       match++;
                             else
                                       if (randNumber==iNumber3)
                                                 match++;
                                       else
                                                 if (randNumber==iNumber4)
                                                           match++;
                                                 else
                                                           if (randNumber==iNumber5)
                                                                     match++;
                                                           else
                                                                     if (randNumber==iNumber6)
                                                                               match++;
                   if (match==3)
                        prize = 10;
                        if (match==4)
                             prize = 1000;
                             if (match==5)
                                  prize = 10000;
                                  if (match==6)
                                       prize = 1000000;
              for ( int counter = 1; counter < array.length; counter ++)
                      if (counter % 7 == 0)
                                System.out.printf("%s\n", array [counter]);
                     else
                            System.out.printf("%s ",  array [counter]); 
                   if (match >= 3)
                             System.out.println ("You have gotten " + match + "/6 correct\nYou have won $" + prize);
                   else
                             System.out.println ("You have gotten " + match + "/6 correct\nSorry you have lost! Please try again");     
    }//end class Assignment1

    Your problem here as that the exception you want to
    throw takes place here
    iNumber1=Integer.parseInt(sInput);
    public void showMessage(int number){
    try{
    sInput=JOptionPane.showInputDialog ("Enter
    nter winning number " + number);
    iNumber1=Integer.parseInt(sInput);
    }catch(Exception e){
    System.out.println ("Invalid input please try
    e try again");
    System.exit (0);
    }then call this method from inside a for loop:
    for(int i=1; i <=6; i++){
    showMessage(i);
    }Hope that helps you a littleOnly catch NumberFormatException there, though.

  • Question about changing a file type into another file type

    Hello. This isnt a java question but you guys have been so helpful in the past I hope its ok if I ask this question for a friend.
    How can I import a scriptware file into Screenwriter 2000, or change a .scw file into a .tag file?
    Anyone who can help thanks.

    I know nothing about scriptware or Screenwriter. But, my only advice is to see if Scriptware can export some other file type (not necessarily a .scw file) that Screenwriter can read. Sometimes, when I have two text editors whose native formats are incompatible (like opening a paper typed in a new version of Microsoft Word using an old version of WordPerfect or something), I save the file as an RTF file, rather than in the native format. Maybe something like that applies to your situation, too.
    Hope that helps.
    Jason

  • Vim newbie question about formatting code

    I just started learning vim and am wondering how I can get it to auto format some code.  For example:
    check() {
    for i in $nodes; do
    ping -c 1 $i > /dev/null
    if [ $? -eq 0 ]; then
    echo "Looks like $i is up so initializing the cluster on it."
    ssh $i "\$HOME/bin/cluster-setup.sh"
    fi
    done
    I have tabstop=3 in my ~/.vimrc and I'd just like to apply formatting to that code block so it looks like:
    check() {
    for i in $nodes; do
    ping -c 1 $i > /dev/null
    if [ $? -eq 0 ]; then
    echo "Looks like $i is up so initializing the cluster on it."
    ssh $i "\$HOME/bin/cluster-setup.sh"
    fi
    done
    I read about =i{ but it has no effect for me.
    Thanks!
    Last edited by graysky (2011-06-18 14:32:18)

    graysky,
    If you want vim to autoindent while typing, customize your ~/.vimrc file. I posted mine here: http://linuxandsuch.wordpress.com/2011/06/19/my-vimrc/ a few days back. I recommend all the options.
    However, if you want to indent an already existing file use the indent program. Install with
    sudo pacman -S indent
    And then, to indent your file, run:
    indent myfile.c
    I'd recommend reading the manpage for indent to learn to tweak it to your coding style though .

  • Question about byte code instructions

    Dear All,
    A method invocation (e.g., invokevirtual) needs its arguments to be prepared by the instructions above the method invocation instruction.
    As we know, some instructions pop objects out of the stack (eg, putfield), some instructions push objects onto the stack (eg, getfield), and some instructions do not change the state of the stack.
    My question is: are the instructions corresponding each argument preparation only those instruction that can push objects onto the stack, or could be any other?
    Thank you very much,
    -- Sunny

    When you say that arguments need to be prepared "above" the method invocation, it's more accurate to say before the method invocation.
    Typically, the stack is prepared with parameters which have been pushed onto it. But that's not just for method invocation. Simple operations such as "c = a + b" do not invoke any class methods, they are implemented by bytecode operations. If you had "myTestMethod ( a + b )", then the parameters preparation also includes calculations, the results of which are left on the stack for the method invocation.
    regards,
    Owen

  • Question about error code

    I have been having problems when I try to open applications such as IPhotos or Photoshop. They keep on quitting. I did the Hardware Test and it showed error code 2MEM/5/4:DIMM1/J31. Does anyone know what it means and what I should do? I do not have a warranty anymore and now I wondered if I am gonna have to get the coverage plan (my budget is tight right now). Thank you for any help you can give me.

    Either the module has failed or has come loose. At this time I'd open up your computer and make sure it's still locked in place. Afterwards, no need to run the hardware test, just check with System Profiler to see if you were able to nudge it back into position.
    Once in a while RAM modules do fail, but not very often.
    Edit-
    Since you apparently did not purchase this from Apple, it probably is still under lifetime warranty by the seller, so look up your original order number on the invoice and fill out an RMA request on the website of your supplier, or of the manufacturer (brand) itself. If they don't have a Support section or warranty or RMA section, you'll have to email them.
    Put off thinking about eBay until you find out if it will be replaced under warranty.
    [If you had an extra 1GB of memory, that is not going to be a bargain on eBay, as many are just now upgrading and trying to buy that size, but if you had an extra 512MB, then that is what can be found for a fraction of the price you'd have to pay for new anywhere else. If you're really lucky you can find someone with a relatively new iBook or PowerBook who might be looking to sell what hardly had any use. Caution in shipping is required, as the biggest cause of RAM failure is mishandling of the module between manufacture and packaging.]

  • Question about my code.

    I am rather new to Java but am quite fluent with C, C++ and C#. I have this code with a main menu function and a main function. For whatever reason when I try to change functions/methods I get an error. Below is my pastebin.
    http://nettworks.pastebin.com/yJ4xa5KP
    On line 17 is where the error comes up. Why wont it just pass to the mainMenu() function ?

    GunnDawg wrote:
    So how do I exit a static method such as main ?Not quite sure what you mean.
    Normal practise is to use main() as a "driver" method - meaning that it sets up whatever objects it needs to perform a task and then hands off control to them. Generally, you only have one class with a main() method; unfortunately, many books and exercises contain classes that act as both driver and "driven" (ie, they have instance methods as well). This is not very common in normal usage (although I'm sure there are exceptions).
    Winston

Maybe you are looking for