Need to identify from whom/where row on particular table inserted

Hi,
There is master table having 60 rows but each day one row inserted in this table which is not at all required from businees prospective and we do not know from where this row inserted ?
can any body help me to identify from where this one row inserted may be by auditing OR triggers ?
appreciated for help
Thanks
prakash

user12194321 wrote:
Hi,
There is master table having 60 rows but each day one row inserted in this table which is not at all required from businees prospective and we do not know from where this row inserted ?
can any body help me to identify from where this one row inserted may be by auditing OR triggers ?
appreciated for help
Thanks
prakashDBMS_LOGMNR

Similar Messages

  • SQL query needed to identify cancelled invoice where distribution lines

    SQL query needed to identify cancelled invoice where distribution lines Debit is not equal Credit line item in particular
    Is there a way from back end FROM ap_invoice_distributions_all where we can find for the cancelled invoice where distribution lines Debit is not equal Credit line item
    Regards,
    Prakash Ranjan

    Hello Prakash
    Can you please see if this query helps you?
    SELECT i.invoice_id, i.invoice_amount, nvl(sum(d.amount),0)
    FROM ap_invoice_distributions_all d, ap_invoices_all i
    WHERE i.org_id = <you org_id>
    AND i.invoice_id = d.invoice_id
    AND d.line_type_lookup_code not in ('PREPAY')
    AND i.cancelled_date IS NOT NULL
    GROUP BY i.invoice_id, i.invoice_amount
    HAVING (i.invoice_amount <> nvl(sum(d.amount),0))
    ORDER BY i.invoice_id asc
    Octavio

  • Need help in SQL Query: Update a row in a table & insert the same row into another table

    I want to update a row in a table say Table A and the updated row should be inserted into another table say Table B. I need to do it in a single SQL query and i don't want to do it in PL/SQL with triggers. And i tried with MERGE statement but its working with this scenario. (Note: I'm using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0).
    Thanks in Advance.

    Using Sven's code as an example, you could save the updated row in a sql plus variable. (also untested):
    SQL> var v_id number
    update tableA  
    set colB='ABC' 
    where colC='XYZ' 
    returning id into :v_id;
    insert into table A_History (ID, colA, colB, ColC)  
    select id, ColA, ColB, ColC  
    from tableA  
    where id = :v_id;   

  • Looping the same answer from the 1st row in the table

    I have a database with 3 tables: (1) employeeTable (2) cityTable (3)stateTable.
    I reference the employee's city name and state code by each id number from the cityTable and stateTable.
    My Employee table has about 10 records, 3 has an idcity and idstate input, the rest are blank.
    (1st row) id 9 for Henderson, id 28 for NV (6th row) id 9 for Henderson, id 28 for NV, and (10th row) id 10 for Las Vegas, id 28 for NV
    I run a query:
    <cfquery datasource="dsnName" name="qEmployees">SELECT * FROM users ORDER BY lastName ASC</cfquery>
    <cfquery datasource="dsnName" name="qState">SELECT code FROM states WHERE idstate=#qEmployees.idstate#</cfquery>
    <cfquery datasource="dsnName" name="qCity">SELECT name FROM cities WHERE idcities=#qEmployees.idcity#</cfquery>
    a run the table output:
    <table>
        <cfoutput query="qEmployees">
        <tr>
            <td>#qEmployees.lastName#, #qEmployees.firstName#</td>
            <td>#qCity.name#</td>
            <td width="40">#qState.code#</td>
            <td width="60">#qEmployees.zipCode#</td>
        </tr>
         </cfoutput>
    </table>
    PROBLEM:
    All 10 records output in the table as the same answer from the 1st row (Henderson, NV).
    What's making this loop having the same answer from the 1st row and affects all the rows with blank info or different info?
    I've been trying to figure this out for weeks and I hope the community can help me out. Thanks!

    As Dan rightly says, take a look into table joins; there's no point just giving you the answer as you'll just get stuck next time and these forums are to help people rather than to do their jobs for them.
    What you're looking to do is a relatively simple join, so you shouldn't have to read up for long before you've mastered them. Plus your site will be significantly more efficient

  • I received an email that i need to clarify from whom claims to be Mozillfirefox but i fear it's a virus. this is something i need to chat about now please

    this is the email
    Mozilla Firefox Lottery Program...11/09/2011Sunday, September 11, 2011 5:51 PM
    From: "MOZILLA FIREFOX LOTTERY" <[email protected]>Add sender to ContactsTo: undisclosed-recipientsDear Winner,
    Dear Winner,
    We the Mozilla Firefox have to congratulate you for been our 20011 lucky winner of the year. You have won 900,000 BGP after we did our open ballot. To claim your prize please call our claim agent Rev. Dewey Scribner +447024063845 or email him on ( [email protected] ) congratulation once again.
    Mrs. Vivian Haris
    I need to know if you sent it to me

    That isn't from Mozilla, it's a scam.

  • Get the value from a selected row in a table

    Hi all,
    My table contains a tree structure.
    When I select a single row, I need to get the value of a particular column.
    I created an action on the leadSelect of the table and gave the following code:
    public void onActionleadValue(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionleadValue(ServerEvent)
        String strLeadValue = wdContext.nodeAttribute_View_Out().currentAttribute_View_OutElement().getAttributeAsText("<MyModelAttributename>");
        wdComponentAPI.getMessageManager().reportSuccess("selected lead value "+strLeadValue);
        wdContext.currentContextElement().setLeadselectedvalue(strLeadValue);
        //@@end
    My Bapi returns me 6 records. and when I click on any row its always pointing to the last record value.
    What could be the problem?
    Thanks
    Anjana

    Hi Anjana,
    Try this.
    try
         IWDMessageManager msg = wdComponentAPI.getMessageManager();
         int leadselect = wdContext.nodeSChild1().getLeadSelection();
          for(int i=0;i<wdContext.nodeSChild1().size();i++)
              if(leadselect == i)
              //Displaying output in diff table
    //           IPublicTestComp.ITableNodeElement tabelm = wdContext.createTableNodeElement();
    //           tabelm.setAttribute1(wdContext.nodeSChild1().getSChild1ElementAt(i).getAttribute1());
    //           tabelm.setAttribute2(wdContext.nodeSChild1().getSChild1ElementAt(i).getAttribute2());
    //           tabelm.setAttribute3(wdContext.nodeSChild1().getSChild1ElementAt(i).getAttribute3());
    //           wdContext.nodeTableNode().addElement(tabelm);
              String att1 = wdContext.nodeSChild1().getSChild1ElementAt(i).getAttribute1();
              String att2 = wdContext.nodeSChild1().getSChild1ElementAt(i).getAttribute2();
              String att3 = wdContext.nodeSChild1().getSChild1ElementAt(i).getAttribute3();
                     msg.reportSuccess("Row ("i") : "att1"====="att2"======"+att3);
    } catch (WDDynamicRFCExecuteException e) {
         wdComponentAPI.getMessageManager().reportException("Message : "+ e.getMessage(),true);
    Regards,
    Mithu

  • Getting values from a specific row in a table

    hi all, i have a table that has the following data
    WITH sec AS
      SELECT 111 id,  'XPE' cid,  10 alias, 'TLC' Description, 'PEYU' lvl_1, 'IES' lvl_2, ' BAN' lvl_3 FROM dual UNION ALL
      SELECT 111 id,  'XPE' cid,  78 alias, 'TLC2' Description, 'SUN' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual UNION ALL
       SELECT 111 id,  'XPE' cid,  200 alias, 'TLC' Description, null lvl_1, null lvl_2, ' BAN' lvl_3 FROM dual UNION ALL
      SELECT 111 id,  'XPE' cid,  54 alias, 'TLC3' Description, 'SUN5' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual UNION ALL
      SELECT 112 id,  'XPE2' cid,  10 alias, 'PAD' Description, 'PEYU' lvl_1, 'IES' lvl_2, ' BAN' lvl_3 FROM dual UNION ALL
      SELECT 112 id,  'XPE2' cid,  78 alias, 'PAD2' Description, 'SUN' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual UNION ALL
      SELECT 112 id,  'XPE2' cid,  54 alias, 'TLC3' Description, 'SUN5' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual UNION ALL
      SELECT 112 id,  'XPE2' cid,  200 alias, 'PAD' Description, 'SIN' lvl_1, 'CON' lvl_2, ' UIE' lvl_3 FROM dual UNION ALL
      SELECT 113 id,  'XPE3' cid,  10 alias, 'PAD5' Description, NULL lvl_1, NULL lvl_2, NULL lvl_3 FROM dual UNION ALL
      SELECT 113 id,  'XPE3' cid,  200 alias, 'PAD5' Description, NULL lvl_1, NULL lvl_2,  NULL lvl_3 FROM dual UNION ALL
      SELECT 113 id,  'XPE3' cid,  78 alias, 'PAD7' Description, 'SUN' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual UNION ALL
      SELECT 113 id,  'XPE3' cid,  54 alias, 'TLE' Description, 'SUN5' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual
    )i want to write a query that give me this output
    ID     CID     ALIAS     DESCRIPTION     LVL_1     LVL_2     LVL_3
    111     XPE       10     TLC             PEYU     IES       BAN
    111     XPE       200     TLC             PEYU    IES      BAN
    111     XPE       78     TLC2             SUN              BAN3
    111     XPE       54     TLC3             SUN5              BAN3
    112     XPE2     10     PAD             PEYU     IES       BAN
    112     XPE2     200     PAD             SIN     CON       UIE
    112     XPE2     78     PAD2             SUN                BAN3
    112     XPE2     54     TLC3             SUN5              BAN3
    113     XPE3     10     PAD5               
    113     XPE3     200     PAD5               
    113     XPE3     78     PAD7             SUN              BAN3
    113     XPE3     54     TLE             SUN5              BAN3
    this is how the logic works:
    as you can see the table has many different set of ids, 111,112,113 and each id has a set of alias
    for id 111 and alias 200 the sec table has null values for level 1 and level 2 columns. what i want to do
    is that if any of the level1,level2 and level3 columns has null VALUES(FOR aliases=200) then the values should be taking from the ROW(s) with alias=10
    in this case alias=200 display peyu and ies for level1 and level2 column. this values were taking from the row with alias=10 and id =111.
    level3 stay the same since it is not null
    for id 112 and alias =200, none of te level columns has null so the value stay the same as in the table
    for id 113 alias 200, all level columns has null so the value should be taking from alias=10 id =113.
    in this case the row with alias=10 has also null so both rows 200 and 10 gets display with null values
    the other rows with different alias should just be display.
    i tried using las_value analytic function but i was not successful. i am using ORACLE 9I and ignore null option in last_value function is not supported
    the data in the table is not in any particular order.
    can someone help write a query that gives me the output above. thanks

    If I understand correct,below solution is corect. :-)
    col lvl_2 for a10
    WITH sec AS(
    SELECT 111 id, 10 alias,'PEYU' lvl_1, 'IES' lvl_2, ' BAN' lvl_3 FROM dual UNION ALL
    SELECT 111 id, 78 alias,'SUN' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual UNION ALL
    SELECT 111 id,200 alias,null lvl_1, null lvl_2, ' BAN' lvl_3 FROM dual UNION ALL
    SELECT 111 id, 54 alias,'SUN5' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual UNION ALL
    SELECT 112 id, 10 alias,'PEYU' lvl_1, 'IES' lvl_2, ' BAN' lvl_3 FROM dual UNION ALL
    SELECT 112 id, 78 alias,'SUN' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual UNION ALL
    SELECT 112 id, 54 alias,'SUN5' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual UNION ALL
    SELECT 112 id,200 alias,'SIN' lvl_1, 'CON' lvl_2, ' UIE' lvl_3 FROM dual UNION ALL
    SELECT 113 id, 10 alias, NULL lvl_1, NULL lvl_2, NULL lvl_3 FROM dual UNION ALL
    SELECT 113 id,200 alias, NULL lvl_1, NULL lvl_2,  NULL lvl_3 FROM dual UNION ALL
    SELECT 113 id, 78 alias,'SUN' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual UNION ALL
    SELECT 113 id, 54 alias,'SUN5' lvl_1, null lvl_2, ' BAN3' lvl_3 FROM dual
    select id,alias,
    case when alias = 200 and lvl_1 is null
         then max(decode(alias,10,lvl_1)) over(partition by id)
         else lvl_1 end as lvl_1,
    case when alias = 200 and lvl_2 is null
         then max(decode(alias,10,lvl_2)) over(partition by id)
         else lvl_2 end as lvl_2,
    case when alias = 200 and lvl_3 is null
         then max(decode(alias,10,lvl_3)) over(partition by id)
         else lvl_3 end as lvl_3
      from sec
    order by id,alias;
    ID  ALIAS  LVL_  LVL_2  LVL_3
    111     10  PEYU  IES     BAN
    111     54  SUN5  null    BAN3
    111     78  SUN   null    BAN3
    111    200  PEYU  IES     BAN
    112     10  PEYU  IES     BAN
    112     54  SUN5  null    BAN3
    112     78  SUN   null    BAN3
    112    200  SIN   CON     UIE
    113     10  null  null   null
    113     54  SUN5  null    BAN3
    113     78  SUN   null    BAN3
    113    200  null  null   null

  • Reading the Data from dynamically added rows of a table...

    Hi,
                  I am using adobe interactive form (WD ABAP) in which i am adding the table rows dynamically (using Jscript code).  I have to fech these data into an internal table. But I can read only the first row data..
                  Also While adding rows dynamically the same data is repeating for the consecutive rows..
                  I have found many similar posts in sdn, but i cannot get the solution. They have mentioned about adding in WDDOINIT method. Can anyone explain me what should be done,..?
    1) How to solve repeatative data while adding rows..?
    2) How to read dynamically added row data during runtime into internal table..?
    Thanks,
    Surya.

    Discussed @ SDN lot of time before. Have a look at any of below threads:-
    Dynamic table in interactive form...
    Make dynamic tables in Adobe Interactive forms
    Adding Rows dynamically upon clicking the button
    How to get values to WebDynpro ABAP from dynamic table?
    Chintan

  • How do i change the number of columns within a text box?  I need to go from three columns to one.

    How do I change the number of columns within a text box?  I need to go from 3 columns to 1.  The insert column is highlighted and column break does not work for this.

    Pages '09 does not seem to allow layout breaks in Textboxes.
    Pages 5.2 has the same limitation.
    Use multiple linked Textboxes in Pages '09 to get the layout you want or create your layout in a Word Processing template in the document layer.
    Peter

  • How do I copy content from an entire row into a different table?

    How do I copy content from an entire row of one table into a different table?  When I try to copy/paste the selected row into a row of the same size  and configuration in another table in the same document, the cells change width, the formatting and border thicknesses change, and the text gets squeezed.  When I was working with tables in Microsoft Word, there was no problem selecting text from a row in one table and placing it into a similar row and configuration in another table.

    Hi Christopher Morgan
    And welcome to apple discussions. With regard to your main question ....
    Q: Can this be done?
    A: It can but not easily (in that you may take a hit in quality). Apps like MpegStream Clip or DVDXDV may help:
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.products.htm
    It converts it back to a QT file for use with iDvd (or iMovie).
    Hope this helps but if not just come on back.
    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software / products that may be mentioned in this topic. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information above at your own discretion.

  • Refreshing only the single row of  ADF Table

    Hi All,
    I have a webcenter application where the ADF Applications has been deployed.Now the Data is coming onto the ADF Tables from a webservice.In that particular table i need to refresh only the single row(whichever selected by the user to edit ) or even a particular field with the updated values as well as need to validate and to create a message box saying about the errors if the validation goes wrong.
    Please suggest!!

    Hi,
    if "updated value" mean that the value got changed on the middle tier (not the browser client) then the update requires the table to be partially refreshed. If the user edits a row and in this row has dependent fields, then this can be achieved by partially refreshing the column. Note that ADF Faces tables don't refresh just one cell
    Frank

  • Displayin message and fixing the number of rows in a table

    Hi Experts,
    I have a requirement like this
    there is a table, where i need to diplay a message when there are no records and no rows should be visible on that table.
    Also, when the records are populated from the context, i need to fix the number of rows in that table and display the records.
    Please let me know hw this can be achieved.
    Also in the table I have Link to URL, please let me know how to handle this reference, when i set the reference Property, its giving me an error stating that the file doesn't exist when the table gets loaded.
    Thanks in Advance
    Regards,
    Palani

    Hi
    Oh!!  You should to  explain it at first thread itself that you want to display a JPG imange or other WDWebResourceTypetaken form the backend.
    1. So this is not at all a URL
    2. You have to convert binary data to WDWebResource then display it in either Image UI element or other (like PDF , txt etc)
    3
    try
                   //        Read the datasource of the FileUpload
                   IWDResource res = wdContext.currentContextElement().getResource();
                   InputStream in = res.read(false);
                   ByteArrayOutputStream bOut = new ByteArrayOutputStream();
                   int length;
                   byte[] part = new byte[10 * 1024];
                   while ((length = in.read(part)) != -1)
                        bOut.write(part, 0, length);
                   in.close();
                   bOut.close();
                   IPrivateUploadCompView.IImageTableElement ele = wdContext.nodeImageTable().createImageTableElement();
                   ele.setImage(wdContext.currentContextElement().getResource().getUrl(0));
                   ele.setText(res.getResourceName());
                   wdContext.nodeImageTable().addElement(ele);
              catch (Exception e)
                   wdComponentAPI.getMessageManager().reportWarning(e.toString());
    Here I assume that you convert that data to IWDResource type or
    4.
    WDWebResource.getWebResource(wdContext.currentContextElement().getresource(), type);
    // getResource of type binary which u read from BAPI and set it in local context , type is MIMETYPE or hardcode it as "JPG"
    5. Further help
       [Help1|To Displayan Image in Webdynpro Java from Standard Function Module;
    [Help2|http://wiki.sdn.sap.com/wiki/display/KMC/GettinganimagefromKMDocumentstobeusedinWeb+Dynpro]
    [Help3|http://wiki.sdn.sap.com/wiki/display/KMC/GettinganimagefromKMDocumenttobeusedinWeb+DynPro]
    It might code look strange at first , please do some reserch in SDN ,I did my best at this level.
    Best Regards
    Satish Kumar

  • Display all the rows in the table with Varray

    I created two Varrays
    CREATE TYPE phone_varray AS VARRAY(3) OF NUMBER(10);
    CREATE TYPE email_varray AS VARRAY(3) OF varchar2(30);
    CREATE TABLE ee
    (id number(2),
    phone phone_varray);
    now i inserted some rows into ee table and displayed it as:
    SELECT e1.id,e2.COLUMN_VALUE"PHONE NO" FROM ee e1,TABLE(e1.phone) e2;
    ID PHONE NO
    1 1111111111
    1 2222222222
    1 3333333333
    1 1111111111
    1 2222222222
    1 4444444444
    4 1111
    4 2222
    4 33334
    5 1111
    5 2222
    5 33334
    Then i altered the table with email_varray
    desc ee;
    Name Null? Type
    ID NUMBER(2)
    PHONE PHONE_VARRAY
    EMAIL EMAIL_VARRAY
    I updated some rows:
    update ee e1 set email=email_varray('aasda') where id=4;
    and when i try to display the table data by:
    SELECT id,e2.*,e3.* from ee e1,TABLE(e1.phone) e2,TABLE(e1.email) e3;
    it only displays the rows that contain all the details like
    ID COLUMN_VALUE COLUMN_VALUE
    4 1111 aasda
    4 2222 aasda
    4 33334 aasda
    and not all the rows that are in the table which have id and phone and email as NULL
    need help to display all the rows in the table.

    will this work for you ?
    SELECT e1.id,e2.COLUMN_VALUE as PHONE_NO, null as email FROM ee e1,TABLE(e1.phone) e2
    union
    SELECT e1.id,null,e3.column_value as email from ee e1, TABLE(e1.email) e3;

  • OIM-DB - Where is the right table?

    Hi,
    i need the table in the OIM-DB (10.2) where i can find the User Data and resource information?
    WWSEC??? Which User? ORASSO...?
    Please i need your help...

    OIM 9.1.0.2 Schema there is no table with all of these information together. But SQL Statement should help you with those. If you need more details from users include in join USR table and desired columns.
    select oiu.usr_key usrkey, orc.orc_tos_instance_key toskey,obj.obj_key objkey
    from oiu , orc , ost, obj
    where orc.orc_key = oiu.orc_key
    and oiu.ost_key = ost.ost_key
    and ost.obj_key = obj.obj_key
    and obj.obj_name like 'RESOURCE%'
    join this with USR to find by name ORASSO or just get usr_key of ORASSO user.
    and oiu.usr_key usrkey = KEYOFUSER_ORASSO
    group by oiu.usr_key, orc.orc_tos_instance_key, obj.obj_key
    I hope this helps.
    Thiago L Guimaraes

  • Count of rows of a table in header

    Hi Experts,
    I am stuck in a tricky scenario.
    I need to get the count of rows of a table in a webi report in the header of the report.
    And the count should change dynamically according to the filtering done on the table.
    For eg.
    If I have 10 countries in a table, so table has 10 rows.
    Now the count on header should show 10.
    Now if we filter the column to 5 countries, the count on the header should change to 5.
    Any Idea's.
    Regards,
    Gaurav

    Nops
    It doesn't work.
    Let me reframe my issue again:
    I dragged country object on my report.
    UK
    US
    JAPAN
    CANADA
    Now lets say in the report title, I write the formula as =Count(country)
    It will give me 4.
    Now I clicked on the column country and applied filter i.e. country = US ; UK
    Now the block shows
    UK
    US
    In the header the cell still shows 4, which I want to see as 2.
    Any ideas....?
    Thanks
    Gaurav

Maybe you are looking for

  • Screen flickers, occasionally goes black

    Hello all, iBook g4 bought refurb - 2-3 years ago... Occasionally the screen is flickering and I have had two occasions where the screen just went black but I could still see the desktop. Had to force restart. I have had 2 times where it was looking

  • ViewSet with three rows

    Hello All, I have a scenario in which i want to use ViewSet having three rows. <b>1st Row - View1 (having a Header and RoadMap UI element) 2nd Row - View2 (having a dynamic UI view) 3rd Row - View3 (having Next & Previous buttons to move through the

  • Parse XML streams via ABAP program or class

    Hi all, because of a new requirement we would like to create characteristics from a XML file by using the following structure.   xmlns:gdt="http://sap.com/xi/SAPGlobal/Global" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  We do not use SAP X

  • Wsa.jar buggy!

    The wsa.jar seems really beta to me. Providing an EAR file as input (Which deploys ok) causes the appended exception. Why deos the EJB assembler tries to find an ejb-jar.xml inside the EAR file? It should be in the bean jar file referenced by applica

  • When I open Chrome it opens VMware

    So this has just happened recently, when I open Chrome instead of Chrome actually opening up it opens up VMware. It was working fine up until a couple days ago. Any help on how to fix this would be great or info on why it happned or how.