Finding changing data

Hi,
i wanna ask that how could i find the changing data,
for example,
in 1st november i have 1 table student that contain 5 rows
ID NAME
1 student_one
3 student_three
6 student_six
7 student_seven
2 student_two
next few days, i add some rows. and in 3rd november the table become
ID NAME
1 student_one
3 student_three
6 student_six
7 student_seven
2 student_two
4 student_four
5 student_five
what i wanna ask is, how can i know what row has been added between those day?
(assumption that the rows is not added by me)
Thanks,
Hadi

Hi,
Now my question is, how can i insert the change data into a table?By usage of trigger before update/insert.
SQL> desc ttt
Name                                      Null?    Type
COL1                                               NUMBER
COL2                                               NUMBER
COL3                                               NUMBER
COL4                                               NUMBER
COL5                                               NUMBER
SQL> alter table ttt add (date_upd date);
Table altered.
SQL> ed
Wrote file afiedt.buf
  1  create trigger trg_ttt
  2  before update or insert on ttt
  3  for each row
  4  begin
  5  :new.date_upd := sysdate;
  6* end;
SQL> /
Trigger created.
SQL> insert into ttt (col1,col2,col3,col4,col5)
  2  select sum(col1), sum(col2),sum(col3),sum(col4),sum(col5)
  3  from ttt
  4  where col1 in (1,6)
  5  /
1 row created.
SQL> select * from ttt;
      COL1       COL2       COL3       COL4       COL5 DATE_UPD
         1          2          3          4          5
         6          7          8          9         10
        11         12         13         14         15
         7          9         11         13         15
         7          9         11         13         15 19/11/05
SQL> update ttt set col2 = 10 where col1 = 1;
1 row updated.
SQL> select * from ttt;
      COL1       COL2       COL3       COL4       COL5 DATE_UPD
         1         10          3          4          5 19/11/05
         6          7          8          9         10
        11         12         13         14         15
         7          9         11         13         15
         7          9         11         13         15 19/11/05
SQL> HTH,
Nicolas.
Message was edited by:
N. Gasparotto
Or, if you have one column to audit insert, and one more to audit update, you can create a trigger like following :
create or replace trigger trg_ttt
before update or insert on ttt
for each row
begin
if UPDATING then
     :new.date_upd := sysdate;
end if;
if INSERTING then
     :new.date_ins := sysdate;
end if;
end;
/

Similar Messages

  • Identifying Changed Dates on Documents in SAP B1

    Greetingsu2026I have an unusual request that is somewhat long, very serious, and hope folks can help. 
    A headquarters customer believes a subsidiary company has u2018made upu2019 dates on invoices for previous billings.  They describe the date changes as u2018radicalu2019 but I have not personally seen these invoices as of yet and am waiting a FAX.  They requested I go into SAP B1 to see if someone has fabricated or made up or changed invoice dates and who it was.  They have some specific large-dollar invoices identified to research.  The person under suspect (who is no longer there) was considered an expert in SAP B1, so maybe she knew all of the different ways to change dates around.  Being an expert means also she might have used some unusual ways to change dates to the ones she wanted.
    Here are some of my ideas to discover this situation, but I hope someone can suggest even more steps because I would like to know every way that this situation can be discovered.
    1. Open the AR Invoices and use Data > Change Log and concentrate on dates.
    2. Run some SQL to validate document dates and system dates.  SELECT T0.DocNum, T0.DocDate, T0.CreateDate, T0.TaxDate, T0.UpdateDate FROM OINV T0 WHERE (T0.DocDate does not equal T0.CreateDate OR T0.TaxDate does not equal T0.CreateDate).  The results would show invoices that maybe had their dates changed.
    3.Run a Document Journal in the Financial Module.  Finance > Financial Reports > Accounting > Document Journal with the u2018Expanded Selectionu2019 of AR Invoices and a date range covering the invoices in question.  Then see if the Transaction Numbers are out of sequence.
    4. Run a Transaction Journal Report Financials > Financial Reports > Accounting > Transaction Journal Report with AR Invoices.  Compare this report to Document Journal.
    5. Run the Utilities functions of Utilities > Check Document Numbering to see if there any anomalies there in the document numbers.
    6. Run the Administration > System Initialization > Document Numbering function to see if a special series has been set up.
    7. Check out the AR Invoice numbering order by running another simple SQL covering a range of the invoices in question. SELECT T0.DocNum, T0.TaxDate, T0.CreateDate, T0.UpdateDate FROM OINV T0 WHERE T0.DocNum > 1583 AND T0.DocNum < 3251 ORDER BY T0.CreateDate.  Then see if the AR Invoice Numbering Sequence is not consistent.
    8. Check out those documents that are connected to each suspect AR Invoice and their associated dates by using the Target and Base Document icons.  For example, if a Deliver Document has dates of January 2007 but the AR Invoice date is September 2006, then someone has played around with dates on at least one of the documents.
    9. Get copies of the complete company database before the alleged changes were made and a company database as of today and compare the two contents.  Only good if the backups are maintained for a long time.
    Here come the questions on the ways I BELIEVE dates can be changed but not sure how to find and need to work on them:
    QUESTION 1 u2013 If a person DTWs invoices up into SAP B1, how can I tell that DTW was used to change the dates, the date of the DTW run, and the dates that were changed?
    QUESTION 2 u2013 If a person uses SQL to update dates on SAP B1, how can I find out that SQL has been used, the date of the SQL run, and the dates that were changed?
    QUESTION 3 u2013 If a person goes out and changes the workstation and/or server Date and Timestamp Properties, how can I find that they did that and the date changes?  You can do this on your PC by just changing the month, date, and year in Microsoftu2019s Date and Timestamp Properties.
    QUESTION 4 u2013 I know SAP has a policy that no SQL can be used to update databases and/or tables and have been told some customers lost support because they did this.  What does SAP do to discover this in their lab?
    QUESTION 5 u2013 Are there any notes in the portals to help me find changed dates?
    QUESTION 6 u2013 Are there any logs SAP B1 produces that can help identify such changes and how do I find and use them?
    QUESTION 7 (and this is big) u2013 Are the other ways dates can be changed on AR Invoices and how would I uncover the way it was done and the needed information of Original Date and Changed Date?
    Many, many thanks for any help provided since this is a serious situation.  If you can make any suggestions it would be greatly appreciatedu2026
    Zal
    Edited by: Zal Parchem on Mar 13, 2009 7:31 AM

    Hi Zal
    If this person was an "Expert" on SAP Business One then the only way they would have changed dates would probably be directly in SQL itself. The best way to determine this would be to hope that they slipped up somewhere and forgot to change a particular date in let's say one specific table.
    For invoices, start with the post date, doc date & create date. Then check each of these to the OJDT/JDT1 tables for any discrepancies. Next check the ADOC/ADO1 table for multiple instances on the invoice. If only 1 instance then check the create date, time & user as well as the aforementioned dates between OINV/INV1 & ADOC/ADO1. If multiple instances, check the dates from 1 instance to the next (This will indicate dates being changed in the system).
    Next check the same dates against OINM table. If any of the dates do not tally then the SQL was changed directly.
    Hope this helps. Let me know if you need further assistance.
    Kind regards
    Peter Juby

  • JDE World - Integration methods, Change Data Capture

    Can anyone let me know how I can know real time data changes in JD Edwards World tables.
    1. Are there any tables in JDE World or DB2 where I can find change data capture information?
    2. How about using DB2 triggers on the JDE World tables?
    3. Or is there any other method that I can do this?
    thanks in advance
    Message was edited by:
    Tricks

    What backend database are you using, what tools do you intend to use to get at the data? With an Oracle backend there may be a variety of options.
    By 'real time' do you mean immediately or within 5 minutes, 30 minutes ?

  • Finder Window - Date Modified Column Keeps Changing

    When I open a Finder window, change the size of the "Date Modified" column then close the Finder window, the next time I open the same Finder window, the "Date Modified" column will compress the size of the column.
    Why isn't Finder 10.9 maintaining my column changes?
    Any assitance or insight whould be appreciated.

    I solved the scrunched Date Modified column header in a similar fashion but added the Date Added field, which fixed the width of both Date columns.
    After doing so, I now find both Date-oriented columns display and read dynamically the actual date and time.
    I'm now looking for a solution to that issue, explained here:
    finder window date added date modified show date time always

  • Hey,i forgot my login password,so i changed the password by using terminal command(reset password).now i have new user name with new password,but i can't find  my data which i have saved on mac.please help me out in this matter.

    hey,i forgot my login password,so i changed the password by using terminal command(reset password).now i have new user name with new password,
    but i can't find  my data which i have saved on mac.the storage is showing data used and free space on the disk
    please help me out in this matter.

    How did you change your user name?
    resetpassword wouldn't have done it. If you managed to create a new user, then your data is still in the old account.

  • Find/Change Varying dates..

    I have a varied dates that appear throughout a LONG document.. for instance "January 14, 1945" date changes all the time of course.. usually appears at start of a paragraph.. i need to set up a find/change to be able to select it, and I need to change it's style.. is this the wildcard choice somehow in find/change?

    try a GREP search for      \<\w+\.? \d\d?, \d{4}\>      (those are ordinary typed spaces after the first ? and the comma). If should find dates with months spelled out or abbreviated with or without a period. You can use this in a GREP Style as part of a paragraph style to apply your character style so you don't need find/change

  • Date Find - Change

    Is it possible to batch change dates in a spreadsheet? How would you change the month on a row of dates Ex: 05/02/08, 05/15/08, etc. to 06/02/08, 06/15/08, etc. I've tried the find change command with dates in many formats (mm/dd/yy; m/dd; May 2, 2008; May 2, etc) with no success.

    I though I should be brief in posting my question but after the spanking I just received, I'll give more details of what I did before I posted my question so that you'll see all that I tried before asking for help.
    1. Last month I searched through the Help in the Numbers application and did not find a solution.
    2. Last month I posted my question to another user group that I belong to and no one could answer because they stated they did not have that much experience with Numbers.
    3. Tonight I tried the application's Help, but still no answers.
    4. Tonight I decided to give Apple Discussions a try. I searched 'Find/Change' under Numbers and received 113 hits. I read every single one of the posts. While none spoke directly about changing 'Dates', I tried the items discussed such as changing to text 360, making changes, then back to numeric, but this did not work for me either.
    5. I tried changing my dates to all the various formats and again, no effects.
    6. And during all my attempts I also tried the various options (next, find and replace, replace, etc.) alone or in combinations.
    7. I came back to the Apple Discussions and posted my question.
    And regarding the way I posted my question, I felt I should post a new Topic under Numbers since Dates was not part of the 113 discussions on Find/Change. Also, since the original question was different than mine I felt I might "get in trouble" for posting within that discussion. I see I was wrong, so yes, my newbie status of 2 posts is my excuse.

  • Finder "modified date" changes whenever I view a file

    I prefer to list files by date in the finder windows.
    Whenever I just open a file without modifying it, the Finder changes it's modified date to Today.
    Is it possible to set the Finder to only display actual content modification dates rather than any activity with the file?
    Thx,

    i've got the same issue....a huge pain. one way to "look at files" without changing the date is to hit the space bar in finder when you're on the file. that will launch the quick look feature and you can see if that's the file you want to open. i know its not the best solution, but a small step. if you find a real way to fix this... let me know.

  • Changing date format (find/change?)

    Hello, I have little bit tricky question.
    I have document full of dates:
    01.01.2013
    02.01.2013
    05.01.2013
    And i want to change all these dates just to:
    01. Mon
    02. Tue
    05. Fri
    Is there a possibility to do that within Indesign? Thank you for your answers.

    OrcusDei wrote:
    Sandee, you got it exactly right. That's very unfortunate. It's pretty simple data formating and i'm surprised InDesign can't nativly do that O_O
    InDesign is not a data formating tool - nor is it a word processor. It's a layout tool for creating print/web ready documentation.
    It can do a lot of things - but it can't reformat your data.
    I would have done the same as you did - but I would have added a blank character style(create a char style based on None and don't select any options) to the numbers and created an index.
    http://www.kahrel.plus.com/indesign/index_charstyles.html
    Brought that to Excel and converted the text to the way it was supposed.
    Then prepare the "FindChangebyList" in the scripts panel.
    http://indesignsecrets.com/find-change-scripting-goodness.php

  • Find/Change (Multiple Date Changes in one Find)

    Hi ID geniuses, got a question for your gigantic brains.
    This may or may not be an easy one...
    I do a lot of production work and I'd like to create a Find/Change or even a GREP search that will allow me to change multiple blank dates at once).
    the format changes from file to file and follows these 4 formats usually and all 4 formats could be used in one document.
    XX/XX/XX (8 characters)
    XX/XX/10 (8 characters)
    XX/XX/2010 (10 characters)
    9/26/10 - wrong date in place already. (6 – 8 characters depending on the month)
    Instead of having 4 different searches, is it possible to do one search that look for any of these text formats and change them at once?
    Any ideas/guidance will be appreciated.
    Thanks for your time.

    Piece of cake.
    Of course GREP comes to the rescue. Enter this in your search field:
    \b((XX|\d{1,2})/){2}(XX|\d{2,4})\b
    and it'll find any of your examples. Wot Doth This All Mean?
    \b     a Word break -- there must not be a word character before this entire expression. This means it'll ignore "XXX/XX/XX".
    (     repeat group -- see below
    ( XX | \d{1,2} )     Either "XX" (exactly) or "a digit, 1 or 2". This means it'll ignore "XXX/XX/XX" (three exes), pick up "1/2/3" (one digit), ignore "123/123/123" (three digits)
    /     A slash. Nothing special, except ...
    )     .. since this is the end of the repeat group ...
    {2}     ... we want twice the sequence "XX/" (or "digit/"), to match "XX/XX/" and every possible combo with digits as well.
    (     oh yet another group. That's because ...
    XX     .. this literal text ...
    |     ... OR ... (hold on, I'm gettin' there)
    \d{2,4}     .. two to four digits should be matched ..
    )     .. in this entire group.
    \b     Phew! A Word break to prevent it matching "12/34/56789"

  • How to get changed data in ALV in Web Dynpro for ABAP

    METHOD on_data_check .
    DATA:
        node_spfli                          TYPE REF TO if_wd_context_node,
        node_sflight                        TYPE REF TO if_wd_context_node,
        itab_sflight2                        TYPE if_display_view=>elements_sflight.
      node_spfli = wd_context->get_child_node( name = if_display_view=>wdctx_spfli ).
      node_sflight = node_spfli->get_child_node( name = if_display_view=>wdctx_sflight ).
      CALL METHOD node_sflight->get_static_attributes_table
        IMPORTING
          table = itab_sflight2.
    this code is ..get all data(changed and not changed)
    but i want get changed data only, not all data.
    how to get changed data?
    Edited by: Ki-Joon Seo on Dec 27, 2007 6:04 AM

    Hi,
    To get only the changed data in the ALV grid of a WD, you need to capture the "ON_DATA_CHECK" of the ALV grid.
    To this please do the following in the ALV initialization of the ALV table settings :
        lr_table_settings->set_data_check(
                IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CELL_EVENT ).
    You may also do this:
        lr_table_settings->set_data_check(            IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CHECK_EVENT)
    The above two ways would depend on when do you need to check for the changed data. If you want to check the data as soon as it is entered, then use the first method. Else, use the second method.
    You need to register an EVENT HANDLER for this event.(You may do this in your VIEW or Component Controller).
    In this Event handler, you would find an importing parameter R_PARAM which is a ref type of      IF_SALV_WD_TABLE_DATA_CHECK.
    The attribute T_MODIFIED_CELLS of this interface IF_SALV_WD_TABLE_DATA_CHECK will contain the modified cells of the ALV with the old & new values.

  • Can you help me about change data captures in 10.2.0.3

    Hi,
    I made research about Change Data Capture and I try to implement it between two databases for two small tables in 10g release 2.MY CDC implementation uses archive logs to replicate data.
    Change Data Capture Mode Asynchronous autolog archive mode..It works correctly( except for ddl).Now I have some questions about CDC implementation for large tables.
    I have one senario to implement but I do not find exactly how can I do it correctly.
    I have one table (name test) that consists of 100 000 000 rows , everyday 1 000 000 transections occurs on this table and I archive the old
    data more than one year manually.This table is in the source db.I want to replicate this table by using Change Data Capture to other stage database.
    There are some questions about my senario in the following.
    1.How can I make the first load operations? (test table has 100 000 000 rows in the source db)
    2.In CDC, it uses change table (name test_ch) it consists of extra rows related to opearations for stage table.But, I need the orjinal table (name test) for applicaton works in stage database.How can I move the data from change table (test_ch) to orjinal table (name test) in stage database? (I don't prefer to use view for test table)
    3.How can I remove some data from change table(name test_ch) in stage db?It cause problem or not?
    4.There is a way to replicate ddl operations between two database?
    5. How can I find the last applied log on stage db in CDC?How can I find archive gap between source db and stage db?
    6.How can I make the maintanence of change tables in stage db?

    Asynchronous CDC uses Streams to generate the change records. Basically, it is a pre-packaged DML Handler that converts the changes into inserts into the change table. You indicated that you want the changes to be written to the original table, which is the default behavior of Streams replication. That is why I recommended that you use Streams directly.
    <p>
    Yes, it is possible to capture changes from a production redo/archive log at another database. This capability is called "downstream" capture in the Streams manuals. You can configure this capability using the MAINTAIN_* procedures in DBMS_STREAMS_ADM package (where * is one of TABLES, SCHEMAS, or GLOBAL depending on the granularity of change capture).
    <p>
    A couple of tips for using these procedures for downstream capture:
    <br>1) Don't forget to set up log shipping to the downstream capture database. Log shipping is setup exactly the same way for Streams as for Data Guard. Instructions can be found in the Streams Replication Administrator's Guide. This configuration has probably already been done as part of your initial CDC setup.
    <br>2) Run the command at the database that will perform the downstream capture. This database can also be the destination (or target) database where the changes are to be applied.
    <br>3) Explicitly define the parameters capture_queue_name and apply_queue_name to be the same queue name. Example:
    <br>capture_queue_name=>'STRMADMIN.STREAMS_QUEUE'
    <br>apply_queue_name=>'STRMADMIN.STREAMS_QUEUE'

  • Table for Delivery changed data

    Dear Gurus
    There is a requirement to create a z report based on delivery details. As according to the business process, the delivery weight is changed by z activities somedays after creation of delivery. Is there any table from which i can get the previous (old) value of weight which is now replaced by new weight value. (As this can be seen in delivery change data details, it shows the previous weight value and new weight value but i cant find the table for it)
    Thnx in advance
    Deepak Mehmi

    Hi
    Since Lakshmipati has already answered the question just to add on in CDHDR with VL02N you can find the object class as LIEFERUNG for any change in net weight. You can query in CDPOS with object class as LIEFERUNG as Object class and Object Id as the delivery number (with preceeding zeros-to make it 10 digits). The FNAME would be BTGEW for gross weight and NTGEW would be for net weight. The VALUE_NEW would give the new value and VALUE_OLD would give the old value.
    Thanks
    Indranil

  • Creation and Change Date for Tcode and Function Groups

    Hello All,
    I need to display the Creation and Change Dates for Custom Tcodes and Function Groups in a Report. Can anyone please let me know the logic of retrieving it.
    regards,
    Mahesh

    Hi,
    TADIR and TRDIR is the tables where you can find all these data
    Regards
    Sudheer

  • How to get changed data in SAP HR !

    Hi Gurus,
       I got a new project of HR and now I am  stuck at one place. Please help me where I can find out the change history of HR master records.I have done all my research and I found CDHDR / CDPOS which didn't maintained these data.I got PCL4 table which is HR cluster table but it also didn't show me the changed data. Is there any specific table / report where I can get old and new records or so.
    Each reply is appreciated.
    Thanks,
    Digamber

    Check program RPUAUD00 .
    Change pointers log data only on selected infotypes in order not to overload system. PCL4 is also selective in this respect but I am not sure about that, so you need to look for futher info in this regard.
    Regards
    Marcin

Maybe you are looking for

  • Could my iMac possibly just have a temporary case of heat stroke?

    After working on my iMac off and on all day, I left it up and running when I stepped out of the room briefly and returned to find it had shut down. This particular Mac is networked to a PowerMac G4 and dual core iMac, both of which seem to be working

  • IDOC and RFC why to import.?

    Hi folks,    Can anyone explain why to import RFC and IDOC objects from the R/3 system to which we are communicating. Is the reason is only due to its complex datatype structure.? Then why do they have different NAMESPACE, and how/when it is generate

  • MySpace logs out all the time

    Hi, when I am using MySpace website, the page/site keeps closing all the time, why do you think that is? Cheers.

  • New MBP owner with a question about OS disks.

    Just got a new mac book pro, I didn't get the OS disks in the box with the computer. Did I get short changed? A lot of the what I've read, there seems to be a need to use the OS disks, specially when partitioning the drive. Is it normal for the Macs

  • How to change Static IP in SAPROUTER

    Dear Experts, We have recently changed our static IP number which was configured in our SAPROUTER. I have changed the same in our SAPROUTETAB file. So, users are able to connect the servers thro' routestring. But, From SAP they have not able to fetch