Is there any way to pass value  to a trigger

while deleting a record by procedure .. with help of trigger i m inserting that deleted record in another table , but i need user_id wihch is passed to procedure

Your deleting procedure can set a global variable in a package, and your trigger can access that variable. Here is a rough outline:
CREATE OR REPLACE PACKAGE SESSION_GLOBALS_PKG AS
TRANSACTION_USER_NAME VARCHAR2(30);
END  SESSION_GLOBALS_PKG ;
CREATE OR REPLACE PROCEDURE ROW_DELETE_PROCEDURE (IN_ROW_KEY IN MY_TABLE.KEY_COLUMN%TYPE, IN_TRANSACTION_USER IN VARCHAR2(30))
AS
BEGIN
  SESSION_GLOBALS_PKG.TRANSACTION_USER_NAME := IN_TRANSACTION_USER;
  DELETE FROM MY_TABLE WHERE KEY_COLUMN = IN_ROW_KEY;
END ROW_DELETE_PROCEDURE ;
CREATE OR REPLACE TRIGGER MY_TABLE_TRIGGER
BEFORE DELETE ON MY_TABLE FOR EACH ROW
WHO_DELETED_ME := SESSION_GLOBALS_PKG.TRANSACTION_USER_NAME;
END MY_TABLE_TRIGGER;
/

Similar Messages

  • Is there any way to pass value from one SWF to another ?

    I am doing project using flash, now I cant pass a value from one SWF to another, is there any way to pass value from one SWF to another.
    thanks

    Hi,
    Just to confirm here do you simply want to communicate between two SWFs without involving Flash Media Server. If this is the case one good way of doing it is to use a local connection. It can be used for direct communication between two separate instances of the flash player. However if you want to involve multiple clients sharing a common variable then you may have to use Shared Object for this. Please let me know what is the actual use case, is it multiple clients sharing a common variable or different player instances communicating between themselves.
    Thanks,
    Abhishek

  • Is there any way to pass in JVM tunable params to OC4J containers?Ex: -Xmx256 ...

    Is there any way to pass in JVM tunable params to OC4J containers?
    1. Switch to -server rather than -classic
    2. Min/Max Memory configuration
    3. pass in tunable GC params
    Passing parameters to the JVM when executing dcmctl does not pass these variables to the exec-ed java process(OC4J Containers).
    Any help is appreciated.
    Thanks,
    Vamsi Nukala

    Hello
    say I like to pass object I created in one page say :
    MyObject obj = new MyObject("1","2","3");
    via http params (supmit or post ) to other page . and
    use it there can it be done ?No. You can however place them as attributes in scope (application/session/request) and retrieve these attributes in the next page.
    example
    in one page,
    session.setAttribute("obj", obj);
    in another page
    MyObject obj = (MyObject)session.getAttribute("obj");
    ram.

  • Is there any way to pass a webapp item ID number to the input form of another webapp?

    Context:
    I'm working with a group of members who are collaborating on research.  The idea is for one person to post information, and then have others build on it, including attaching files, images and hyperlinks (so a simple forum doesn't work...).
    If I could have the item ID from the main webapp be passed to the "child" webapp, all would be well.  I tried {tag_itemid} but of course, this didn't work.  I can display the item ID and have the users retype it into a form, but this isn't very streamlined...   Is there any way to pass the information directly to the form?
    Thanks!!
    Linda

    Simply make the child web app form part of one of the main web app's layout(s)/template. That way, when you use {tag_itemid}, it will be that of the main web app.

  • IS there any way to pass a value in the view as a variable

    Hi
    I have 2 views and 1 view on top of them that calls the 2 views e.g.
    View1
    select ename, deptno, date from emp;
    View2
    select sal, date from salary;
    view3
    select v1.ename, v1.deptno, v2.sal from view1, view2 where date = SOME VARIABLE;
    sql query
    Select * from v3 where date='10-AUG-2007'';
    ITs taking a while is there any way that I can define the V3 as follows
    view3
    select v1.ename, v1.deptno, v2.sal from view1, view2 where v1.date = SOME VARIABLE and v2.date=SOME VARIABLE;
    and then at the sql plus level can i use it like
    I have 2 views and 1 view on top of them that calls the 2 views e.g.
    View1
    select ename, deptno, date from emp;
    View2
    select sal, date from salary;
    view3
    select v1.ename, v1.deptno, v2.sal from view1, view2 where date = SOME VARIABLE;
    sql query
    Select * from v3 where date='10-AUG-2007''; can this date be passes as a variable in side the view definition.

    Setting up a view which contains a substiutution variable

  • Is there any way to send value to my attribute through event handler method

    While I give value to the img array it does not print while I call object for this class. Is there any way that I could give value for img attribute
    // Attribute
    public var img:Array;
    // Constructor
    public function ReadXML(myfile:String) {
                img=new Array();
                xmlFile=myfile;
                var loader:URLLoader=new URLLoader;
                var url:URLRequest=new URLRequest(xmlFile);
                loader.addEventListener(Event.COMPLETE,onXMLLoad);
                loader.load(url);
    // Event handling Method
            function onXMLLoad(event:Event):Array {
                var xml:XML=new XML(event.target.data);
                //trace(xml);
                //trace("Number of Contacts : " + xml..person.length());
                //trace("First contact’s favorite food : " + xml.contacts.person[0].@favoriteFood);
                img["height"]=100;
                img["width"]=200;
                return img;

    what are you trying to do?
    if img has anything to do with an image, explain.
    if img is supposed to be an associate array, use:
    var img:Object;
    img=new Object();
    etc

  • Is there any way to pass through PIPELINED function

    Hello,
    For clarity of my code I would like to move some part of my PIPELINED function out to sub-function. It there any way to call one PIPELINED function from other PIPELINED function a way to union their results?
    I can try to use temporary table to emulate such behavior, but it won't be exactly the same...
    Regards

    Yes, you can. The only thing you need to remember is pipelined function can be salled from SQL only. So your functions will look like:
    Pipelined function 1:
    create or replace
      function pipelined_function1(...)
        return ...
        pipelined
        is
        begin
            pipe row(...);
    end;
    /Pipelined function 2:
    create or replace
      function pipelined_function2(...)
        return ...
        pipelined
        is
        begin
            for v_rec in (select * from table(pipelined_function1(...))) loop
              pipe row(...);
            end loop;
            pipe row(...);
    end;
    /SY.

  • Is there any way to pass SOAP Headers ?

    I have created a Web Service based on a Portal Service using the project wizard. I find that SOAP headers (<SOAP-ENV:Header>) are not passed in the SOAP Envelope while calling the Web service. Is it possible to do this ?
    Thanks in advance. Any suggestion is appreciated.

    I would like to know this as well.
    I am trying to pass username and password to a target web-service that requires this information to be in the Header section of the SOAP request.
    I am using EP 6.0.   Does anyone know if this can be done in  EP 7.0?

  • Is there any way to pass Mail.app rules to Outlook?

    Hello, I want to use the same rules i use in Mail app from OS X in Outlook. Can you help me find the way to do it, because I have tons of rules and don't want to copy them one by one.

    How much fuss is too much?
    You can easily change your home directory to the other drive. That would certainly take care of it. Copy your home directory to the other volume. Then, in System Preferences > Users & Accounts, select your account, right/command click and choose Advanced. Change your home directory. Log out and back in.
    You could also try to hack around with symbolic links, but that is more fuss.

  • Any way to pass Multiple Values for a single Label in the Parameter?

    I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610"
    One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter. 
    PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data.
    Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610.
    QUESTION:
    Any way to pass Multiple Values for a single Label in the Parameter?
    I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting
    it correct.
    I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….
    Note: We are using Report Builder 3.0

    Based on my experience, there's no way to 'intercept' the query that gets passed back to SQL Server, so a Split wouldn't work.
    Try creating either a function or stored procedure using the code below (compliments to
    http://www.dotnetspider.com/resources/4680-Parse-comma-separated-string-SQL.aspx) to parse the string: 
    CREATE FUNCTION dbo.Parse(@Array VARCHAR(1000), @Separator VARCHAR(10))
    RETURNS @ResultTable TABLE (ParseValue VARCHAR(100))AS
    BEGIN
    DECLARE @SeparatorPosition INT
    DECLARE @ArrayValue VARCHAR(1000)
    SET @Array = @Array + @Separator
    WHILE PATINDEX('%' + @Separator + '%' , @Array) <> 0
    BEGIN
    SELECT @SeparatorPosition = PATINDEX('%' + @Separator + '%', @Array)
    SELECT @ArrayValue = LEFT(@Array, @SeparatorPosition - 1)
    INSERT @ResultTable VALUES (CAST(@ArrayValue AS VARCHAR))
    SELECT @Array = STUFF(@Array, 1, @SeparatorPosition, '')
    END
    RETURN
    END
    Once created you can do things like this:
    SELECT * FROM Parse('John,Bill,David,Thomas', ',')
    SELECT * FROM (SELECT 'John' AS TestName union select 'David' AS TestName) AS Main
    WHERE TestName IN (SELECT ParseValue FROM dbo.Parse('John,Bill,David,Thomas', ','))
    This is what your SQL query would probably look like:
    SELECT OperationID, OperationName FROM dbo.Operations
    WHERE AreaID IN (SELECT ParseValue FROM dbo.Parse(@Area, ','))
    You may need to fiddle around with the Separator depending on whether SQL Server inserts a space between the comma and next value.

  • I'm using TestStand/Labview to do a string value test. Is there any way to use a variable in the edit string value test?? This forces you to hard code a string to test against.

    I'm using TestStand 2.0/Labview 6i to do a string value test. Is there any way to use a string variable in the edit string value test instead of an actual string?? This forces you to hard code a string to test against.

    Hi ART,
    You can also use the LimitLoader step to load your string into to step similar to the Numeric Step type.
    There should be an example of this in the Resource Library | TestStand
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • HT1212 my phone screen is broken and I bought a new phone but I want to get everything off my old phone. It will not sync to i tunes because it has a passlock on it. Is there any way to get passed this?

    My iphone screen and lock button are broken, I bought a new phone and want to get all the information off my old phone. My old phone will not sync with itunes because it has a pass code on it. I have no way to enter the pass code. Is there any way to get around this so I can still retrieve my information from it?

    If you are using the computer that you normally sync with, it should sync without entering the passcode. However, if this is not the computer you normally sync with, you cannot get past the passcode, it has to be entered.

  • A very good friend of mine dropped her iphone into water and now it is not working.Her husband recently passed away and text messages from him and from well wishers after his decease are feared lost. Is there any way to retrieve them?

    A very good friend of mine dropped her iphone into water and now it is not working.Her husband recently passed away and text messages from him and from well wishers after his decease are feared lost. Is there any way to retrieve them?
    I suggested contacting Compub in Nassau St as the info is priceless and worth the trouble of trying to regain?
    Any thoughts? The poor lady is very distress

    If she has backed up her iPhone she can replace that iPhone and set up the new iPhone from her backup.
    You can put the iPhone that went into water into a plastic baggie with either new silica gel packets (preferred) or raw rice and let it sit for  4 - 5 days. After that time remove the phone and connect it to power for at least a half hour. While it is still connected to power reset it by holding down the power and hold button, wait for the Apple logo then let go of the buttons. Might take several tries. If it revives immediately back it up.

  • Is there any way we can set default value for a Date Attribute to current date in Master Data Services

    Is there any way we can set default value for a Date Attribute to current date in Master Data Services.
    I as well wants to know that is there any posibility to show Calendar control while input data into respective date attributes.
    Thanks.

    Hi Anagha,
    So far i havent found any way to set todays date by default from MMI, but i guess this flow should work as workaroud
    1. Add buisness rule which can set a default value when Date = NULL/Blank
    2.get the entity table ,use -select EntityTable from mdm.tblEntity where Name = '<enter entity name>'
    3.Go to that table and add a after update trigger like
    if uda_<entityid>_<attributeid(Date attribute)> = default value
    update uda_<entityid>_<attributeid(Date attribute)> =getdate() where id = <LastUpdatedRow>
    I will check on this too from my side.
    By the way AFAIK i dont think so calendar control integration is possible .

  • Is there any way to wait for a value without using JDialog or JOptionPane?

    I am implementing a dictionary program by detecting word in a JTextPane and asking a user to choose one of available meanings from JOptionPane or JDialog. The program runs under a while-loop until all dictionary words are detected or a user clicks cancel.
    However, I don't want to use JDialog or JOptionPane because it is sometimes annoying to have a popup window on every detected dictionary word.
    So, I use JList with Buttons on the same Frame as the JTextPane. However, now, the program does not stop when it detects a dictionary word. It just uses a default value of the JList for translating word to meaning.
    Is there any way I can simulate the JDialog or JOptionPane without using it?
    I mean I'd like to stopp the program temporary, wait for an answer from other components, and then continue to detect the next dictionary word.
    Thank you.

    I'm probably reading this all wrong, but instead of the while loop,
    the method just looked for a dictionary word from a particular caretPosition,
    so, to start, it would be findWord(0)
    when found, add whatever to wherever, note the caretPostion at the end of the 'found' word, and method returns.
    when the user selects whatever button, the button's actionListener also calls the method again, using the noted caretPosition
    findWord(42);
    so, it starts searching from 42 (instead of the start)
    basically it is event driven
    findWord sets the button/s
    click a button starts findWord

Maybe you are looking for

  • Crashes while trying to reload Snow Leopard from the disc.

    I am trying to reload Snow Leopard onto a MacBook Pro. It crashes every time I attempt it. When starting up without the disc, I get a folder with a question mark. What is wrong? When attempting to start up using the Snow Leopard disc, it crashes. Any

  • What do I need to connect a USB hard drive to the bfsw11s4 to have an lan storage?

    Is it possible to conect an USB hard disk to the bfsw11s4 directly & what do I need? I want to make a Lan storage like a storage router. Thank you

  • Multiple stylesheets per topic

    Hello, I like to create multiple stylesheets for management purposes, rather than having one very very large stylesheet which can be used for all topics in my help project. Is there any way RoboHelp can support multiple stylesheets per topic? I also

  • "Error during application input" while processing IDOC with status 51

    Hi , I tried to post an error IDOC with status "51" of message type FIDCC2 using program RBDINPUT, it just creates a message "Error during application input" . It is not calling the application dialog . Does anyone have answer for this? Thanks, Heman

  • Stuck in iPhoto

    I was trying to import my pics from my iPhone to Mac Air ...it started importing and then it stopped after about a 1000 (I have total 1400ish)...and it's stuck...I unplugged my iPhone...and tried to exit the app but it won't let me close...it says pl