We can not delete record by procedure

Hi All,
We can not delete record by procedure, please suggest us, our program is following:
create or replace procedure pro_del (p_id IN employee.id%type)
IS
begin
delete from employee
where id = p_id;
end;
execute pro_del(01)
your suggestion would be greatly appreciated.

user13842301 wrote:
Hi All,
We can not delete record by procedure, please suggest us, our program is following:
create or replace procedure pro_del (p_id IN employee.id%type)
IS
begin
delete from employee
where id = p_id;
end;
execute pro_del(01)
your suggestion would be greatly appreciated.As you have not provided the sample data, I have created a sample dataset to demonstrate.
SQL> select * from test;
        ID        SAL
         1       1000
         2       2000
         3       3000
         4       1000
SQL> create or replace procedure pro_del (p_id IN test.id%TYPE)
  2  IS
  3  begin
  4  delete from test
  5  where id=p_id;
  6  COMMIT;
  7  END;
  8  .
SQL> /
Procedure created.
SQL> exec pro_del(1);
PL/SQL procedure successfully completed.
SQL> select * from test;
        ID        SAL
         2       2000
         3       3000
         4       1000As you have not handled any exceptions in your pro_del procedure,probably you might be passing invalid id in procedure call
Hope this helps
Regards,
Achyut

Similar Messages

  • Can not delete record from the master block ,frm-40202 field must be entere

    hi ,
    i have built a form which contain master and details blocks
    the problem is
    when i try to delete a record from the master block it gives me new serial for the transaction and when i try to save it, it says
    >frm-40202 field must be entered
    where this field is required and i cant save it
    although in another form when i delete from the master it gives me the previous record and it works properly
    if any one has any ideas pls help me
    thank u
    ------- the master block has a trigger when-create-recoder
    Declare>v_dummy number;
    Begin
    Select nvl(max(ERNT_NO),0) + 1 >Into v_dummy
    From LM_RENT_EXPNMST >Where cmp_no = :LM_RENT_EXPNMST.cmp_no
    And brn_no = :LM_RENT_EXPNMST.brn_no>and fiscal_yr = :LM_RENT_EXPNMST.fiscal_yr;
    >:LM_RENT_EXPNMST.ERNT_NO := v_dummy;
    END;
    IF :PARAMETER.RNT_NO IS NOT NULL THEN
         :LM_RENT_EXPNMST.RNT_NO:=:PARAMETER.RNT_NO;
              :LM_RENT_EXPNMST.RNT_YR:=:PARAMETER.RNT_YR;
         :LM_RENT_EXPNMST.CUST_DESC:=:PARAMETER.RNT_ADESC;
    END IF;Edited by: ayadsufyan on May 8, 2013 2:03 PM

    If this is a FORMS question you should mark this one ANSWERED and repost your question in the FORMS forum
    Forms

  • CAF Application Service - can not delete record

    Hello All. I have some problem.
    Code:
        public java.util.List addGoodsItem(java.util.List inputGoodsItem) throws com.sap.caf.rt.exception.CAFDeleteException, com.sap.caf.rt.exception.ServiceException, com.sap.caf.rt.exception.CAFUpdateException, com.sap.caf.rt.exception.CAFFindException {
              java.util.List retValue;
              try {
    //@@custom code start - addGoodsItem(java.util.List)
      retValue = new ArrayList();
      String temp = "";
      for (Iterator it = inputGoodsItem.iterator(); it.hasNext();)
         InputGoodsItem item = (InputGoodsItem) it.next();
         try {
               GoodsItemServiceLocal serv = this.getGoodsItemService();
               List iList = this.getGoodsItemService().getById(new QueryFilter(item.getId()));
               if (iList != null && iList.size() > 0)
                int size = iList.size();
                for (int i = 0; i < size; i++)
                     GoodsItem tmpItem = (GoodsItem) iList.get(0);
                     temp = "T2 [ " + i + "]";
                     iList.remove(tmpItem);
                     temp = "T3[" + i + "]";
                     temp += " class:" + tmpItem.getClass().getName();
                     temp += " id:" + tmpItem.getId() + " key [ " + tmpItem.getKey() + "]";
                     serv.delete(tmpItem);
                     temp = "T4 [ " + 5 + "]";
                   catch (Exception e)
                   retValue.add(item);
                InputGoodsItem i = new InputGoodsItem();
                i.setDescription(e.getClass().getName()
                                    + "[" + temp + "]"
                                    + " [" + e.getMessage() + "]");
                        retValue.add(i);
    //@@custom code end - addGoodsItem(java.util.List)
                 return retValue;
            } finally {.........}
    in result i have this:
    >com.sap.caf.rt.exception.CAFDeleteException[T3[0]
                            class:com.j.shell.besrv.goodsitem.GoodsItem id:ART00501
                            key[3332db84-1ae2-11df-a512-22348000c006]] [MMR object ID: GoodsItemService cannot be found]

    Full log
    Full Message Text
    Caught com.sap.caf.rt.exception.DataAccessException: MMR object ID: GoodsItemService cannot be found
    at com.sap.caf.rt.bol.da.jdo.JDODADataAccessService.remove(JDODADataAccessService.java:194)
    at com.j.shell.besrv.goodsitem.GoodsItemServiceBean.delete(GoodsItemServiceBean.java:274)
    at com.j.shell.besrv.goodsitem.GoodsItemServiceLocalLocalObjectImpl0_0.delete(GoodsItemServiceLocalLocalObjectImpl0_0.java:478)
    at com.j.shell.appsrv.shellservice.ShellServiceBean.addGoodsItem(ShellServiceBean.java:639)
    at com.j.shell.appsrv.shellservice.ShellServiceBean.addGoodsItem_R(ShellServiceBean.java:584)
    at com.j.shell.appsrv.shellservice.ShellServiceObjectImpl0_0.addGoodsItem_R(ShellServiceObjectImpl0_0.java:971)
    at com.j.shell.appsrv.shellservice.ShellService_Stub.addGoodsItem_R(ShellService_Stub.java:770)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
    at java.lang.reflect.Method.invoke(Method.java:391)
    at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)
    at $Proxy247.addGoodsItem_R(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
    at java.lang.reflect.Method.invoke(Method.java:391)
    at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
    at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
    at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
    at SoapServlet.doPost(SoapServlet.java:51)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(AccessController.java:219)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Caused by: com.sap.caf.rt.exception.DataAccessException: MMR object ID: GoodsItemService cannot be found
    at com.sap.caf.rt.metamodel.MetaModel.getBusinessEntityInterface(MetaModel.java:193)
    at com.sap.caf.rt.metamodel.MetaModel.getBusinessEntityInterface(MetaModel.java:80)
    at com.sap.caf.rt.internal.bol.da.BEReferencesRemover.removeReferences(BEReferencesRemover.java:260)
    at com.sap.caf.rt.bol.da.jdo.JDODADataAccessService.remove(JDODADataAccessService.java:175)
    ... 39 more

  • How can i delete Record when i click on Delete Link in a report

    hi,
    i have to create report
    select S_NO,BILL_NO,LED_NAME,PUR_LED,VAT,BILL_DATE,ST_GRP_UND,GODOWN_NAME,
    ITEM_NAME,UNIT,QTY,RATE,PER,DIS,AMOUNT,'Delete' from DUMY_AC_LED_PURASEI want to delete corressponding record when i click on Delete Link.
    Here S_NO is P.k.
    How can i delete Record when i click on Delete Link.

    Manoj,
    If something does not work then you should report back on the same thread so that there is continuity to the whole episode. Be as lucid as you can be so that people know whats the scenario. E.g. is not working is not enough. What happens? Does is show error , go blank, goes to another page... all that is important.
    Its for posterity, down the line others will also visit the thread (may be).
    Regards,

  • Can not delete my account

    I can not delete my account because I do not have my registered email account anymore and I also forgot the skype password. What can I do to delete it?

    you can also find additional details here;
    Deleting Skype Accounts
    CONTACT SKYPE CUSTOMER SERVICE   |  HOW TO RECORD SKYPE VIDEO CALLS  | HOW TO HANDLE SUPICIOUS CALLS AND MESSAGES   |  WINDOWS PROBLEMS TROUBLESHOOTING   |  SKYPE DOWNLOAD LINKS  
    MORE TIPS, TRICKS AND UPDATES AT
    skypefordummies.blogspot.com

  • Can not delete Twitter mentions from the Hub

    Can not delete Twitter mentions from the Hub. When I delete, they reappear in a few minutes.

    I had the same problem,so i just deleted Twitter altogethet. Like was said before it must be bug among many they seem to have,including password compromises

  • IPhone 5 can not delete emails. Will not move to trash folder or empty trash

    iPhone 5, I can get mai. I can send mail. I can not delete mail. If i click to send the read mail to trash folder... error ca not move mail to trash folder.
    I can move read mail to the trash folder, but can not empty the folder...
    HELP

    Read this thread https://discussions.apple.com/message/5616151#5616151

  • Epub books show up in ipad on itunes but do not show up on ipad. Also can not delete the books from ipad in itunes

    epub books show up in ipad on itunes but do not show up on ipad. Also can not delete the books from ipad in itunes

    You have no choice but to lose your data back to the last backup you made.
    Here's how to do the recovery.  Note you may have to try to get into recovery mode more than once to succeed:
    HT1808
    I'm sure next time, you'll be more vigilant about keeping current backups.

  • Can not delete files from Adobe reader

    can not delete files from adobe reader.

    Can you let us know a little more about what you are trying to do? Adobe Reader opens pdf files but does not store them so, there's nothing to delete.

  • I can not delete bookmarks from the bar as I am spammed with many bookmarks.

    On my bookmark bar I have multiple instances of "Webmail Notifier" and they are in my bookmark list in many places. I am unable to delete them at all. How can I fix this issue?
    I have many bookmarked items that I do not want to lose as well.

    I did that and the links disappeared. The problem that I have now is:
    I now have 7 empty folders that I am unable to remove on my bookmark bar.
    I have many empty folders in my bookmarks that I am unable to remove as well.
    I can not move them, I can not delete them.
    I am attempting to include a snapshot so you can see.

  • HT4847 I can not delete old icloud back up from my old phone, keep receiving an error message "this back up can not be deleted because it's in use" it is not in use that phone is long gone!

    I can not delete old icloud back up from my old phone, keep receiving an error message "this back up can not be deleted because it's in use" it is not in use that phone is long gone!

    I have the same problem here and it wont let me do another back up or delete the old one.... Please help!!!! Anyone

  • I can not delete my history and adding new bookmarks. Upgrading to later Firefox versions and/or re-installing didn't help. The address bar still shows the web addresses of old and whenever I make new bookmarks, it's always gone as if it was never made.

    I can not delete my history and adding new bookmarks.
    Upgrading to later Firefox versions and/or re-installing didn't rectify it either.
    The address bar still shows the web addresses of old and whenever I make new bookmarks, it's always gone as if it was never made.
    Also, I have noticed that every once in awhile you can not close tabs you've opened, either by pushing on the X button and/or clicking on the mouse to close it. Although closing the window and opening it again (without closing the Firefox application) seemed to rectify the problem in the short term, it's becoming quite annoying.
    == This happened ==
    Every time Firefox opened
    == the Firefox is being used

    I think I have a solution.
    First, download the add-on SQManager. This should be included with FireFox, it is really good.
    Look for the file '''moz_hosts''' in the folder '''places.sqlite'''.
    Don't delete the file, just delete the information in the file. My file has over 3600 websites, which go back years!! I did not know they were there, but I was frustrated about not being able to get rid of them. They popped up every time I used the address bar. Clearing my history would not get rid of them.
    This is where they are stored!! I found that by deleting the pesky web site from '''moz_hosts''', it does not appear in my address bar anymore!!!
    I think that if I just delete all the websites in moz_hosts....
    Wa-la...History Gone!!!
    As long as you don't delete the file, just empty it, FireFox won't know the difference. It will just keep adding websites to it until you empty it again.
    Why running "clear recent history" doesn't do this, I don't know. You are doing manually what "clear recent history" is not doing.
    Please tell me if you see any flaw in this.
    ''I think it's the solution we've all been looking for!''

  • Can not delete photos or albums sync from computer to iphone 4s

    I can not delete photos or albums that were sync from computer to iphone 4s. I tap edit but there is no delete icon. Help. This is my first iphone

    You delete them the same way you put them there, the sync process.
    Deselect the folder in itunes and sync.

  • I Can not delete appointment made in Outllook in my Iphone

    Hello,
    I Can not delete appointment made in Outllook and sync in my Iphone (using Exchange Sync).
    I can only delete this appointment in my Outlook and then they will be deleted in my Iphone.
    Strange situation?
    I should be able to create, postpone, delete ....any appointment made from the iphone or from Outlook?
    Why can I ?
    What is the purpose then to have it sync?
    if you can only dothe change on one side and then sync to have it mirored in Iphone
    Any clue?
    Other question: in my Outlook I have several calendar. When I choose to sync calendars in my iphone, color are picked random. Why can't I choose the color i want in my iphone (why if i want the personal calendar to be green instead of orange? )
    Thanks
    Message was edited by: bruxelles5
    Message was edited by: bruxelles5

    OK regarding the color of the calendar.
    A little trick.
    I create as much calendar in Outlook, and then sync with the Iphone (trough Exchange)until the color I wanted show up.
    example I wanted the Personal calendar to be GREEN
    After test1 + test2 + test3 ........on test5 calendar the color was green.
    I then deleted the other calendar not needed.
    And the test5 colored green was still in place.
    I then rename this calendar to Personal.
    And voila

  • For some reason, I can not delete bookmarks. I did one at a time, then tried 5 or 6 and it worked once then no more. I then tried 1 at a time and it worked once the no more. This is a brand new computer (Win7) and FF just loaded about 3 hours ago.

    # Question
    For some reason, I can not delete bookmarks. I did one at a time, then tried 5 or 6 and it worked once then no more. I then tried 1 at a time and it worked once the no more. Why is this happening? This is a brand new computer (Win7) and FF just loaded about 3 hours ago. Do not know how the bookmarks even got in there. Some were ok, but no order and some that were never bookmarks. Looks like FF tried to import some BM's from the Virtual XP installed, but did not get it any where near right. I need to completely delete all of them and install from a saved .html file.

    Well, I did not see the exact problem that I was having listed in the articles, BUT the problem is solved for now.
    I opened FF and the Bookmarks to Organize again. I deleted all of the folders and entries, ONE AT A TIME, AND IT WORKED. Evidently, for what ever reason, FF did not like "Batch" deletes of ANY amount greater than 1 and the HANG UP would occur.
    Deleting one at a time then importing the good .html from a good file, loaded the wanted Bookmarks. Yea

Maybe you are looking for