Need an anonymous block for false update,

I have a table called sk_a

create table sk_a (number, date of b, c varchar2 (10));

and an audit table

create a sk_a_audit (audit_id number, issue date, b, c varchar2 (10), dml_action varchar2 (4));

and the sk_a_audit_seq sequence

create sequences sk_a_audit_seq

When any insert or update occurs in the table sk_a, respective data must insert into the table sk_a_audit

and trigger is

CREATE OR REPLACE TRIGGER SK_A_TRG
AFTER INSERT OR UPDATE
ON SK_A
FOR EACH LINE
DECLARE
l_code NUMBER;
l_errm VARCHAR2 (64);
BEGIN
IF (INSERT OR UPDATE)
THEN
INSERT INTO SK_A_audit
VALUES (sk_a_audit_seq. NEXTVAL,: NEW.a.
: NEW. B: NEW. C, « I ») ;
END IF;
EXCEPTION
WHILE OTHERS
THEN
l_code: = SQLCODE;
l_errm: = SUBSTR (SQLERRM, 1, 64);
Dbms_output.put_line ('DML Operation is failed' | l_code | l_errm);
END;

can sk_a or mentioned have unique, or primary keys

now my requirement is

verification Panel is removed by professional users,

and then I have to run an update on table sk_a (false update) so that the data will come and inserted into the audit table,

so this table of audit will once again return with all of the data in table sk_a

I need an anonymous block for this, can someone help on this.

Try this to update the table (no need to do it with PK)

 update table
  set col1 = col1;

Bangoura
[My Oracle Blog | http://baigsorcl.blogspot.com/]

Tags: Database

Similar Questions

  • Need to import Solution for adding/updating external CRM (no Salesforce) given in Eloqua Contacts including the definition of groups/e-mail preferences

    We have a system of CRM of Blackbaud (a leading global provider for non-profits CRM) called the Raiser's Edge.  We want to automate nightly adding/updating of coordinates corresponding to the email address in contacts Eloqua records.  For example, we in the raiser's edge fields like "Member status", which has an "A" for assets, 'L' for out of date, or a "D" for fall.  We also have a field as "Membership Type", who can say 'Reguiler year 1' or 'Discount group membership 2 year' or 'Life member', etc...  We want to create custom fields corresponding to the Eloqua Contact folder to the same email address so that we can use this data to create segments in Eloqua.  What are my options to automate this process on a job every night to add/update the Eloqua Contact records?  We also want to automate in Eloqua that when the custom field, we create a file of Contact called Eloqua "Member status" passes any value to an "A" for assets, that you subscribe to the email address to send two groups/preferences, called "Generation Joshua" and "XBrents Email Group" (see below).  Note: When a constituent purchases a membership, they must agree to be added to those groups/preferences of two emails with instructions they can unsubscribe to one or the other or both at any time by accessing our Web site (using the subscription Eloqua, Web page management).  All options on how we can auto, this process, too?  I have on my team of software developers .NET who worked with API many other providers in the past.

    Thank you

    Bill

    Hi Bill,

    You can use the REST API in bulk to load your contacts into Eloqua. We have a post on the topic: How to download Contacts from a list and an example project in c# available on Github. (Canvas or program Builder) workflow engine to manage triggers you want depending on the value in a custom field. Workflow decisions can evaluate the data in any field and move or update members of the program accordingly.

    The REST API documentation of bulk (Beta) is available here: Eloqua API Documentation

    Note that you must be logged in your Eloqua install in order to access the documentation.

    Hope this helps and please let me know if you need more information.

    Thank you

    Fred

  • I need the BIOS password for an update of the Bios

    Hello

    You can support me with my laptop BIOS password?

    I want to upgrade to the latest version of the BIOS and found that a password is set

    Its specifications are as follows.

    Hewlett-Packard HP ProBook 6470b system
    Serial number = [number of Series edited by Moderator]
    CPU = 1 x Intel Core i5 - 3320M @ 2.60 GHz CPU
    Physical memory = 8056 MB
    Root system = C:\Windows
    = Video adapter Intel(r) HD Graphics 4000 [2112 MB]
    Video settings = 1920 x 1200, 32-bit color, 60 Hz
    Its high definition Audio device = Device
    BIOS = Hewlett-Packard [HPQOEM - f]

    Can find you it?

    best regards from Germany, Holger

    Holger.

    There is not generators of master password for ProBooks or EliteBook and most laptops class business.

    You will need to contact HP.

    http://WWW8.HP.com/us/en/contact-HP/WW-contact-us.html?JumpID=reg_r1002_usen_c-001_title_r0003

    Or look at this link.

    http://forums.mydigitallife.info/threads/49497-HP-ProBook-EliteBook-BIOS-password-reset-utility

    Or replace the BIOS chip.

    http://www.eBay.com/ITM/HP-ProBook-4340s-4440s-4540s-4545s-4740s-6470b-6570b-6475b-BIOS-chip-no-password-/251583728063?PT=US_Motherboard_Components&hash=item3a938f09bf

    The seller on Ebay is in Berlin.

    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.

  • Is there a way in which I can download iBooks content directly to iCloud by car through my device (iPhone or iPad) without the use of a Mac? If it isn't, I suggest and ask for an update which includes my needs inside. Thank you

    Is there a way in which I can download iBooks content directly to iCloud drive through my device (iPhone or iPad),without the use of a Mac?

    Otherwise, I suggest and ask for an update which includes my needs inside. Thank you

    See synchronize ePub, Books author iBooks and PDFs with iBooks and iCloud - Apple Support.

    TT2

  • my account has been blocked for 10 days. I ', do everything you ask bu nothing works. I need my account back please!

    My account has been blocked for 10 days. I have tried everything you say, but nothing works. You always ask me to do the same things. Please, I need my account back. I'm desperate!

    Hello

    Answers is a peer group supported and unfortunately has no real influence on Hotmail.

    HotMail has its own Forums, so you can ask your questions there.

    Windows Live Solution Center - HotMail - HotMail Forums Solutions
    http://windowslivehelp.com/

    Hotmail - Forums
    http://windowslivehelp.com/forums.aspx?ProductID=1

    Hotmail - Solutions
    http://windowslivehelp.com/solutions.aspx?ProductID=1

    How to contact Windows Live Hotmail Support
    http://email.about.com/od/hotmailtips/Qt/et_hotmail_supp.htm

    Windows Live Hotmail Top issues and Support information
    http://support.Microsoft.com/kb/316659/en-us

    Compromised account - access unauthorized account - how to recover your account
    http://windowslivehelp.com/solution.aspx?SolutionID=6ea0c7b3-1473-4176-b03f-145b951dcb41

    Hotmail hacked? Take these steps
    http://blogs.msdn.com/b/securitytipstalk/archive/2010/07/07/Hotmail-hacked-take-these-steps.aspx

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • update my windows vista to windows 7, I need new product key for windows7?

    Additional question:

    I bought my laptop included windows vista Home premium 32 bit SP2 with System Recovery Manager
    I read that there is an upgrade from windows vista to 7 in basic information on my computer in the following manner:
    Windows vista edition Home premium
    Copyright 2007 Microsoft corporation. all rights reserved
    Service Pack 2
    Upgrade to Windows Vista
    what my question is, if I update my windows vista to windows 7, I need new product key for windows7? ,
    or can I use the same product key of windows vista in windows 7 after upgrading?
    and can I upgrade windows vista service pack 2 with service pack 3?

    Hello

    You will need to purchase a license/disk/upgrade Windows 7 product key.

    Microsoft sells more Windows 7 and you would have to buy from Amazon, etc.

    There was a free upgrade offer, but it expired a long time ago:

    "The Windows 7 upgrade Option is available through participating PC manufacturers on some PC and Microsoft on any purchase of packaged product Windows Vista. The Windows 7 upgrade Option applies to Windows Vista Home Premium, Business and Ultimate editions. Your upgrade to Windows 7 will be the comparable version: so you will get either Windows 7 Home Premium, Windows 7 Professional (upgrade to Windows Vista Business) or Windows 7 Ultimate, respectively. The Windows 7 upgrade Option program works on June 26, 2009 through January 31, 2010. Some manufacturers may choose to shorten the time of upgrade Option. »

    __________________________________________________

    There is no Vista SP3; SP2 has the latest Service Pack for Vista and will be the last.

    __________________________________________________

    Before purchasing Windows 7, follow these steps:

    Go to your computer / computer laptop manufacturer Web site and see if Windows 7 drivers are available for your make and model computer / laptop.

    If this is not available, Windows 7 will not properly work for you.

    Run the "Windows 7 Upgrade Advisor.

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=20

    Check if your specifications are compatible for Windows 7:

    "Windows 7 system requirements"

    http://Windows.Microsoft.com/en-us/Windows7/products/system-requirements

    "Windows 7 Compatibility Center" for software and hardware:

    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/default.aspx

    Windows 7 upgrade paths:

    http://TechNet.Microsoft.com/en-us/library/dd772579 (v = ws.10) .aspx

    «Installation and reinstallation of Windows 7»

    http://Windows.Microsoft.com/en-us/Windows7/installing-and-reinstalling-Windows-7

    See you soon.

  • Update cache - unexpected error of blocking for the repository &amp; oracle.webcenter.framework.service.RepositoryVersion cannot be cast to oracle.webcenter.framework.service.RepositoryVersion

    Hello

    I noticed that the following errors appear often in my custom portals managed servers. Can anyone tell why these errors appear as I applied all the necessary patches?

    Oracle WebCenter Suite 11 g 11.1.1.8.0 portal applied Patch 21281035

    < 11 November 2015 11:00:08 SGT > < error > < oracle.webcenter.content.integration.spi.ucm.UCMCacheUpdateTimer > < WCS-55198 > < Cache update - unexpected error of blocking for the repository.

    java.lang.ExceptionInInitializerError

    at oracle.webcenter.content.internal.stellent.VCRConfigProvider.getRepositoryConfig(VCRConfigProvider.java:99)

    at oracle.webcenter.content.integration.federated.internal.delegate.RepositoryHelper.getRepositoryConfig(RepositoryHelper.java:601)

    at oracle.webcenter.content.integration.federated.internal.delegate.CacheHelper.getBinaryCache(CacheHelper.java:56)

    at oracle.webcenter.content.integration.federated.internal.delegate.CacheHelper.flushAllBinaryCacheEntries(CacheHelper.java:254)

    at oracle.webcenter.content.integration.federated.ContentCacheHelper.flushAllBinaryCacheEntries(ContentCacheHelper.java:54)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheHelper.invalidateNodeEntry(UCMCacheHelper.java:175)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheHelper.invalidateCacheEntries(UCMCacheHelper.java:138)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheUpdater.updateCaches(UCMCacheUpdater.java:83)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheUpdateTimer.run(UCMCacheUpdateTimer.java:105)

    at java.util.TimerThread.mainLoop(Timer.java:555)

    at java.util.TimerThread.run(Timer.java:505)

    Caused by: java.util.MissingResourceException: can't find oracle.webcenter.content.integration.internal.logging.VCRLogger bundle

    at java.util.logging.Logger.setupResourceInfo(Logger.java:1537)

    to java.util.logging.Logger. < init > (Logger.java:267)

    at java.util.logging.LogManager.demandLogger(LogManager.java:433)

    at java.util.logging.Logger.demandLogger(Logger.java:346)

    at java.util.logging.Logger.getLogger(Logger.java:442)

    at oracle.adf.share.logging.ADFLoggerFactory.getADFLogger(ADFLoggerFactory.java:63)

    at oracle.adf.share.logging.ADFLogger.createADFLogger(ADFLogger.java:221)

    to oracle.webcenter.content.integration.RepositoryException. < clinit > (RepositoryException.java:31)

    at oracle.webcenter.content.internal.stellent.VCRConfigProvider.getRepositoryConfig(VCRConfigProvider.java:99)

    at oracle.webcenter.content.integration.federated.internal.delegate.RepositoryHelper.getRepositoryConfig(RepositoryHelper.java:601)

    at oracle.webcenter.content.integration.federated.internal.delegate.CacheHelper.getBinaryCache(CacheHelper.java:56)

    at oracle.webcenter.content.integration.federated.internal.delegate.CacheHelper.flushAllBinaryCacheEntries(CacheHelper.java:254)

    at oracle.webcenter.content.integration.federated.ContentCacheHelper.flushAllBinaryCacheEntries(ContentCacheHelper.java:54)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheHelper.invalidateNodeEntry(UCMCacheHelper.java:175)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheHelper.invalidateCacheEntries(UCMCacheHelper.java:138)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheUpdater.updateCaches(UCMCacheUpdater.java:83)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheUpdateTimer.run(UCMCacheUpdateTimer.java:105)

    at java.util.TimerThread.mainLoop(Timer.java:555)

    at java.util.TimerThread.run(Timer.java:505)

    < 11 November 2015 11:01:07 SGT > < WARNING > < oracle.webcenter.notification.internal.model.util.FrameworkUtils > < BEA-000000 > <

    java.lang.ClassCastException: oracle.webcenter.framework.service.RepositoryVersion cannot be cast to oracle.webcenter.framework.service.RepositoryVersion

    at oracle.webcenter.framework.service.ServiceContext.getRepositoryVersionObject(ServiceContext.java:1283)

    at oracle.webcenter.framework.service.ServiceContext.getRepositoryVersion(ServiceContext.java:1185)

    at oracle.webcenter.framework.service.ServiceContext.isRepositoryVersionGreaterThanOrEqualTo(ServiceContext.java:1221)

    at oracle.webcenter.peopleconnections.profile.internal.extension.ProfileService.isConfigured(ProfileService.java:41)

    at oracle.webcenter.framework.service.ServiceRegistry.getAllConfiguredServices(ServiceRegistry.java:213)

    at oracle.webcenter.notification.internal.model.util.FrameworkUtils.loadServiceActivityTypes(FrameworkUtils.java:94)

    to oracle.webcenter.notification.internal.model.NotificationServiceImpl. < init > (NotificationServiceImpl.java:109)

    at oracle.webcenter.notification.NotificationServiceFactory.getNotificationService(NotificationServiceFactory.java:89)

    at oracle.webcenter.notification.internal.model.LifecycleListener.contextDestroyed(LifecycleListener.java:68)

    at oracle.webcenter.framework.internal.view.WCFrameworkContextListener.contextDestroyed(WCFrameworkContextListener.java:208)

    to weblogic.servlet.internal.EventsManager$ FireContextListenerAction.run (EventsManager.java:482)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.servlet.internal.EventsManager.notifyContextDestroyedEvent(EventsManager.java:200)

    at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:3225)

    at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:247)

    at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:461)

    at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:1545)

    at weblogic.servlet.internal.WebAppModule.deactivate(WebAppModule.java:509)

    to weblogic.application.internal.flow.ModuleStateDriver$ 2.previous(ModuleStateDriver.java:387)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)

    at weblogic.application.internal.flow.ModuleStateDriver.deactivate(ModuleStateDriver.java:141)

    at weblogic.application.internal.flow.ScopedModuleDriver.deactivate(ScopedModuleDriver.java:206)

    at weblogic.application.internal.flow.ModuleListenerInvoker.deactivate(ModuleListenerInvoker.java:261)

    to weblogic.application.internal.flow.DeploymentCallbackFlow$ 2.previous(DeploymentCallbackFlow.java:547)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)

    at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:192)

    at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:184)

    to weblogic.application.internal.BaseDeployment$ 2.previous(BaseDeployment.java:677)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)

    at weblogic.application.internal.BaseDeployment.deactivate(BaseDeployment.java:234)

    at weblogic.application.internal.EarDeployment.deactivate(EarDeployment.java:59)

    at weblogic.application.internal.DeploymentStateChecker.deactivate(DeploymentStateChecker.java:198)

    at weblogic.deploy.internal.targetserver.AppContainerInvoker.deactivate(AppContainerInvoker.java:98)

    at weblogic.deploy.internal.targetserver.operations.DeactivateOperation.deactivate(DeactivateOperation.java:78)

    at weblogic.deploy.internal.targetserver.operations.RemoveOperation.removeDeployment(RemoveOperation.java:306)

    at weblogic.deploy.internal.targetserver.operations.RemoveOperation.doCommit(RemoveOperation.java:114)

    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)

    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)

    at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)

    at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)

    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)

    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)

    in weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$ 100 (DeploymentReceiverCallbackDeliverer.java:13)

    to weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$ 2.run(DeploymentReceiverCallbackDeliverer.java:68)

    to weblogic.work.SelfTuningWorkManagerImpl$ WorkAdapterImpl.run (SelfTuningWorkManagerImpl.java:545)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    >

    Hello

    Please apply the MLR 14 and check the box.

    If the problem persists, please update us with the WCC and newspapers of WCP.

  • Why my CS6 apps show the need for an update?

    For some reason, in my drop down list creative cloud, my Adobe Photoshop CS6 and my Dreamweaver CS6 show that they must be updated.  I went through and got the error "U44M1P7" and found different solutions.  When I arrived at the Solution #2, I went to try to install the updates manually.  Out of curiosity, I made a command-I on the two applications to see what version I already had - and they are the same version as the last update.  So, in simple terms, the creative cloud app shows the need for an update, but according to the 'latest news', the last update is already installed.  Can someone tell me what could be the problem?  Thanks in advance - Scott

    Hi,

    Please, try the following steps:

    Kind regards

    Sheena

  • help for anonymous block

    Hi friends
    I am developing anonymous blocks that displays the message on the screen, like "hello world" "is SYSDATE today" and "tomorrow is SYSDATE + 1". To make me try to develop anonymous block, but it shows me error... so friends can you help me with this...

    Set SERVEROUTPUT on
    declare
    p_text varchar2 DEFAULT "hello world";
    P_date date default sysdate;
    P_next_date date default sysdate + 1;
    Start
    DBMS_OUTPUT. PUT_LINE (|) P_text);
    DBMS_OUTPUT. Put_line (' today's :'||) P_date);
    DBMS_OUTPUT. Put_line ("tomorrow is :'|| p_next_date);
    end;
    /


    Thanks in advance
    Rommy

    Hi, Rommy,

    Always format your code. Dash to show the main sections (DECLARED, BÉGIN, etc..)
    Type these 6 characters
    {code}
    (small letters only, inside curly braces) before and after the formatted text, to keep the spacing when posting on this site.

    DECLARE
         p_text          VARCHAR2 (50)  DEFAULT 'hello world';
         P_date          DATE            DEFAULT SYSDATE;
         P_next_date     DATE            DEFAULT SYSDATE + 1;
    BEGIN
         DBMS_OUTPUT.PUT_LINE (P_text);
         DBMS_OUTPUT.PUT_LINE ('today is: ' || TO_CHAR (P_date, 'Dy DD-Mon-YYYY'));
         DBMS_OUTPUT.PUT_LINE ('Tommorrow is: ' || TO_CHAR (p_next_date, 'Dy DD-Mon-YYYY'));
    END;
    /
    

    When you declare a VARCHAR2 variable, you must specify the maximum length.

    The | operator is used between two string expressions; Looks like you forgot the first operand in one place.

    Using a DATE where we expect a VARCHAR2 (as an operand to |, for example) is not technically an error, but it's a bad habit. TO_CHAR to create a string in any format you want.

  • There's no need to change the settings for windows update on RT

    Hello

    I can't find the option to change the settings for Windows Update on Surface with Win RT.

    I searched through the forums and answers, but on the left side of windows update, there is no option to change the settings on my surface.

    My windows update is configured to "Automatically install updates" and I can't change it.

    Thanks in advance for your help.

    Milan

    Configure your WiFi connection as connection meter and then check the settings of the meter connections - it allows to disable some updates and other actions which are data, unless you run them manually.

    Read this: http://windows.microsoft.com/en-GB/windows-8/metered-internet-connections-frequently-asked-questions

  • need to run an anonymous block

    Hi guys,.

    I have a proc as below.

    () proc_expl

    EmpID in number,

    Ename in varchar2,

    marks_typ brands);

    marks_type is the type of record which consists of 3 topics.

    marks_typ (number number sub1, sub2, sub3 number)

    and I declared with type of table of this record type.

    now I want to run anonymous block and I give the values of the parameters like below:

    declare

    EmpID in number,

    Ename in varchar2,

    marks_typ brands

    Start

    EmpID: = 123.

    Ename: = 'abc ',.

    Mark marks_typ: = marks_typ (55,67,78);

    () proc_expl

    EmpID = > empid.

    Ename = > ename,

    brands = > marks_typ);

    end;

    can someone please suggest me why this is not running properly.

    Thanks in advance!

    Rgds,

    LKR


    Try the below

    CREATE or REPLACE TYPE marks_type IS OBJECT (sub1 NUMBER (10),)

    Sub2 NUMBER (10),

    SUB3 NUMBER (10)

    );

    CREATE or REPLACE TYPE marks_typ IS TABLE OF THE marks_type;

    CREATE OR REPLACE PROCEDURE proc_expl (empid NUMBER,

    Ename VARCHAR2,

    brand marks_typ

    )

    AS

    v_marks marks_typ: = points;

    BEGIN

    BECAUSE me IN 1.v_marks. COUNTY

    LOOP

    DBMS_OUTPUT. Put_line (v_marks (i) .sub1 |) «, » || v_marks (i) .sub2 | «, » || v_marks (i). SUB3);

    END LOOP;

    END;

    SET SERVEROUTPUT ON

    DECLARE

    EmpID NUMBER;

    Ename VARCHAR2 (20);

    Mark marks_typ: = marks_typ();

    BEGIN

    EmpID: = 123;

    Ename: = 'abc ';

    Marks.extend;

    Marks (1): = marks_type (55,67,78);

    proc_expl (EmpID, Ename, mark);

    END;

    Execution: -.

    SQL > DECLARE

    2 empid NUMBER;

    3 ename VARCHAR2 (20);

    4 points marks_typ: = marks_typ();

    5 BEGIN

    6 empid: = 123;

    ename 7: = 'abc ';

    8 marks.extend;

    9 marks (1): = marks_type (55,67,78);

    10 proc_expl (empid, ename, marks);

    11 END;

    12.

    55,67,78

    PL/SQL procedure successfully completed.

    It may be useful

  • FRM - 40603:Records is no longer reserved for the update. Query for changes

    Hi I have a form that has been developing 6i and upgraded to 11g form work well in 6i, but when I try to do the same function in 11g get this error

    FRM - 40603:Records is no longer reserved for the update. Query for changes
    When I commit this execute_query (for_update); It is the form to clear values when it loads, the error comes when I try to delete

    How can I do this

    Action: If you want to change the block, you will need to re - interview.

    Captureerror3.PNG

    I use When-Timer-Expired (WTE) trigger

    You have a 'relationship' defined between the blocks of your master and detail? If so, simply update your master block and the block of details will automatically be re-interviewed. If you cannot use a relationship, then you can use can create a timer in the trigger that updates the database, then in the trigger When-Timer-Expired (WTE) you can go to the retail block and run a query. For example: / * the sample on change trigger * /.

    DECLARE
      timer_id  TIMER;
    BEGIN
    ....your code here that performs the update....
      /* Now create an instance of a timer */
      timer_id := Create_Timer ('upd_detail',1,NO_REPEAT);
    END;/* Sample Form Level When-Timer-Expired trigger */
    DECLARE
      timer_id  TIMER;
    BEGIN
      -- Find the timer first
      timer_id := FIND_TIMER('upd_detail');
      IF NOT ID_NULL(timer_id) THEN
          GO_BLOCK('DETAIL_BLOCK');
          Execute_Query;
      END IF;
    END;
    
  • How to run four procedures, in order, by using anonymous block

    Hello

    I am trying to run four procedures, in order, by using anonymous block. If one of the procedure fails remaining should get executed. How can I achieve this?
    For example:
    BEGIN
    PROC1;
    Proc2; -Suppose that Proc2 will fail, it should not affect the execution of Proc3 and proc 4
    Proc3;
    Proc 4;
    END;

    Thank you!

    Hello

    Maybe this can help you:

    BEGIN
      begin
        Proc1;
      exception
        when others then
          dbms_output.put_line('proc1 ' || sqlcode || ' ' || sqlerrm);
      end;
      begin
        Proc2;
      exception
        when others then
          dbms_output.put_line('proc2 ' || sqlcode || ' ' || sqlerrm);
      end;
      begin
        Proc3;
      exception
        when others then
          dbms_output.put_line('proc3 ' || sqlcode || ' ' || sqlerrm);
      end;
      begin
        Proc4;
      exception
        when others then
          dbms_output.put_line('proc4 ' || sqlcode || ' ' || sqlerrm);
      end;
    END;
    

    In your case, it may be useful if your procedures have their own exception handlers, so they never fail. But then you need a sort of exception information that is displayed.

    concerning
    Kay

  • Change of anonymous block to a stored procedure

    Hi, how can I modify this code to become a procedure stored instead of anonymous block. I need to pass the parameters on a regular basis. which means that I have to perform the procedure on a daily basis with specific parameters. I am running Oracle 11 g and coding with plsql. Thanks in advance for your help.

    DECLARE
      /*Your query as cursor */
      CURSOR emp_cur IS
        SELECT ename, sal FROM emp;

      /*UTL_SMTP related varriavles. */
      v_connection_handle  UTL_SMTP.CONNECTION;
      v_from_email_address VARCHAR2(30) := '[email protected]';
      v_to_email_address   VARCHAR2(30) := 'yyyy@[qr.com';
      v_smtp_host          VARCHAR2(30) := 'x.xxx.xxx.xxx'; --My mail server, replace it with yours.
      v_subject            VARCHAR2(30) := 'Your Test Mail';
      l_message            VARCHAR2(200) := 'This is test mail using UTL_SMTP';

      /* This send_header procedure is written in the documentation */
      PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
      BEGIN
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            pi_name || ': ' || pi_header || UTL_TCP.CRLF);
      END;

    BEGIN

      /*UTL_SMTP related coding. */
      v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host);
      UTL_SMTP.HELO(v_connection_handle, v_smtp_host);
      UTL_SMTP.MAIL(v_connection_handle, v_from_email_address);
      UTL_SMTP.RCPT(v_connection_handle, v_to_email_address);
      UTL_SMTP.OPEN_DATA(v_connection_handle);
      send_header('From', '"Sender" <' || v_from_email_address || '>');
      send_header('To', '"Recipient" <' || v_to_email_address || '>');
      send_header('Subject', v_subject);

      --MIME header.
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'MIME-Version: 1.0' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          ' boundary= "' || 'SAUBHIK.SECBOUND' || '"' ||
                          UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);

      -- Mail Body
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Type: text/plain;' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          ' charset=US-ASCII' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, l_message || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      FOR i IN emp_cur LOOP
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            i.ename || '--' || i.sal || UTL_TCP.CRLF);
     
      END LOOP;

      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);

      -- Close Email
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          '--' || 'SAUBHIK.SECBOUND' || '--' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);

      UTL_SMTP.CLOSE_DATA(v_connection_handle);
      UTL_SMTP.QUIT(v_connection_handle);
     
    EXCEPTION
      WHEN OTHERS THEN
        UTL_SMTP.QUIT(v_connection_handle);
        RAISE;
    END;

    CREATE OR REPLACE PROCEDURE BDA. PR_SEND_EMAIL

    (p_from_email_address VARCHAR2

    p_to_email_address VARCHAR2

    p_smtp_host VARCHAR2

    p_subject in VARCHAR2 DEFAULT "Test E-mail"

    p_message VARCHAR2 DEFAULT ' is the TEST mail with the help of UTL_SMTP "

    )

    IS

    / Request as cursor * /.

    CURSOR emp_cur IS

    SELECT ename, sal FROM emp;

    / * Related UTL_SMTP varriavles. */

    v_connection_handle UTL_SMTP. CONNECTION;

    / * This procedure of send_header is mentioned in the documentation * /.

    PROCEDURE send_header (pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS

    BEGIN

    UTL_SMTP. WRITE_DATA (v_connection_handle, pi_name |) ': ' || pi_header | UTL_TCP. CRLF);

    END;

    BEGIN

    / * Associated with coding UTL_SMTP. */

    v_connection_handle: = UTL_SMTP. OPEN_CONNECTION (host-online p_smtp_host);

    UTL_SMTP. HELO (v_connection_handle, p_smtp_host);

    UTL_SMTP. MAIL (v_connection_handle, p_from_email_address);

    UTL_SMTP. RCPT (v_connection_handle, p_to_email_address);

    UTL_SMTP. OPEN_DATA (v_connection_handle);

    send_header ('from', "" sender" <' ||="" p_from_email_address="" ||="" '="">" ");

    send_header ('To', ' "receiver" <' ||="" p_to_email_address="" ||="" '="">"");

    send_header ('Subject', p_subject);

    -MIME header.

    UTL_SMTP. WRITE_DATA (v_connection_handle, "MIME-Version: 1.0 ' |") UTL_TCP. CRLF);

    UTL_SMTP. WRITE_DATA (v_connection_handle, ' Content-Type: multipart/mixed;) ' || UTL_TCP. CRLF);

    UTL_SMTP. WRITE_DATA (v_connection_handle, ' boundary = "' | '") CARINE. SECBOUND' | '"' || UTL_TCP. CRLF);

    UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF);

    -Body of the message

    UTL_SMTP. WRITE_DATA (v_connection_handle, '-' |) "JOHAN. SECBOUND' | UTL_TCP. CRLF);

    UTL_SMTP. WRITE_DATA (v_connection_handle, ' Content-Type: text/plain;) "|| UTL_TCP. CRLF);

    UTL_SMTP. WRITE_DATA (v_connection_handle, 'charset = US-ASCII' |) UTL_TCP. CRLF);

    UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF);

    UTL_SMTP. WRITE_DATA (v_connection_handle, p_message |) UTL_TCP. CRLF);

    UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF);

    I'm IN emp_cur

    LOOP

    UTL_SMTP. WRITE_DATA (v_connection_handle, i.ename |) '--' || i.SAL | UTL_TCP. CRLF);

    END LOOP;

    UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF);

    -E-mail nearby

    UTL_SMTP. WRITE_DATA (v_connection_handle, '-' |) "JOHAN. SECBOUND' | '--' || UTL_TCP. CRLF);

    UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF. '.' || UTL_TCP. CRLF);

    UTL_SMTP. CLOSE_DATA (v_connection_handle);

    UTL_SMTP. Quit (v_connection_handle);

    EXCEPTION

    WHILE OTHERS THEN

    UTL_SMTP. Quit (v_connection_handle);

    LIFT;

    END;

    /

    CREATE OR REPLACE SYNONYM PUBLIC PR_SEND_EMAIL OF BDA. PR_SEND_EMAIL;

    BEGIN

    BDA. PR_SEND_EMAIL (p_from_email_address => ' [email protected]')

    , p_to_email_address => ' [email protected]'

    , p_smtp_host-online 'x.xxx.xxx.xxx '.

    p_subject-online "TEST Your Mail"

    p_message-online "Is the TEST mail with the help of UTL_SMTP"

    );

    EXCEPTION, THEN THAN OTHERS

    THEN DBMS_OUTPUT. Put_line ('ERROR in the procedure PR_SEND_EMAIL-' |) SQLERRM);

    LIFT;

    END;

    /

  • Works of anonymous block - failure of the procedure

    Hi guys,.

    I am new to PL/SQL, and right now, I have problems with a new procedure.

    If I execute the instructions of an anonymous block, then everything works fine.
    As a stored procedure, it fails: PLS-00306: wrong number or types of arguments.

    I don't understand - could you please help me?


    Oracle Database 10 g Express Edition Release 10.2.0.1.0 - product
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE 10.2.0.1.0 Production."
    AMT for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production


    The procedure inserts data in multiple tables - so the original procedure has 800 lines.
    I tested it with a shorter version, but it still does not work as a procedure.


    Here is the execute statement:
    begin
    P_P5020_test (
      i_GespAnrede_tx                   => 'Herr',
      i_GespName_tx                     => 'GespName',
      i_GespVorname_tx                  => 'GespVorname',
      i_GespTitel_tx                    => 'GespTitel',
      i_GespStelle_tx                   => 'GespStelle',
      i_GespFunktion_isn                => 1,
      i_GespBereich_isn                 => 1,
      i_GespTelNr_nr                    => '1111',
      i_GespTelNrArt_isn                => 1,
    -- Daten vom Ansprechpartner:
      i_ApAnrede_tx                     => 'Frau',
      i_ApName_tx                       => 'ApName',
      i_ApVorname_tx                    => 'ApVorname',
      i_ApTitel_tx                      => 'Aptitel',
      i_ApStelle_tx                     => 'ApStelle',
      i_ApFunktion_isn                  => 2,
      i_ApBereich_isn                   => 2,
      i_ApTelNr_nr                      => '2222',
      i_ApTelNrArt_isn                  => 1,
    -- Allgemeine Parameter:
      i_UN_nr                           => 110532,
      i_TelNr_isn                       => 54,
      i_hiber_isn                       => 4,
      i_AnlVon_tx                       => 'SMY',
      i_TaskArt_isn                     => 12,
      i_Bemerkung_tx                    => 'Bemerkung'
             );
    END; 
    and here is the procedure:

    create or replace
    PROCEDURE p_P5020_test
    --
    -- Parameter:
    --
      (
    -- Daten vom Gesprächspartner:
      i_GespAnrede_tx varchar2,
      i_GespName_tx varchar2,
      i_GespVorname_tx varchar2,
      i_GespTitel_tx varchar2,
      i_GespStelle_tx varchar2,
      i_GespFunktion_isn number,
      i_GespBereich_isn number,
      i_GespTelNr_nr varchar2,
      i_GespTelNrArt_isn number,
    -- Daten vom Ansprechpartner:
      i_ApAnrede_tx varchar2,
      i_ApName_tx varchar2,
      i_ApVorname_tx varchar2,
      i_ApTitel_tx varchar2,
      i_ApStelle_tx varchar2,
      i_ApFunktion_isn number,
      i_ApBereich_isn number,
      i_ApTelNr_nr varchar2,
      i_ApTelNrArt_isn number,
    -- Allgemeine Parameter:
      i_UN_nr number,
      i_TelNr_isn number,
      i_hiber_isn number,
      i_anlVon_tx varchar2,
      i_TaskArt_isn number,
      i_sonstGrund_tx varchar2,
      i_Bemerkung_tx varchar2,
    -- für die Task:
      i_BeginnDatum_dt date,
      i_BeginnZeit_ts timestamp,
      i_FaelligVonDatum_dt date,
      i_FaelligVonZeit_ts timestamp,
      i_FaelligBisDatum_dt date,
      i_FaelligBisZeit_ts timestamp,
      i_TaskPrio_isn number
      )
    --
    --------------------------------------------------------------------------------
    --
    IS
    --
    -- Variablen:
    --
      v_MA_nr number := 4;
      v_GespBez_nr number;                -- return BezNr vom Gesprächspartner
      v_ApBez_nr number;                  -- return BezNr vom Ansprechpartner
      v_Task_nr number;                   -- return TaskNr für die Kon
      v_TaskThema_tx varchar2(40);            -- anhand taskart ermitteln
    -- für die Beziehung:
      v_BezGueltigVon_dt date := sysdate;
      v_BezGueltigBis_dt date := to_date('31.12.2099', 'DD.MM.YYYY');
    -- für die Notiz / Kon:
      v_KonThema_tx varchar2(40);
      v_KonArt_isn number;
      v_KonWeg_isn number := 2;           -- 2 = Telefon
      v_KonDatum_dt date := sysdate;
      v_KonUhrzeit_ts timestamp := systimestamp;
    --
    --
    --------------------------------------------------------------------------------
    --
    BEGIN
    -- select into für variablen durchführen
    --
    --
    -- v_taskThema_tx füllen
      IF i_taskArt_isn != 999999
      THEN
        SELECT
          TASK_ART_NAME
        INTO v_taskThema_tx
        FROM T_TASK_ART
        WHERE task_art_isn = i_taskArt_isn;
    
    --
    --
    -- v_KonArt_ISN füllen
        IF i_TaskArt_isn = 10    -- Nennung verweigert
        THEN v_KonArt_ISN := 13;
        END IF;
        IF i_TaskArt_isn = 11    -- krank 
        THEN v_KonArt_ISN := 7; 
        END IF;
        IF i_TaskArt_isn = 12    -- Urlaub
        THEN v_KonArt_ISN := 8;
        END IF;
        IF i_TaskArt_isn = 13    -- nicht am Platz
        THEN v_KonArt_ISN := 9;
        END IF;
        IF i_TaskArt_isn = 14    -- Feierabend
        THEN v_KonArt_ISN := 10;
        END IF;
        IF i_TaskArt_isn = 15    -- Besprechung
        THEN v_KonArt_ISN := 11;
        END IF;
        IF i_TaskArt_isn = 16    -- zu Tisch
        THEN v_KonArt_ISN := 12;
        END IF;
        IF i_TaskArt_isn = 17    -- sonstiger Grund
        THEN v_KonArt_ISN := 14;
        END IF;
    --
    --
    -- v_konThema_tx füllen
        SELECT
          kon_art_name
        INTO v_konThema_tx
        FROM T_KON_ART
        WHERE kon_art_isn = v_konArt_isn;
    --
    --
      END IF; -- i_taskArt_isn != 999999
    --
    --
    --------------------------------------------------------------------------------
    --
    --
    --
        IF i_ApName_tx IS NOT NULL      -- AP gefüllt? 
     -- dann Gesp anlegen
        THEN
          INSERT INTO t_bez
            (
            bez_un_nr,
            bez_anrede,
            bez_titel,
            bez_name,
            bez_vorname,
            bez_stelle,
            bez_funktion_isn,
            bez_bereich_isn,
            bez_bemerkung,
            bez_gueltig_von,
            bez_gueltig_bis,
            bez_anlvon
            )
          VALUES
            (
            i_un_nr,              -- bez_un_nr
            i_GespAnrede_tx,      -- bez_anrede
            i_GespTitel_tx,       -- bez_titel
            i_GespName_tx,        -- bez_name
            i_GespVorname_tx,     -- bez_vorname
            i_GespStelle_tx,      -- bez_stelle
            i_GespFunktion_isn,   -- bez_funktion_isn
            i_GespBereich_isn,    -- bez_bereich_isn
            'Als Gesprächspartner angelegt, '||           -- bez_bemerkung 
            to_char(sysdate, 'DD.MM.YYYY - hh24:mi')||
            ' '||
            i_AnlVon_tx||
            ' ',                  
            v_BezGueltigVon_dt,   -- bez_gueltig_von
            v_BezGueltigBis_dt,   -- bez_gueltig_bis
            i_AnlVon_tx           -- bez_anlvon        
            )
          RETURN t_bez.bez_nr INTO v_GespBez_nr;
      -- telefonnummer anlegen
          INSERT INTO t_telnr
            (
            telnr_von,
            telnr_vonnr,
            telnr_nr,
            telnr_art_isn,
            telnr_anlvon
            )
          VALUES
            (
            'BEZ',                  -- telnr_von
            v_GespBez_nr,           -- telnr_vonnr
            i_GespTelNr_nr,         -- telnr_nr
            i_GespTelNrArt_isn,     -- telnr_art_isn
            i_AnlVon_tx             -- telnr_anlvon        
            )
          ;
    --
    --
    -- jetzt AP anlegen
          INSERT INTO T_BEZ
            (
            bez_un_nr,
            bez_anrede,
            bez_titel,
            bez_name,
            bez_vorname,
            bez_stelle,
            bez_funktion_isn,
            bez_bereich_isn,
            bez_bemerkung,
            bez_gueltig_von,
            bez_gueltig_bis,
            bez_anlvon        
            )
          VALUES
            (
            i_un_nr,            -- bez_un_nr
            i_ApAnrede_tx,      -- bez_anrede
            i_ApTitel_tx,       -- bez_titel
            i_ApName_tx,        -- bez_name
            i_ApVorname_tx,     -- bez_vorname
            i_ApStelle_tx,      -- bez_stelle
            i_ApFunktion_isn,   -- bez_funktion_isn
            i_ApBereich_isn,    -- bez_bereich_isn
            'Als Ansprechpartner angelegt, '||           -- bez_bemerkung 
            to_char(sysdate, 'DD.MM.YYYY - hh24:mi')||
            ' '||
            i_AnlVon_tx||
            ' ',                  
            v_BezGueltigVon_dt,   -- bez_gueltig_von
            v_BezGueltigBis_dt,   -- bez_gueltig_bis
            i_AnlVon_tx           -- bez_anlvon          
            )
          RETURN t_bez.bez_nr INTO v_ApBez_nr;
    -- jetzt TelNr anlegen
          INSERT INTO t_telnr
            (
            telnr_von,
            telnr_vonnr,
            telnr_nr,
            telnr_art_isn,
            telnr_anlvon
            )
          VALUES
            (
            'BEZ',                -- telnr_von
            v_ApBez_nr,           -- telnr_vonnr
            i_ApTelNr_nr,         -- telnr_nr
            i_ApTelNrArt_isn,     -- telnr_art_isn
            i_AnlVon_tx           -- telnr_anlvon        
            )
          ;  
        END IF; -- i_ApName_tx IS NOT NULL
    --
    ---------------------------------------
    --
    --
    -- AP nicht gefüllt:
    --
        IF i_ApName_tx IS NULL
        THEN
      -- Gesprächspartner als Ansprechpartner anlegen
          INSERT INTO t_bez
            (
            bez_un_nr,
            bez_anrede,
            bez_titel,
            bez_name,
            bez_vorname,
            bez_stelle,
            bez_funktion_isn,
            bez_bereich_isn,
            bez_bemerkung,
            bez_gueltig_von,
            bez_gueltig_bis,
            bez_anlvon
            )
          VALUES
            (
            i_un_nr,              -- bez_un_nr
            i_GespAnrede_tx,      -- bez_anrede
            i_GespTitel_tx,       -- bez_titel
            i_GespName_tx,        -- bez_name
            i_GespVorname_tx,     -- bez_vorname
            i_GespStelle_tx,      -- bez_stelle
            i_GespFunktion_isn,   -- bez_funktion_isn
            i_GespBereich_isn,    -- bez_bereich_isn
            'Als Ansprechpartner angelegt, '||           -- bez_bemerkung 
            to_char(sysdate, 'DD.MM.YYYY - hh24:mi')||
            ' '||
            i_AnlVon_tx||
            ' ',                  
            v_BezGueltigVon_dt,   -- bez_gueltig_von
            v_BezGueltigBis_dt,   -- bez_gueltig_bis
            i_AnlVon_tx           -- bez_anlvon        
            )
          RETURN t_bez.bez_nr INTO v_ApBez_nr;    -- Achtung: wird als AP angelegt!
      -- telefonnummer anlegen
          INSERT INTO t_telnr
            (
            telnr_von,
            telnr_vonnr,
            telnr_nr,
            telnr_art_isn,
            telnr_anlvon
            )
          VALUES
            (
            'BEZ',                  -- telnr_von
            v_ApBez_nr,           -- telnr_vonnr ACHTUNG: vom AP!
            i_GespTelNr_nr,         -- telnr_nr
            i_GespTelNrArt_isn,     -- telnr_art_isn
            i_AnlVon_tx             -- telnr_anlvon        
            )
          ;      
        END IF; -- i_ApName_tx IS NULL
    --------------------------------------------------------------------------------
    --
    END;
    Here are the variables of the anonymous block work - the instructions are the same:
    declare
      i_GespAnrede_tx varchar2(4)       := 'Herr';
      i_GespName_tx varchar2(60)        := 'GespName';
      i_GespVorname_tx varchar2(30)     := 'GespVorname';
      i_GespTitel_tx varchar2(10)       := 'GespTitel';
      i_GespStelle_tx varchar2(60)      := 'GespStelle';
      i_GespFunktion_isn number         := 1;
      i_GespBereich_isn number          := 1;
      i_GespTelNr_nr varchar2(20)       := '111111';
      i_GespTelNrArt_isn number         := 1;
    -- Daten vom Ansprechpartner:
      i_ApAnrede_tx varchar2(4)         := 'Frau';
      i_ApName_tx varchar2(60)          := 'ApName';
      i_ApVorname_tx varchar2(30)       := 'ApVorname';
      i_ApTitel_tx varchar2(10)         := 'ApTitel';
      i_ApStelle_tx varchar2(60)        := 'ApStelle';
      i_ApFunktion_isn number           := 2;
      i_ApBereich_isn number            := 2;
      i_ApTelNr_nr varchar2(20)         := '222222';
      i_ApTelNrArt_isn number           := 1;
    -- Allgemeine Parameter:
      i_UN_nr number                    := 110532;
      i_TelNr_isn number                := 54;
      i_hiber_isn number                := 4;
      i_AnlVon_tx varchar2(5)           := 'SMY';
      i_TaskArt_isn number              := 12;
      i_sonstGrund_tx varchar2(15);
      i_Bemerkung_tx varchar2(50);
      --
      v_MA_nr number := 4;
      v_GespBez_nr number;                -- return BezNr vom Gesprächspartner
      v_ApBez_nr number;                  -- return BezNr vom Ansprechpartner
      v_Task_nr number;                   -- return TaskNr für die Kon
      v_TaskThema_tx varchar2(40);            -- anhand taskart ermitteln
    -- für die Beziehung:
      v_BezGueltigVon_dt date := sysdate;
      v_BezGueltigBis_dt date := to_date('31.12.2099', 'DD.MM.YYYY');
    -- für die Notiz / Kon:
      v_KonThema_tx varchar2(40);
      v_KonArt_isn number;
      v_KonWeg_isn number := 2;           -- 2 = Telefon
      v_KonDatum_dt date := sysdate;
      v_KonUhrzeit_ts timestamp := systimestamp;
    Why is - it works for anonymous block - bute the procedure fails with PLS-00306: wrong number or types of arguments?

    Thank you

    Sven

    Edited by: 923182 the 25.03.2012 06:38

    Welcome to the forum!

    Thank you for providing your information to Oracle version. You must provide this whenever you post a new question.

    All parameters for procedures and functions must be listed in the method call unless the parameter has a DEFAULT value.

    You said a procedure with 32 settings but have listed only 24 in the method call.
    It's ok if the 8 other parameters have default values, but they do not. You can use NULL by DEFAULT, if a parameter does not need to have a value or cannot be used.

    Your anonymous block does not call the procedure, there is no 'settings', that's why you don't see the problem there.

    See specification of default values for the parameters of subprogramme in the PL/SQL language reference
    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28370/subprograms.htm#i23202

    >
    By initializing formal IN the settings to the default values, you can pass a different number of actual parameters to a subprogram, accepting the default values to the actual parameters is omitted. You can also add new formal parameters without having to change all calls to the subprogramme.

    If a real parameter is omitted, the default value of the corresponding formal parameter is used.

    You can't ignore a formal parameter by omitting its actual parameter. To omit the first parameter and specify the second, use named notation (see passing parameters real subprogramme positional, Named or mixed Notation).

    You cannot assign NULL to an uninitialized formal parameter by omitting its actual parameter. You must assign NULL as default or explicitly pass null.
    >
    You can also use nototation "Named" when you specify parameters by name

    See passing parameters real subprogramme positional, Named or mixed Notation in the same doc.

    raise_salary(amount => bonus, emp_id => emp_num);
    

Maybe you are looking for