Capturing insert done and storing the value Inserted

Hi All
I am trying to insert In multiple table where one tbl PK is FK of other , I achieved that functionality using Instead of Insert trigger.(PK is handled by another trigger) -- main function
Now On successfully insert i need to captured the PK in Hidden variable to pass it on further for more insert on other table (Pk again being Fk to this table)--- secondary function
Any inputs on this is highly appreciated.
Thanks
NS

Hi
If you are not using DML process and using your own custom insert statement. You can probably include the following statement along with your insert statement to fetch the PK value in page item.
INSERT INTO ....;
SELECT seq_name.nextval INTO :PX_ITEM_NAME FROM DUAL;I guess you are using sequence to generate the PK value. Please update the script as per your table and sequence name.
Good luck.
Regards,
Tajuddin

Similar Messages

  • UDF for reading a particular line and storing the value in a variable

    Hi Experts,
    I am reading entire file content in single feild in source data type.I want to write a UDF to seach for a particular pattern(say :25: and store the value after it i.e  34535764778 detination for further use).
    EX: My  sample file and its  has feilds like
    point assured
    Thanks

    Hi since u are using a single field only then u dont need to use any advanced function
    Wel because if u see the formation of the queue u wil find the the whole data is under one context.. and there are not more context changes
    Convert the string to an array and progressively u can check for the four checks if the a<i>=:
    then a[i+]=2 then a[i]=5 and a[i+] =: and then substring the next 7-8 chrac.. hope u understand
    If this also doesnt work wel then u will have to use the Pattern class in Java
    By the way remember that the substring value cant be retained for the next instance of mapping
    Hope u have that in mind...
    Rgds
    Aditya

  • Trace logs don't show the value of a procedure parameter.

    Hi;
    I am Facing a deadlock situation daily.
    I checked the alert.log and it look like this:
    ORA-00060: Deadlock detected. More info in file /oracle/admin/TEXP/udump/texp_ora_28966970.trc.Then i read the trace log, but it doesn´t show the value of procedure parameters.
    insert into estq_300 (data_movimento, codigo_transacao, nivel_estrutura, grupo_estrutura, subgrupo_estrutura,
    item_estrutura, quantidade, valor_movimento_unitario, valor_contabil_unitario, codigo_deposito, numero_lote,
    centro_custo, usuario_systextil, processo_systextil, tabela_origem, entrada_saida, numero_documento) VALUES
    (:v1, :v2, :v3, :v4, :v5, :v6, 1.00, :v7, :v8, :v9, 0, 0, :v10, :v11, 'ESTQ_300', 'E', :v12)
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    UPDATE TB_Y SET QTDE_ESTOQUE_ATU = QTDE_ESTOQUE_ATU + :B11 , QTDE_ESTOQUE_MES =
    QTDE_ESTOQUE_MES + :B10 , DATA_ULT_ENTRADA = :B9 , DATA_ULT_SAIDA = :B8 , QTDE_ESTOQUE_F =
    QTDE_ESTOQUE_F + :B7 WHERE CDITEM_NIVEL99 = :B6 AND CDITEM_GRUPO = :B5 AND CDITEM_SUBGRUPO =
    :B4 AND CDITEM_ITEM = :B3 AND LOTE_ACOMP = :B2 AND DEPOSITO = :B1I sent the trace logs to the software supplier, but they want the parameter values.
    I'm reading the documentation and searching on the forum, but until now i can't find anything to help me. Is there any way to see the parameter value?
    This is a large database with a lot of users, so I can't trace all of them and wait the deadlock occurs.
    DATABASE:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    OS:
    AIX Version 6.1! Regards,

    sb92075,
    thanks for reply,
    This VW's helped a lot, but i have one doubt:
    Why some SQLs don´t show the value of it´s binds?
    The last captured is null too, why?
    Example:
    SELECT name, position, last_captured, value_string FROM v$sql_bind_capture WHERE sql_id LIKE '%ahfqand46px43%';
    NAME                           POSITION               LAST_CAPTURED             VALUE_STRING
    :V1                            1
    :V2                            2
    :V3                            3
    :V4                            4
    :V5                            5
    :V6                            6Thank's

  • Mutator to compute set and return the value

    Hi
    I am having trouble working out how to do a mutator that does all three
    compute a value set the value and then return it this is what i have so far
    this example calculates and returns the value but does it set the value of totalSlices ???? this is the best option so far
    public int totalSlices (){
    int total = meatSlices + vegSlices;
    return (int) total;
    this one seems more likely to me but unsure is this a set method as well
    public insert (int fiveC)
    fiveCentCoin += fiveC;
    returne fiveCentCoin;
    this is the final example i have come up with but dont know if it sets the value as well
    public int calculateCost () {
    double cost;
    if (age==0) {
    age = 0.1;
    if (neutered) {
    cost = (100/age) + (stay * 3) + SHOTS + TAGS;
    } else {
    cost = (100/age) + (stay * 3) + SHOTS + TAGS + NEUTER;
    return (int) Math.round (cost);
    the problem i face i am not sure of how to combine a mutator calculation, set method and return it all in one i havnt done that before and cannot find an example
    thanks

    I think you're trying to take a hollistic approach to programming. That won't work.
    You need to go back and get a good understanding of exactly what each element of Java does.
    Sylvia.

  • Storing the value of apex_item.radiogroup!

    Hi All,
    I am using an APEX_ITEM.RADIOGROUP api to display the rating from 1 to 5.
    In order to store the value of radio button selected, I am using a textbox item.
    e.g.
    P2_ques_1 = rating value from 1-5( coming from radio group)
    P2_ques_2 = rating value from 1-5
    Now I want to save the value of P2_ques_1... into the database through a loop.
    for i in 1..4 loop
    l_rating := :P2_QUES_||i;
    INSERT INTO org_feedback(feedback_id,question_id,rating,org_contact_id)
    VALUES(ORGFEEDBACKSQ.NEXTVAL,i,l_rating,:P2_CONTACT_ID);
    end loop;
    The above loop is storing the value of "i" instead of values of : P2_QUES_1,: P2_QUES_2....
    Is there any way or suggestion I can achieve this?
    Thanks,
    - Parveen Sehrawat

    I can't catch you.
    Let me explain what i want to do...
    I have radio button in forms as well as in reports.
    In FORMS i created a RADIO GROUP using STATIC LOV
    Like,
    STATIC:GOOD;3,NOTBAD;2,BAD;1
    So at runtime i can easily get this radio group values.
    In REPORTS i created RADIO GROUP using SELECT QUERY
    Like,
    with t as(
    select 'problem_sol' as others, 1 as num from cand_performance
    union
    select 'communication' as others, 2 as num from cand_performance
    union
    select 'attitude' as others, 3 as num from cand_performance)
    select others,
    apex_item.radiogroup(num) as good,
    apex_item.radiogroup(num) as notbad,
    apex_item.radiogroup(num) as bad
    from t
    Now i want to define values for those radio button like what i define in STATIC LOV radio buttons and i want to know how to get the selected value when user submit the page... Again i'm telling i have radio button in REPORTS.
    Edited by: Nagappan_19 on May 20, 2013 4:48 AM

  • Bind Variable in SELECT statement and get the value  in PL/SQL block

    Hi All,
    I would like  pass bind variable in SELECT statement and get the value of the column in Dynamic SQL
    Please seee below
    I want to get the below value
    Expected result:
    select  distinct empno ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    100, HR
    select  distinct ename ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    TEST, HR
    select  distinct loc ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    NYC, HR
    Using the below block I am getting column names only not the value of the column. I need to pass that value(TEST,NYC..) into l_col_val variable
    Please suggest
    ----- TABLE LIST
    CREATE TABLE EMP(
    EMPNO NUMBER,
    ENAME VARCHAR2(255),
    DEPT VARCHAR2(255),
    LOC    VARCHAR2(255)
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (100,'TEST','HR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (200,'TEST1','IT','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (300,'TEST2','MR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (400,'TEST3','HR','DTR');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (500,'TEST4','HR','DAL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (600,'TEST5','IT','ATL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (700,'TEST6','IT','BOS');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (800,'TEST7','HR','NYC');
    COMMIT;
    CREATE TABLE COLUMNAMES(
    COLUMNAME VARCHAR2(255)
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('EMPNO');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('ENAME');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('DEPT');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('LOC');
    COMMIT;
    CREATE TABLE DEPT(
    DEPT VARCHAR2(255),
    DNAME VARCHAR2(255)
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('HR','HUMAN RESOURCE');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('MR','MARKETING');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    COMMIT;
    PL/SQL BLOCK
    DECLARE
      TYPE EMPCurTyp  IS REF CURSOR;
      v_EMP_cursor    EMPCurTyp;
      l_col_val           EMP.ENAME%type;
      l_ENAME_val       EMP.ENAME%type;
    l_col_ddl varchar2(4000);
    l_col_name varchar2(60);
    l_tab_name varchar2(60);
    l_empno number ;
    b_l_col_name VARCHAR2(255);
    b_l_empno NUMBER;
    begin
    for rec00 in (
    select EMPNO aa from  EMP
    loop
    l_empno := rec00.aa;
    for rec in (select COLUMNAME as column_name  from  columnames
    loop
    l_col_name := rec.column_name;
    begin
      l_col_val :=null;
       l_col_ddl := 'select  distinct :b_l_col_name ,pr.dept ' ||'  from emp pr, dept ps where   ps.dept like ''%IT'' '||' and pr.empno =:b_l_empno';
       dbms_output.put_line('DDL ...'||l_col_ddl);
       OPEN v_EMP_cursor FOR l_col_ddl USING l_col_name, l_empno;
    LOOP
        l_col_val :=null;
        FETCH v_EMP_cursor INTO l_col_val,l_ename_val;
        EXIT WHEN v_EMP_cursor%NOTFOUND;
          dbms_output.put_line('l_col_name='||l_col_name ||'  empno ='||l_empno);
       END LOOP;
    CLOSE v_EMP_cursor;
    END;
    END LOOP;
    END LOOP;
    END;

    user1758353 wrote:
    Thanks Billy, Would you be able to suggest any other faster method to load the data into table. Thanks,
    As Mark responded - it all depends on the actual data to load, structure and source/origin. On my busiest database, I am loading on average 30,000 rows every second from data in external files.
    However, the data structures are just that - structured. Logical.
    Having a data structure with 100's of fields (columns in a SQL table), raise all kinds of questions about how sane that structure is, and what impact it will have on a physical data model implementation.
    There is a gross misunderstanding by many when it comes to performance and scalability. The prime factor that determines performance is not how well you code, what tools/language you use, the h/w your c ode runs on, or anything like that. The prime factor that determines perform is the design of the data model - as it determines the complexity/ease to use the data model, and the amount of I/O (the slowest of all db operations) needed to effectively use the data model.

  • How can i copy and referencing the value of a sub-total of a category into another cell?

    How can i copy and referencing the value of a sub-total of a category into another cell?

    Cells in Category  rows 'exist' only when those categories are inserted using the Reorganize table. Those cells cannot be referenced from other cells.
    If you want a category summed, you will need to do that in a cell that is still visible when the table is not sorted into categorie using the Reorganize pane. The function to use is SUMIF. You can find information regarding SUMIF (and SUMIFS) in the iWork Formulas and Functions User Gude. The guide may be downloaded using the link in the Help menu in Numbers '09.
    Regards,
    Barry

  • I am trying to build a basic TCL skeleton script that reads a remote SNMP OID and displays the value on the screen.

    I am trying to build a basic TCL skeleton script that reads a remote SNMP OID and displays the value on the screen.
    I don't want it to be an EEM Event, I just want to run it from the (tcl)# prompt.
    So I guess I'm asking if you can use cli_exec and other commands in the "namespace import ::cisco::eem::*" in a normal non-EEM script - can I do that?
    This is the error I get:
    OTN.159(tcl)#source flash:TCL_SNMP_Remote_Read.tcl
    invalid command name "::cisco::eem::event_register_none"             ^
    % Invalid input detected at '^' marker.
    What am I missing?
    =================  TCL_SNMP_Remote_Read.tcl  ==============================
    ::cisco::eem::event_register_none
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    if [catch {cli_open} RESULT]
        { error $RESULT $errorInfo }
        else { array set cli1 $RESULT }
    if [catch {cli_exec $cli1(fd) "snmp get v2c 192.168.1.100 public timeout 1 oid 1.3.6.1.2.1.1.1.0" } RESULT]
           { error $RESULT $errorInfo  }
           else { set SnmpSysDesc $RESULT }
    if [catch {cli_close $cli1(fd) $cli1(tty_id)} RESULT] {
                error $RESULT $errorInfo
    puts $SnmpSysDesc
    =========================================================================
    In the sho-run config I have:
    event manager directory user policy "flash:/"
    event manager session cli username "cisco"
    Any help to get me started would be greatly appreciated!
    Tim

    If you don't want an EEM policy, then don't use any of the EEM constructs.  Instead, all you need is this:
    set output [exec "snmp get v2c 192.168.1.100 public timeout 1 oid 1.3.6.1.2.1.1.1.0"]puts $output

  • Apple TV - I Still Don't See The Value

    I have had an Apple TV for a couple of years now and unfortunately I don;t see the value in it anymore. Apple has paid no attention to what this thing can be. And while I know that the goal is to make money, it's a shame that so many digital components are being left out.
    For those of you who have an Xbox, you recently received Netflix and Last FM.
    For whatever reason, Netflix downloads almost instantly on the Xbox. Apple TV take a pretty long time, and at least 4 hours for HD movies. Why is this?
    Second, LastFm is like Pandora. While the addition to internet Radio is nice, why not bundle up with Pandora?
    Finally, why not intergrate this into other digital spaces like facebook, twitter and even Hulu..... The entire thing doesnt make sense.
    I currently only use this thing for Photos, and really that's even a pain in the *** because I need to have it identical to what's on my MAC. The whole system *****, and frankly not well thought out.
    In fact, I personally think that their should be an APP store on the Apple TV, like the Iphone..... There is so much they can do to make this system better. In the meantime, Xbox has gained ground, if not passed them as a entertainment hub for the TV.... and honestly, I think they have only scratched the surface.
    In a few years, I believe we will be capable of not needing cable, directtv, etc... We should be able to Pick "CBS" and pick a show...and watch....Through the internet. Not actually buying shows.

    While there may be groups of users who want it to be an all-singing all-dancing machine for certain tasks, not every group will want the same things. Therein lies the problem, what to develop particularly when many options won't be cash-cows.
    You presumably bought it for the feature set it had and it still has those things.
    I'd buy one tomorrow for music playback alone via the hi-fi - my wish here would be for it to support better quality PCM audio output (limited to 16 bit 44.1kHz for music).
    Mine get hours of use each day for family viewing, no messing around with VHS tapes or discs. Great.
    I wish they hadn't added YouTube in 1.01 to be honest and even some aspects of iTunes store annoy me on it, though on balance I prefer the store is present.
    I wouldn't use Twitter/Facebook and all that kind of stuff - not my thing really so it would be of no interest and just clutter menus, but I appreciate others would like them
    Adding apps/plugins would be a good way to address different wants for the system as you'd customise in line with what you wanted and wouldn't be forced to use things you didn't need.
    With regard to things like Netflix/Pandora etc many of these are country specific eg Pandora stopped those outside US from accessing it, Netflix is not available in UK. Last FM is great on the iPhone, I'd love it on the AppleTV. UK users would love BBC iPlayer, it would be useless to you.
    So without opening up the system to allow 3rd parties to deploy local content/features specific to each country I would imagine it would be very hard to target what to develop in house that would work universally.
    There are also usage concepts that annoy - syncing being one for a variety of reasons, I'd prefer a manual drag and drop method of populating it, but I mainly stream anyway. It's the AppleTV 'way' though so it won't change. USB port activation would also be incredibly handy either to backup material, extend playback storage or populate AppleTV. Again, unliklely to change.
    You presumably know the feedback link:
    http://www.apple.com/feedback/appletv.html
    AppleTV may not be perfect but I don't think there is a perfect device out there currently - the competition is certainly hotting up though.

  • Using the text and not the value of a filed

    Hi there,
    I'm programming a pdf form using life cycle, I'm using the following script in a "SEND TO" button in order to email an XML file with the data extracted from the form:
    var emailAddress = F.P1.Line.rawValue;
    var veicle = F.P1.Vehicle.rawValue;
    var shipper = F.P1.Shipper.rawValue;
    var date = F.P1.Date.rawValue;
    event.target.submitForm({cURL:"mailto:"+emailAddress+"?subject=Booking request from "+shipper+" date:"+date+" &body=Dear Sirs,Please find attached the completed PDF booking form for the following "+veicle+".",cSubmitAs:"XML",cCharset:"utf-8"});
    The problem is that I would like to use in a variable the text and not the value of the F.P1.Line.raw field.
    Thanks in advance

    Hi,
    This is not the appropriate forum to post this type of question. Please post all designer related queries in LiveCYcle Designer Forum to receive better response.
    From you query I understand you have a dropdown box with name as "Line". And you want to the "text" part of the selected item and not the "value" part. If it is so then do the following -
    1. Write the below code in onCHange event of your dropdown box.
    var ddValue = this.boundItem(xfa.event.newText);
    var nodeList = this.resolveNode("#items").nodes;
    var ddText = null;
    for (var i = 0; i < nodeList.length; i++)
    if (this.boundItem(nodeList.item(i).value) == ddValue)
    ddText = nodeList.item(i).value;
    break;
    global.selectedtxt = ddText;
    In the above code I am basically getting the "text" part of the item selected and then I am storing it in a global variable.
    2.
    Write the below code on click event of your button -
    var emailAddress = global.selectedtxt;
    Hope this helps.
    Thanks,
    Shivajiv.

  • Why don't match the values of printer ports, obtained through WMI in different ways?

    Why don't match the values of printer ports, obtained through WMI in different ways?
    $Ports = Get-WmiObject Win32_TcpIpPrinterPort -namespace "root\CIMV2" -ComputerName $ComputerName
    $Printers = Get-WmiObject Win32_Printer -namespace "root\CIMV2" -ComputerName $ComputerName
    Further, for example, on the same computer $Ports.Name returns me: (10.0.66.204 10.0.66.210 10.0.66.246 10.0.66.247)
    and $Printers.PortName (XPSPort: USB001 10.0.66.247 HPLaserJet400MFPM425dn 10.0.66.246 SHRFAX :) I.e. the values don't match to each other although they logically should be the same. Why so?
    In the end I need to get a binding the printer - the value (not the name) of the port. In Win32_Printer there is no such parameter, and there is no information about the printer in Win32_TcpIpPrinterPort. I wanted to connect them through port name but they
    don't match.

    Very unclear.
    Win32_Printer returns the bound port name.
    Get-WmiObject win32_tcpipprinterport -filter "Name='192.168.1.100_2'"
    ¯\_(ツ)_/¯

  • I am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier

    i am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier photo please help me to recover my photos

    Well I'll guess you're using iPhoto 11:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • How do I click on a cell in a table control, and display the value in a string?

    What I would like to do is to click on a cell in a table control, and have the value of the cell be displayed in a string indicator. What ever cell I click on, I would like the value to be displayed in the indicator.
    Thank you!
    Solved!
    Go to Solution.

    ... or
    Event >>> ouse down for table.
    Use Coords" to feed invoke node "point To Row Column" and returned "Cell Postion" can be unbundled to produce the row and column tht can be used to index out the value.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to read and update the value of property file

    Hi,
    I am not able read the values from property file.
    Please tell me how to read and update the values from property file using Properties class
    This is my property file : - Config.properties its located in D:\newfolder
    Values
    SMTP = localhost
    Now i need to change the value of the SMTP
    New value :
    SMTP =10.60.1.9
    Pls Help me
    Thanks
    Merlin Rosina,

    Post a small (<1 page) example program that forum members can copy and run that demonstrates your problem.

  • Call  RFC from ECC and display the values in  AET

    Hi ALL,
    I had an RFC in ECC ( Z_CRM_SPEC_DATA) this should be called into my AET Fields in getter method.
    In getter method of tat AET field what code should i write?
    Plz help me on this.

    HI,
    1) Call the  RFC(Z_CRM_SPEC_DATA) from ECC and display the values as mentioned in below AET fields.
    AET FIELDS :    zzfld00000M    zzfld00000N
    Description  :    Budget Quan    Forecast Quan
    values         :    (--5.0)(6.0--
    2) (Fetch Budget and Forecast data from ECC ),you would need to pass Material Number(MATNR) as well as Ship to party info to fetch the budget and forecast data as one material may be assigned to 2 or more SH with specific budget and forecast data for each.
    Edited by: venkatabharathv on May 23, 2011 2:44 PM
    Edited by: venkatabharathv on May 23, 2011 2:49 PM

Maybe you are looking for