Sql statement for retrieving the last update time of a table

Hello all,
Can somebody give me an example of sql statement for retrieving the last update time of an oracle table.
Thank you
Il

Thanks for the fast replies. It works great when I test it as a sql statement but when trying to populate a datalist with it it raises the following exception:
Exception Details: System.ArgumentException: SCN_TO_TIMESTAMP(MAX(ORA_ROWSCN is neither a DataColumn nor a DataRelation for table DefaultView
Part of the Datalist Code:
ItemTemplate>
Line 12:             SCN_TO_TIMESTAMP(MAX(ORA_ROWSCN)):
Line 13:             <asp:Label ID="SCN_TO_TIMESTAMP_MAX_ORA_ROWSCN__Label" runat="server" Text='<%# Eval("[SCN_TO_TIMESTAMP(MAX(ORA_ROWSCN))]") %>'>
Line 14:             </asp:Label><br/>
Line 15:             <br/>
{code}
Why is this happening? Any ideas?
Il                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to get the last update time for a table ?

    I want to know the last change of the table data , for example, a record has been changed, how can i get that time?
    Regards,
    Lament

    Hello
    check the tables CDHDR & CDPOS
    But the condition when u r checking the these table.for a particular field the at data element level- futhur charactestictab level we have one check box called change document it as tick
    Thank u,
    santhosh

  • Recording a last updated time for each record in a table

    hi
    i have a table with 5 columns. and the table has 100 rows of data.
    i need to add a sixth column and this column should contain the last updated time of that particular row.
    i am allowed to use triggers.
    for example, if the 55th row undergoes a change, the 6th column's value for the 55th row should update itself with that particular time.
    can any one of you come up with an optimized solution for this please ???
    thanx a million in advance and best regards,
    novice DBA
    :)

    Hi,
    Here's an example:
    CREATE OR REPLACE TRIGGER table_x_biu
    BEFORE INSERT OR UPDATE ON table_x
    FOR EACH ROW
    BEGIN
         :NEW.modified_dt := SYSDATE;
    END     table_x_biu
    SHOW ERRORSwhere table_x is your table name, and modified_dt is the DATE column to be populated.
    You won't have to specify modified_dt in any INSERT or UPDATE statements. In fact, if you do, the value you give will be ignored, and the trigger will always substitute SYSDATE.
    WARNING: if you do get an error message, the line number reported will usually be relative to the first DECLARE or BEGIN statement in the trigger. For example, if I had mis-spelled SYSDATE in the example above, the error message would say there was a problem in line 2, not line 5.

  • What exactly is the "last scan time" and "last update" time

    There was a topic last year about this confusion. Here shows the topic and the answers that you might be looking for :)
    Have a great day!
    -Isaac

    It is my understanding that the 'discovery scan' is just for the initial scan and then there is also an update scan that just checks for differences. 
    I have my remote collectors to search specific subnets and scan once a week. Ever since the initial scan they all show up during in the inventory. I see most of them being 'updated' in inventory according to the schedule and the timestamp but the "Last Scan Time" never changes. As such my not scanned in 30 days just continues to build up. The "Last Updated Time" gets updated correctly but nothing else.
    Is this normal behavior? It doesn't seem like it is considering the Not Scanned in 30 days group exists. It wouldn't make sense for that group to exist if there was no need for a "scan" if "updates" worked just fine.
    This topic first appeared in the Spiceworks Community

  • Preparing Dynamic SQL statement for inserting in Pro*C

    Hi Friends,
    From quite some time i am struggling writing Dynamic SQL statement for dynamic insert and update in Pro*C.
    Can somebody go through my code and suggest me the rigth way of doing.
    Right now it throws an error saying " Error while updating ORA-00904: invalid column name "
    Please help me.
    Girish.
    int main()
    EXEC SQL BEGIN DECLARE SECTION;
    char *uid ="scott/tiger";
    static char sqlstmt[129];
    struct /* DEPT record */
    int dept_num;
    char dept_name[15];
    char location[14];
    } dept_rec;
    EXEC SQL END DECLARE SECTION;
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    EXEC SQL CONNECT :uid;
    dept_rec.dept_num = 50;
    strcpy(dept_rec.dept_name,"ADMIN");
    strcpy(dept_rec.location,"IN");
    strcpy(sqlstmt,"UPDATE dept set DNAME = dept_rec.dept_name where DEPTNO = dept_rec.dept_num");
    EXEC SQL EXECUTE IMMEDIATE:sqlstmt;
    EXEC SQL COMMIT;
    exit(0);
    void sql_error()
    printf("\nError while updating %s",sqlca.sqlerrm.sqlerrmc);
    EXEC SQL ROLLBACK;
    }

    A bit rusty here but this is how I see it.
    Think of it this way ..
    all Oracle is going to see is:
    UPDATE dept set DNAME = dept_rec.dept_name where DEPTNO = dept_rec.dept_num
    Its NOT going to know what dept_rec.dept_name is or dept_rec.dept_num is ..
    it doesnt go back and fill in those values.
    You need something like
    strcpy(sqlstmt,"UPDATE dept set DNAME = \"");
    strcat(sqlstmt,dept_rec.dept_name);
    strcat(sqlstmt,"\" where DEPTNO = ");
    strcat(sqlstmt,dept_rec.dept_num);
    printf(sqlsmt); # Just to be sure the update statement look right during testing.

  • RUEI 12.1.0.3.0 - Collectors Status Okay but Last Update time not updated

    Hi all,
    Under System > Status > Collectors Status
    Status shows OK but Last Update Time is not updated. The last update time is frozen.
    Anyone has a similar experience? Would someone help, please?
    Regards,
    Nathan

    Hi Nathan,
    that seems odd indeed. would not know the cause or any sensibl explaination unless I have system details, Can you pls file an SR for this issue and upload the helpdesk file to the SR?
    a helpdesk file is created under system >>maintenance>>helpdesk report
    It will create a zip file that we can read in support, see the events the system is capturing, analyze your configuration. That will allow us for very quick follow up. if you want me to track it internally at Oracle pls send me the SR# in a direct mail: [email protected] -- I'm the responsible product manager for RUEI so happy to follow up on this.
    R, jurgen

  • Last Scan Time vs Last Update Time

    All,
    I have been using SW to track my Server 2003 boxes as MS will be EOL of these next week. In my Inventory report I include Last Scan and Last Update.  As we migrate the boxes to Server 2012 - I had expected to see the 2003 Server OS drop off of the list but that is not happening. 
    I am getting current "Last Update" (7/13/2015) but the report still says the box has OS Server 2003 and I know it is Server 2012.
    What am I missing and the bigger question is - This is for servers only.  Do I have confidence that my PC inventory is reflecting the correct updates in my larger inventory?
    Any advice would be appreciated.
    This topic first appeared in the Spiceworks Community

    It is my understanding that the 'discovery scan' is just for the initial scan and then there is also an update scan that just checks for differences. 
    I have my remote collectors to search specific subnets and scan once a week. Ever since the initial scan they all show up during in the inventory. I see most of them being 'updated' in inventory according to the schedule and the timestamp but the "Last Scan Time" never changes. As such my not scanned in 30 days just continues to build up. The "Last Updated Time" gets updated correctly but nothing else.
    Is this normal behavior? It doesn't seem like it is considering the Not Scanned in 30 days group exists. It wouldn't make sense for that group to exist if there was no need for a "scan" if "updates" worked just fine.
    This topic first appeared in the Spiceworks Community

  • SQL Statement for Composite Primary key

    Hi,
    I need a SQL statement for finding the Distinct values for combination of 2 Columns( Composite Primary key). I dont want to use Data Dictionary views.
    Table A
    c1 c2
    1 1
    1 2
    2 3
    Now for the above table combination of c1 and c2 is unique.
    Please advice.
    Cheers
    Ramkannan.A

    This?
    PRAZY@solarc> with tableA as
      2  (select 1 col1,2 col2 from dual
      3  union all
      4  select 1,1 from dual
      5  union all
      6  select 1,2 from dual
      7  union all
      8  select 2,3 from dual
      9  union all
    10  select 1,2 from dual
    11  union all
    12  select 2,3 from dual
    13  )
    14  select distinct col1, col2 from TableA
    15  /
          COL1       COL2
             2          3
             1          2
             1          1Regards,
    Prazy

  • Selecting the last record from a database table

    In my ABAP Program, I have to use a select statement to retrieve the last record from the database table with the same key.  In other words, the Program will get more than one hit on the database table for the selected keys and I need to retrieve values from only the last record and not the first.  I know I can use an internal table to sort the records first and then retrieve the right value.   But to make things easier, is there a SELECT statement keyword than I can use to do this in one single step?  Thanks!

    hi,
    tables:mara.
        data: begin of it_mara occurs 0,
                matnr like mara-matnr,
                meins like mara-meins,
                mtart like mara-mtart,
                end of it_mara.
    select-options:s_matnr for mara-matnr.
    select matnr
              meins
              mtart
    from mara
    into table it_mara
    where matnr in s_matnr.
    if not it_mara[] is initial.
    sort it_mara by matnr descending.
    read table it_mara index 1.
    endif.
    then you get the last record of the select statement.
    reward points if useful,
    venkat.

  • Need to know how to find the last execution time for a function module

    HI all
    I need to know
    1) How to find out the last execution time of the function module ?
      say for eg. I have executed a func. module at 1:39pm. How to retrieve this time  (1:39pm)
    2) I have created 3 billing document in tcode VF01 i.e 3 billing doucment no. would be created in SAP TABLE "VBRP" b/w 12am to 12:30 am.
    How to capture the latest SAP database update b/w time intervals?
    3) Suppose I am downloading TXT file using "GUI_DOWNLOAD" and say in 20th record some error has happened. I can capture the error using the exception.
    Is it possible to run the program once again from 21st records ? All this will be running in background...
    Kindly clarify....
    Points will be rewarded
    Thanks in advance

    1.Use tcode STAT input as Tcode of Fm and execute .
    2. See the billing documents are created in table VBRk header and there will always be Creation date and time.
    VBRk-Erdat "date ., u can check the time field also
    So now if u talk the date and time we can filter then display the records in intervals.
    3. with an error exeption how is my txt download finished .
    once exception is raised there will not be a download .
    regards,
    vijay

  • Since the last updating of the system, my Ipad 2, it won't connect to wifi more than 5 minutes at a time unt

    Since the last updating of the system, my Ipad (model MC769C), it won't connect to wifi more than 5 minutes at a time until I reset the router.  Anyone can help ?

    iOS 6 Wifi Problems/Fixes
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting
    http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet
    http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Since the last update, every time I open "Numbers" I get a notice that a font is missing.  How can I stop seeing this warning?

    Since the last update for "numbers", everytime I open numbers I get a notice that a font is missing.  I don't care that it's missing and I would like to not see that message.  How can I get rid of it?

    A document you had open at the time you quit Numbers has a font that you do not have (probably Calibri).  You can change the font to one you have OR close the file before you quit Numbers.  Numbers will open files you had open when you quit.
    Looks like:
    The other thing you can do is check the box "Close windows when quitting an application" in "System Preferences > General"

  • How can i get the date of the last update of one PL/SQL package ?

    Hello,
    How can i get the date of the last update of a PL/SQL package
    named MYPACKAGE ?
    Thanks in advance ! ;-)

    to get the timestamp,last ddl time of object
    select timestamp,last_ddl_time from user_objects
    where object_name='<package name>';
    this will give you last transaction time ,date of object

  • The last update failed on my window 7 pc, resulting in me having to try it manually download and install, this also failed leaving my I tunes not working, I tried restore back to a safer date, but every time it tried to update it failed. eventually i

    The last update failed on
    my window 7 home prermium pc, resulting in me having to try it manually download and install,
    this also failed leaving my I tunes not working, I tried restore back to a
    safer date, but every time it tried to update it failed. eventually it told me
    to delete and reinstall, this fails due to the apple mobile device service
    failing to start, and asking me if I have sufficient privileges to start system
    service, I have tried all suggestions on iTunes page, ie delete everything to
    do with apple, and start as administrator, nothing works, help please

    I too have tried the latest iTunes (12.1.1.4) in Win7. I did a search for latent drivers as you noted but found none. I am glad it worked for you - I'm still no-joy at this point. I'm able to install AMDS over and over again, without issue - it just doesn't start then iTunes launch fails with Error 7. I have to manually remove it.
    I am able to connect my iPhone via USB cable and access my photo storage on the phone. I am just not able to install iTunes anymore. I have attempted resolution to this issue for almost two months now. Until that time, I was content with what was installed. It was only when the proverbial update box appeared that I attempted to 'update' my iTunes. WHAT A MISTAKE putting blind faith into an Apple request to update. I SUGGEST NOT TO UPDATE YOUR ITUNES IF IT IS RUNNING PROPERLY!
    I realize now, once again I might add, my reliance on software provided by others. It's like anything else, I shouldn't rely on just one method for anything. Time to search for a more pleasant alternative than Apple. Truly, when it worked, it was good at its job, but now that I am wasting time I am looking seriously at upgrading to another type of smartphone and media management software. Way too much trouble for anything as simple as this should be. I wonder, is this a result of another feud with Microsoft?

  • Since the last update can't send mail every time I must enter my iCloud password.

    I Have a iPhone 6 and a ipad 4. Since the last update only on my phone when I try to send mail a box pops up & I have to enter my iCloud password. It's very annoying. I don't have this issue on my ipad and as I said it started after the last update. Anyone have an answer what's going on & how to fix it.
    Thanks would really appreciate any help

    Hi Gizzymoeaiden,
    If you are having an issue with your iPhone asking for your iCloud password each time you try to send mail, it may be necessary to reset the password of the Apple ID you are using for iCloud. See this article for how -
    Apple ID: Changing your password - Apple Support
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

Maybe you are looking for

  • ITunes 7, software 1.2 videos gone from iPod

    I recently updated to iTunes 7 so that i would be able to purchase and download a show from the music store. After my iPod was finished updating with the new software all of my shows were gone from my iPod except for the one i just bought. They are s

  • Read array of bytes

    using what do i read array of bytes that is on a stream... i send an array of bytes to the invoking stream using void write(byte buffer[]).... how do i read it from the other side.... uzair

  • The 5 bars of the signal isn't up in my iPhone 5

    I don't know exactly whet this happen but the 5 lines of the signal appears down and operator name is here, also 3G word is here, somebody knows why this is happening? I have less than a mont with my new phone

  • Labels in Bubble chart

    Hi, I need to display label for each bubble in a bubble chart. Can anybody please tell me how to do this. Thanks and Regards, SS.

  • Database Status Inactive Sessions

    On OAM Applications Dashboard > Navigate to "DATABASE STATUS" > Sessions "#" I see alot of inactive sessions. Is it okay to terminate all of the inactive sessions? does it affect system performance? THanks! Message was edited by: chaseeem