Transfer while calling the function of a trigger

Hello

I would appreciate if someone can point me in the right direction. So I have a trigger (TableAR_BU) on a table table. This trigger, I have a logic to call the function, and inside this function, I'm just a select statement of a few other tables that the table table.
Function is supposed to return me 'Y' and it done correctly returns me 'Y' if I select the double feature. -Select the Function1 (100) twice;

But when I call the trigger function, it returns me 'n'. So after investigation, I found that the select statement (selection of table) inside the function returns NULL when called from trigger.
 
DROP TRIGGER TableAR_BU;

CREATE OR REPLACE TRIGGER TableAR_BU
BEFORE UPDATE
ON TableAR_BU REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
declare
 localcontext varchar2(32000) := '; Context : ';
 sqlstmt varchar2 (2000);

 Status varchar2(1);

Status := Function1(:new.Id);


End;
/


function Function1(al_Id in TableAR.Id%type)
RETURN  varchar2 is

lsItemId TableAR.itemId%type;

Begin

Select itemId into lsItemId
from TableAR
where id = al_Id;



Exception

End Function1;
Suggestions or comments appreciated.

Edited by: Eclipse01 may 1, 2012 11:29

The problem is that a level trigger line on table cannot query table or whatever it is that questions table call. In the middle of a SQL statement, the table is potentially in an invalid intermediate state if Oracle cannot guarantee that queries on the table return consistent or reasonable results so it does not allow queries of this type.

99 + % of the time, it's a good thing because it means that you are trying to use triggers for something they are not designed for (in addition to creating applications that are terribly difficult to manage because an action like update a line will eventually create a huge cascade of effects). Most of the time, you are much better to reconsider the architecture and the displacement of the function call out of the trigger and in a sort of API that wraps the UPDATE statement (that is a stored procedure that made the UPDATE and calls the procedure).

In the <1% of="" the="" cases="" where="" you=""> really want to do in a trigger, you would need a combination of objects (or a trigger composed containing several sections in 11 g). You would need
-A package with a collection of table primary keys
-A before the declaration that clears this collection
-A level trigger line which inserts the: new. ID in the collection
-A trigger statement that iterates over the collection and calls the function after.

That, however, is a lot of moving parts to deal with, so it dramatically increases the complexity. If you only want to consider if you are really convinced that you must use triggers in the first place.

Justin

Tags: Database

Similar Questions

  • MuseJSAssert: Error calling the function switch: ReferenceError: Spry is undefined.

    I started Muse today and he said there was an update available. I installed and then made a few small changes on my 5 page site. Then I exported the HTML code and uploaded to my server.

    But now when I try to navigate the site in Chrome, I get the following error message:

    MuseJSAssert: Error calling the function switch: ReferenceError: Spry is undefined.

    The only changes I made were adding text to a few pages and adding metadata to each page information and displaying HTML exported locally (before transfer) everything behaves as it should... an error message.

    Any ideas why its doing this? or, more importantly, any suggestions on how to stop it from doing this? He did not have that yesterday before get me these small changes.

    Here's the URL: www.gardensbytheseaursery.com

    Thanks in advance.

    Jake

    This error occurs if all of the files for the site that we downloaded.

    The 2.0 update includes numerous improvements in the generated HTML, CSS and JavaScript, so while you can directly changing only some pages, if you are using an external FTP client all the exported files, and the files must be downloaded. (The new built-in FTP support automatically only generates and download the files that have changed since the previous download.)

  • Get this error on pages MuseJSAssert: error calling the function switch: TypeError: $(...). museMenu is not a function. Have read and did what I could find to solve problems.

    Hi I keep getting the error MuseJSAssert: error calling the function switch: TypeError: $(...). museMenu is not a function on my Web site which is not published, but I am downloading in British Colombia through muse.

    I'm on a PC.

    I tried export to HTML and still have the same problems locally.

    I saw that someone had a problem with mailchimp forms in one of a previous post. I removed the a widget of external source? for reservation and it was always happening.

    I created a new project like this and downloaded BC site all the files again to see if she could make a difference but still have the error.

    It's my URL BCdraft - home

    I tried to look at the site in the section "console" (where you can see the code of pages) to see if I could see the error that people had already advised but I get nothing... maybe not completely published because?

    I have reloaded the site through the muse in British Colombia with "all files" and is always the same.

    Here are some pictures that can help...

    Once on the home page, it may come with the error immediately or not... If you choose to say the title of the FAQ

    choose faq.png

    You must then (or choose other titles until it is) have this error coming...

    error.png

    Note that the title you have previously chosen as 'FAQ' now as 'price '.

    Changes to old title pricing.png

    This title is for some time and seems strange appears again.

    Here is a picture of scripts/css in the admin of BC as I've seen that this can be a problem but I don't know if this is normal or not and how to fix...

    cpanel.png

    I had taken a break from building the site for about a month and I had added on changes, but not them uploaded to the server just left saved on my PC.

    In the hope of an easy solution; p

    See you soon,.

    Steve.

    I published BC... what I wanted to say is that I did not live.

    Export HTML was to check if the error occurred in the HTML files locally.

    It ended up being a code of the external widget that was causing the problem. With him removed the pages work fine. (I had removed what I thought of them while troubleshooting, but I forgot to a separate embedded image)

    Specifically, it is because it was a pop-up overlay widget made for reservations. When I put it to then start a new page in the tab it works now. Seems that muse has changed to something allowing overlays?

    My thanks to Neha in support

  • Call the function in LabView from a DLL, and then access the global variable of DLL

    I've created a DLL in LabWindows with a function and structure.  I want to call the function from LabView and then access the overall structure.  I am able to call the function in the DLL with a "call library function node" and has access to the return value, but I can't understand how to access the overall structure.  The structure is declared in the header DLL with __declspec (dllimport) struct parameters file.

    Is it possible to access this structure without using the library of network variables?

    My guess is that you need two bytes of padding after "in_out" and another to two bytes of padding after "anin."  The reason being that ints are 4 bytes, and most of them C compilers will align on 4-byte boundaries.  The struct will naturally start to such a limit (in fact, in Windows, it will probably start to an 8 byte boundary).  If you then count bytes in your structure, you are 70 byte after "in_out."  70 is not divisible by 4, so you need 2 bytes more to reach the next 4 byte boundary.  You can also you could reorganize your struct so that "anin" follows "in_out" and this is probably the best option if it won't cause you other problems.

    Unlike most C compilers, LabVIEW compressed structures as closely as possible, without filling.  I don't know enough about the history of LabVIEW and internal parts to explain the reasons and to do this performance penalty, but, as choice of LabVIEW "endianness", it is probably a remnant of the first versions of LabVIEW that were running on the Mac.

    If for some reason you want to force your C struct to match package LabVIEW, you can use the #pragma pack (x) directive, but I wouldn't recommend that here because you can control the C and LabVIEW.

    EDIT: in the cases where it was not clear, add padding to your cluster of LabVIEW, insert appropriate size or items at the place desired in the cluster.

  • How to identify which switch in the Panel called the function?

    Here I have some 192 switches and 192 leds corresponding to each switch,

    If a switch is on(say 10th) consequence (10th) led should light up.

    I want to use the same function for all pairs of led switch.

    all I could do was to check the switch in a loop and then set the individual leads, but I find it very little effective way to do it.

    int switchOnOff (int, int int event control panel CVICALLBACK,
    void * callbackData, int eventData1, int eventData2) is the function.

    None of these arguments I can use it to extract what (the unique id for this turnout) switch called the function so that I can pass corresponding led glow?

    It occurred to me now that the table is not necessary at all: you can simply assign to each switch the corresponding ID led the callbackData, so that the code is even simpler than my previous:

    // At panel load:
    SetCtrlAttribute (panelHandle, PANEL_SWITCH1, ATTR_CALLBACK_DATA, (void *)PANEL_LED1);
    ...
    SetCtrlAttribute (panelHandle, PANEL_SWITCH192, ATTR_CALLBACK_DATA, (void *)PANEL_LED192);
    
    // In the control callback
    GetCtrlVal (panel, control, &sts);
    SetCtrlVal (panel, (int)callbackData, sts);
    

    To answer your last question, "Management Board" means immediately after the call to LoadPanel.

  • Call the function in the UI part without head

    I develop some app with no head.

    When I change the code in the head part and build - launch. But nothing changes in the part without a head.

    I have another solution call the function in the UI part headless. But whatever it is called.

    Please help me solution?

    The part without head of a long walk without head application is still running in the background. It will not update until you stop the part without a head.

    To stop the game without leading the race, you have three choices:
    (1) build increment in the bar file version - descriptor.xml. This will force the part without head to stop and restart with the new code.

    (2) use the monitor of the device to manually stop your application from running. Then, new launch and your game without head will run the new code.

    3) to implement your own way without a head, like a button that would send a personalized call to headless with (say) action "com.myDomain.myAppName.SHUTDOWN" and when headless receive this invocation, operate you this line:
    BB::application::instance()-> quit()
    This will make the part without head stop, then you run and your part without head will take place the new code.

    I prefer the #3 method, but if you do, don't forget to hide this feature before releasing to the public.

  • How to call the function "remote address book look up" J2ME app?

    We develop J2ME on BB and call the function "search of remote address book." any API we can use? Thank you very much!

    You can use BlackBerryContactList J2ME

  • Call the function QML from C++ (simple question)

    I guess that's a pretty easy question but I'm a bit new apart from development c ++ of BB10. I have a QML file in the assets folder called Functions.qml which has only onne inside functions.

    import bb.cascades 1.3
    
    Page {
        objectName: "funct"
        function printStat() {
            console.log("hello");
        }
    }
    

    In one of the functions in applicationui.cpp there is a function called resendNotification() (you may know this code from the model of the app without head)

    void ApplicationUI::resendNotification()
    {
        InvokeRequest request;
        request.setTarget("com.example.TestNotificationService");
        request.setAction("com.example.TestNotificationService.RESET");
        m_invokeManager->invoke(request);    // --> call the printStat() function of Functions.qml file
        Application::instance()->minimize();
    }
    

    My question is, before you minimize the app How can I call the function printStat() of the qml file? I have always developed my apps in QML so never had to deal with c ++. Should be easy enough to call a function well.

    Thank you in advance!

    first step is to find the object by ObjectName using findChild, usually from your element root (navigationPane).
    example:
    NAV-> findChild ("myTextField")

    If you have the object of another source that is fine too, of course.

    second step is to use QMetaObject::invokeMethod with the object and the name of the method.
    Example:
    QMetaObject::invokeMethod (container, "setText", Q_ARG (QVariant, text));

  • call the function onCreationCompleted c ++ in qml

    I currently have a problem with the c function call ++ QML.

    Œuvres of normal calls. But when I call a function in onCreationCompleted, he cannot access qml object on the page.

    For example:

    {Page}

    onCreationComplete:

    {myFunction() ;}

    Button {}

    ojbectName: "button1".

    }

    }

    MyFunc access using findChild button1.

    But this return 0 x 0, means the button does not exist.

    So how do I access button1 in c ++ to what page is loaded?

    I have posted from a phone, so sorry if there is no error.

    Look, we can't access the qml object when the page is created (we call it in onCreationCompleted). I bypassed by calling the function after navigationpane.push.

  • Calling the functions to Iscript

    Hello world

    I hope you all do well. I just want to confirm one thing, is it possible to call functions in Iscript? If so please guide me. Right now I have an Iscript file in hundreds of lines of code. I want to break these lines of code in different functions and call the functions where they needed.

    Thank you

    Take a look at WEBLIB_PORTAL. PORTAL_ADMIN. FieldFormula

    Function: IScript_AdminSiblingNav()

    There are several calls to another position within the IScript.

  • Call the function to another tool

    Hi all

    We have used a tool to multiple functions, can I possible to call specific function in the new tool.

    Example:

    Tool 1 (existing)

    Function 1

    2 function

    Function 3

    Function 4

    Tool 2 (new)

    Calling the function (function 1 + 1 tool)

    Thanks in advance,

    Selva

    Possible Yes... use

    #includepath "path of the folder script your tool 1.

    #include "... / outil1 script name.jsx.

  • MuseJSAssert: Error calling the function switch: TypeError: undefined is not an object (evaluation of "a.rules")

    I have this error on my Web site every time that I go. It disappears when I refresh three times.

    "MuseJSAssert: error calling the function switch: TypeError: undefined is not an object (evaluation of"a.rules").

    I downloaded the site with Filezila.

    Please help, what's wrong here?

    Thank you

    Hi Barbara,

    The question began to happen after you downloaded using the latest version of Muse?

    If so, can you try to remove the old files of the web server and re-upload using Muse?

    Kind regards

    Akshay

  • JavaScript exception: error calling the function switch: TypeError: undefined is not an object (evaluation "jQuery.browser.msie") - HOW I ME get RID OF THIS

    Screen Shot 2015-12-12 at 16.54.47.pngScreen Shot 2015-12-12 at 17.01.45.png

    Hello

    I get these errors a lot lately on my sites of muse - it happens when I rename pages or change the navigation menu - I tried several times and this isn't to do with external plugins - this is a bug of muse - appears when my loading sites and also when you select a page in the navigation bar - in the past for a single page websites - I just copy the contents in memory - remove the rebonding and page - everything and it works again - of course, I don't want to do that with Web sites with multiple pages - in the past, anyone in the forum mentioned deleting a file of muse on the server to reset something - any who want to add to it or guide me to solve these problems, so I know what to do when they arrive

    Jay

    Don't know if it's the same thing, but share this discussion JavaScript exception: error calling the function of selection: [object error] after the last update of the software Adobe Muse.  I export the html files and load them on my server.  I replaced all the files.  Only happens in IE11 just in case it helps.

  • MuseJSAssert: Error calling the function switch: TypeError: D.split is not a function

    I have this problem in my site:

    MuseJSAssert: Error calling the function switch: TypeError: D.split is not a function

    error-2.jpg

    and it's the loading error, please help!

    http://musecdn2.BusinessCatalyst.com/scripts/4.0/jQuery-1.8.3.min.js

    error-1.jpg

    I think it's solved now, please check the response of Zak here:

    https://forums.Adobe.com/thread/1879186

    Thank you

    Sanjit

  • MuseJSAssert: Error calling the function switch: TypeError: cannot read property 'msie' undefined

    Hello I have this JS error on my portfolio website.

    yeaforideas.com

    I tried to export to html and uploading this file on my FTP host site, but it did not work. We hope to have it resolved soon. Please advice. Thank you!

    Hi Yes,

    Please see the following post: MuseJSAssert: error calling the function switch: TypeError: 'undefined' is not a function (assessment ' )

    Kind regards

    Akshay

Maybe you are looking for

  • ePrint to email works only with D110a

    I set up the account online and has e-mail for use with the printer. Next, I added 6 e-mail addresses that were valid senders. When e-mail is sent, no email verification is returned and nothing print or appear in the actiitylg for this printer.  I tr

  • PROTECTED R700 on docking station / command screen

    Hello I'm on a Toshiba protégé R700 on a docking station and I have problems in installing the screen of the built-in or external.Is it really necessary to press FN + F5 to switch the view when the apparatus? My scenario: Laptop on the dock, using ex

  • Satellite P20: Fn + F5 and TV-button does not work

    Satellite P20, keyboard of Windows XP SP2 problem.When I press Fn + F5, the computer does not show that earlier the different display options. TV button does not work also. I can change the different views with my nVidia Display Driver. My keyboard i

  • Question from newbie GPIB on multiple devices

    Hello, I'll work on the reproduction of a test bench that communicates through GPIB. I've never worked with GPIB and I'm looking for a list of hardware to buy to reproduce this system and have a question. I'm having 2 GPIB devices, one on the address

  • BlackBerry Smartphones how can I do a factory reset without going into the blackberry software?

    Hello My Blackberry Curve 8520 I just "App Error 523". Whether the bust means that I have to do a FACTORY RESET, but I was wondering how to do this without using the Blackberry Desktop software? I wonder if the blue keys inside Blackberry anything on