OCCI, Timestamp and Updates

Hello,
I need some help with using Timestamps in an update where clause.
I created a table author_ag as
Name Null? Type
TS TIMESTAMP(3)
AUTHOR_NAME VARCHAR2(25)
I wrote a test program where I first insert two rows into the table.
I update the TS field in both the rows.
For the first row, I update using the author_name field in the where clause.
For the second row, I use the TS field in the where clause.
Here is the code snippet:
Timestamp tsy1(env, 2003,12,13,10,11,12, 123*1000*1000);
Timestamp tsy2(env, 2004,12,13,10,11,12, 456*1000*1000);
Timestamp ts (env, 2009, 9, 9, 9, 9, 9, 321*1000*1000);
//Insert 2 rows.
try{
string insertStmt = "Insert into author_ag values (:p1, :p2)";
Statement* stmti= conn->createStatement(insertStmt);
stmti->setTimestamp(1,tsy1);
stmti->setString(2,"HELLO");
stmti->executeUpdate ();
stmti->setTimestamp(1,tsy2);
stmti->setString(2,"WORLD");
stmti->executeUpdate ();
conn->terminateStatement (stmti);
catch(SQLException & ex)
std::cout << "Caught an exception" << ex.getMessage() << endl;
// update using author_name
try
string sqlStmt1 =
"UPDATE author_ag SET ts = :x WHERE author_name = :y";
Statement* stmtu1 = conn->createStatement (sqlStmt1);
stmtu1->setTimestamp (1, ts);
stmtu1->setString (2, "HELLO");
stmtu1->executeUpdate ();
conn->terminateStatement (stmtu1);
catch(SQLException & ex)
std::cout << "Caught an exception 2" << ex.getMessage() << endl;
//update using timestamp
try
string sqlStmt2 =
"UPDATE author_ag SET ts = :x WHERE ts = :y";
Statement* stmtu2 = conn->createStatement (sqlStmt2);
stmtu2->setTimestamp (1, ts);
stmtu2->setTimestamp (2, tsy2);
stmtu2->executeUpdate ();
conn->terminateStatement (stmtu2);
catch(SQLException & ex)
std::cout << "Caught an exception 3" << ex.getMessage() << endl;
std::cout << "Everything ran fine?" << endl;
What I find is that the first update takes place, but the second update doesn't.
09-SEP-09 09.09.09.3 HELLO
13-DEC-04 10.11.12.4 WORLD <---------No Update
What am I missing?

Yes, I tried the test with TIMESTAMP WITH TIME ZONE and it works wonderfully.
However, I cannot change the column type from TIMESTAMP to TIMESTAMP WITH TIME ZONE.
I am using oracle 10.2.0.3.0 on linux.
Q1: What is the difference between the two types in terms of performance and storage?
Q2: Is this a known issue or use of TIMESTAMP an undesirable usage?

Similar Messages

  • Date and Timestamp not updating

    Following on from my previous posts, the date and timestamp of updated files are not being updated in RoboSource Control, i.e. the Modified column in the RoboSource Control Explorer. However, it looks like changes are being stored on the server when topics are checked in, as I can right-click a file in source control that I have changed, choose View, and see the amendments in the HTML.
    Basically, this means that source control isn't recognising that files have changed and therefore when someone tries to get the latest version it doesn’t think there is one because the date and time are the same as previous version.
    Has anyone experienced this behaviour before or know why the Modified column has suddenly stopped being updated?
    Thanks
    Jonathan

    After some digging and random Googling the following article seems to have fixed my issue .
    It seems that if you are running RoboSource Control on 64-bit machines, there are problems with checking in files.
    http://helpx.adobe.com/robohelp/kb/cant-check-files-robosource-control.html.

  • How to find the timestamp and SCN in the standby database?

    Hai,
    I have Oracle 9.2.0.4 RAC with 2 nodes in the production. The logs generated at these servers will be manully moved to my standby database and will be applied. To know what isthe maximum log files applied in the standby database, i am using the below mentioned query in the standby database,
    Select thread#,max(sequence#) from v$log_history group by thread#
    In general i am using "recover standby database until cancel" command and then checking the database with the above mentioned query whether all the logs are applied or not.
    If i use time based or scn based recovery in standby database i.e., "recover standby database until time <time>" or "recover standby database until change <scn number>" , after completion of the recovery, apart from the message "Media recovery complete" or by seeing the alert log, is there any way to query the standby database, so that i can identify the time or scn upto which the archived redo log files got applied.

    Hi Sridhar,
    There should be some view which will have applied_scn information. There is one more option i can suggest, you can create a heart beat table in production with 2 column like scn and timestamp. Update this table every minute. From standby db you can query this table and get fair idea on applied_scn and timestamp.
    While exporting you can export using flashback_scn by taking the value from heartbeat table of standby.
    This heartbeat table is used very common in streams environment. Just see if this helps you.
    hth,
    http://borndba.com

  • I have a macbook pro core i7 mid 2012 And update to the latest version 10.8.4 system after updating the system I have the problem appeared to take off the device and stops at the apple logo for about 5 minutes and then enters the desktop How can I solve t

    I have a macbook pro core i7 mid 2012
    And update to the latest version 10.8.4 system after updating the system I have the problem appeared to take off the device and stops at the apple logo for about 5 minutes and then enters the desktop How can I solve this problem and thank you

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter "BOOT_TIME" (without the quotes) in the search box. Note the timestamps of those log messages, which refer to the times when the system was booted. Now clear the search box and scroll back in the log to the last boot time when you had the problem. Select the messages logged after the boot, during the time something abnormal was happening. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    For example, if the problem is a slow startup taking three minutes, post the messages timestamped within three minutes after the boot time, not before. Please include the BOOT_TIME message at the beginning of the log extract.
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    Still in Console, look under System Diagnostic Reports for crash or panic logs, and post the entire contents of the most recent one, if any. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • Hi, I am trying to update an iPhone 4 from iOS 4.3.3 to iOS 7.0.4, and every time I try to update it comes up with an error message saying that there was a problem because the network connection was reset. Is there any way I can get past this and update?

    The full message said:
    There was a problem downloading the software for the iPhone "Judy's iPhone 4". The network connection was reset.
    Make sure your network settings are correct and your network connection is active, or try again later.
    I am trying to update the iPhone for my grandmother, Judy, as I am leaving for Paris on Wednesday night and we want to have Facetime installed on her iPhone before then, so we can stay in contact with each other. It is the simplest way for this to happen but the program simply will not allow me to update her iPhone.
    Is there any way to get past this error and update her iPhone? Any help will be greatly appreciated.

    Dear Jody..jone5
    Good for you that can't update your iphone because I did it and my iphone dosen't work for example I can't download any app like Wecaht or Twitter..
    Goodluck
    Atousa

  • My new 8th gen iPod nano is 'not recognized' by my computer. My computer runs on Windows 7, and I've installed and updated the latest versions of itunes etc, but still to no avail! I've tried different usb ports, troubleshooting...

    My computer runs on Windows 7, and I've installed and updated the latest versions of itunes etc, but still to no avail! I've tried different usb ports, troubleshooting, etc... But it still says "One of the USB decuces arrached to this omputer has malfunctioned and windows does not recognize it".
    The iPod is brand new, sent to me by Apple as part of the 1st gen replacement programme. I've been using the cable that came with the 1st gen iPod (I bought the first gen second hand) It always worked on my computer with the 1st gen iPod. So I was wondering, do you think I need to replace my cable in order for my PC to recognize my iPod or is it something else?
    Thanks

    Try a different cable. And are you connecting directly to your computer or through a USB hub?

  • Green screen, downlading files and updating programs often stuck at 99%.

    Okey so I have got this problem for a 20 days, since I build my own computer. Some videos on youtube and other video stream sites bug out in the way that the video just goes green, and starts fast forwarding. Then I think streams on twitch.tv for example, I cant watch a stream for longer than 20 second and the video gets frozen and the stream needs to be refreshed. And updating games, downloading files often gets stuck at very end of the progress, and it wont succesfully download or update. Im not sure is it about Flash Player/Shockwave Player but if there doesnt come example green screen it may show something like you are missing add-on Flashplayer but when i refresh the page it may run the video fine for some time.
    The problem rarely happens at youtube but heres one where it happened Crs Piglet (Vayne) first ever NA Penta - YouTube
    Heres video where the video didnt start at all and aswell when it did the screen gone green again and fast forward. (contains adds) http://www.thevideo.me/kmqcwhblzheh
    Heres screenshots and one bad quality phone photo album of these problems, green screens, videos stuck, downloading stuck and updating stuck 99-100%. Imgur
    Heres my computer specs:
    My operating system is:          Microsoft Windows:  8.1 Pro, 64-bit
    Processor:                             Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz
    Graphic card:                         Nvidia GeForce GTX 760     Driver updated to: Geforce Game Ready Driver 347.52.
    Memory (ram):                       8GB
    Motherboard:                         MAXIMUS VII RANGER
    Dont know what else info I could put on about my computer really... I have tried to find answer, like disabling hardware acceleration, deleting flashplayer memory file, safe modes and all kind of tips I as able to find from internet.
    And I use mozilla firefox (36.0), but the problems happens aswell in Internet Explorer. I have updated Flash Player (16,0,0,305), my drivers (Geforce Game Ready Driver 347.52), all windows updates, java(1.8.0?), but still cant find the answer why watching videos/streams work well.
    Im sorry if I missed some info but ask if theres something.

    The green screen means that hardware decoding has failed.  It's probably a subtle, intermittent driver bug.
    You can disable hardware acceleration in Flash to avoid this while you wait for updated drivers to become available:
    Video playback issues

  • Hello, i restored and updated my iphone 4 to the latest version of 5.1.1 and after that when i connect my mobile to i tunes all i see is a big rectangle and a apple logo on left and a small lock on right side please help me fix this problem.

    hello,
    i restored and updated my iphone 4 to the latest version of 5.1.1 and after that when i connect my mobile to i tunes all i see is a big rectangle and a apple logo on left and a small lock on right side please help me fix this problem.

    I sloved this issue by resting my phone from settings>general>reset>reset all settings...the problem will be fixed

  • What is difference between modify and update i am using

    hi
    what is difference between mofify and update
    my requiremen is to have three condition checkec while mofifying or updating from a internal table
    the three fields are
    cus no
    status
    date these all are primary key in the database table
    so which sould i use modify or update
    there might be entry already existing in database table or new entry to be created if already existin it should check on the primary keys and updatat if not it should add a record
    pls suggest whihc to use and how to implement the check on teh threee primary key
    like if modify ztable from table it_test
    now where condition ? can be used or not with modify? and if yes how
    if not should i use update will update create a new entry if no entry is there and please give syntex
    regards
    Arora

    Hi Nishant Arora,
    Modify: It works in performing two actions.
    They are: Insert + Update.
    For Example If a record that is exited in database, so you are modifying that record, it updates that particular record.
    Similarly, If the is not existed in the database, you are modifying it, it inserts a new record.
    Update: Update means just it updates the status, I mean it only updates the record. It doesn't inserts any new record if that particular record is not present in the database.
    These are the cases you need to write these statements.
    Syntaxes: :
    Go through this links please.,
    http://help.sap.com/saphelp_nw04/helpdata/en/e7/968aa8b2384dd9835f91e7f8470064/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm
    Reward points if useful
    Cheers,
    Swamy Kunche
    Edited by: Swamy Kunche on Jun 11, 2008 2:41 PM

  • Lost photos / camera roll after restore and update.

    As the title says , I recently had to restore my iphone 3gs due to having problems with MAIL (problem fixed now.) but after doing a full backup and restore on the phone and update to the iOS 4 ( i think>) , I lost all of the photos that I had in the camera roll album folder , now I have loads of photos there that I do not want to loose ! I know there should be a way of getting them back from the backup but how ? Plus to prove even more that they are still there somwhere , when I connect it to the iTunes on my PC (Windows Vista) , under the yellow section bar it shows there are 315 (1.26 gb) photos on my device...but when I disconnect it and go into the album , there are 0 ! Now I have been reading about this online and people say that you basically take the images off your pc and sync them back onto the phone...but I havent got them saved on my pc anywhere...so where are they? PLEASE HELP me out on this one ,
    thank you in advance.

    The only place they may be is in a previous backup from before the restore. No Apple tool that I know of accesses these files within the backup file. There are reportedly some 3rd party tools that can get to the photos imbeded in the backup. The other option is to restore the old backup and then import the camera roll via iphoto or some other tool.
    If you have no copy of the old backup, I think you are out of luck.
    As you know by now, the iPhone's camera roll is treated as a digital camera, not as part of the sync.
    For the second post, if you'd like Apple to add the import to the sync process, you can request that via the www.apple.com/feedback web site.
    Thanks.

  • Need help to insert and update records in MDM

    Hi ,
    I am trying to develop an webdynpro application which can create and update records in tables of a repository of MDM . For example .. I want to insert values and later update values in Vendor table.
    I am new to webdynpro and MDM. If any one can help step by step or can send a sample code which I can be ready to use that would be great help.
    If anyone can have a sample code .. kindly mail to "[email protected]"
    It is urgent. Please help.
    Regards,
    Niraj
    Edited by: Niraj Kumar on May 23, 2008 6:50 AM

    Hi Niraj,
    Are u going to work with webdynpro Java/ABAP?
    some materials which are found useful are sent.
    Cheers,
    Mary

  • I forgot my password and am trying to reset my ipod,but it won't work. It says that my ipod is in recovery mode and that I must restore it. I click ok, and then restore, and then restore and update. then it says contacting ipod software update server and

    I forgot my password and am trying to reset my ipod, but it won't work.It says that my ipod is in recovery mode and that I must restore it. I click ok, and then click on restore and update. Then it says connecting ipod software update server and a screen pops up with ipod software update on the top and iOS 5.1. It lists a bunch of stuff this update contains and on the bottom it says next, which I click and nothing happens, it just goes back to the ipod restore page. Help, what am I doing wrong?

    This device is not eligible for the requested build (Also sometimes displayed as an "error 3194")
    Update to the latest version of iTunes. Mac OS X 10.5.8 (Leopard) users may need to download iTunes 10.6.3.
    Third-party security software or router security settings can also cause this issue. To resolve this, followTroubleshooting security software issues.
    Downgrading to a previous version of iOS is not supported. If you have installed software to performunauthorized modifications to your iOS device, that software may have redirected connections to the update server (gs.apple.com) within the Hosts file. Uninstall the unauthorized modification software from the computer.
    Edit out the "gs.apple.com" redirect from your hosts file, and then restart the computer for the host file changes to take affect. For steps to edit the Hosts file and allow iTunes to communicate with the update server, see iTunes: Troubleshooting iTunes Store on your computer, iPhone, iPad, or iPod—follow steps under the heading Blocked by configuration (Mac OS X / Windows) > Rebuild network information > The hosts file may also be blocking the iTunes Store. If you do not uninstall the unauthorized modification software prior to editing the hosts file, that software may automatically modify the hosts file again on restart.
    Avoid using an older or modified .ipsw file. Try moving the current .ipsw file (see Advanced Steps > Rename, move, or delete the iOS software file (.ipsw) below for file locations), or try restoring in a new user to ensure that iTunes downloads a new .ipsw.

  • I have an iPhone 4, My itunes are from two differnt accounts; one from when I was under my dads account, and the other is my own. My question is would I be able to sync and update my itunes on my MacBook without having all the new music erased.

    I have an iPhone 4, My itunes are from two differnt accounts; one from when I was under my dads account when i was younger, and the other is my own which i currently use. My question is would I be able to sync and update my itunes on my MacBook without having all the new music erased. I have the icloud on my phone, but I just want to update my music on my laptop. Just nervous to, because it has happened to me before on a desktop computer  and it *****. Please help! Thanks.

    nevermind, i figuered it out

  • Browse and update database tables

    I'm looking for a tool that will let me connect to an Oracle database, select a table and some fields off the table and build a simple java class to navigate / update the data.
    Essentially, I'm looking for a tool that replicates the way Microsoft Access can build a form for navigation and update of a database table.
    However, I want to use java, not MS Access.
    Any ideas if such a tool is available ?
    Thanks

    http://squirrel-sql.sourceforge.net/

  • I connected my iphone 4s that i unlocked for t-mobile. I plugged it into itunes, and it asked me to update to ios6. I accepted the download and update button. it told me it needed 8 hours. i closed my laptop. not shut down. i opened and it wants restorin?

    I connected my iphone 4s that I unlocked for t-mobile. I plugged it into itunes, and it asked me to update to ios6. I accepted the download and update button. It told me it needed 8 hours. I closed my laptop, not shut down. I re-opened the laptop a few hours later, and it wants restoring?? Whats going on?! i want my iphone back! PLEASE HELP. I'M LOST!!! (I synced my iphone to my computer if that helps at all).

    Yes, and, I try to restore. I have the T-Mobile sim card in it just to clarify. It will not let me get passed that, it does not accept the t-mobile sim card. i tried restoring it using wifi, cellular, and i cant get i tunes. I am scared that if i take the tmobile sim card out and put the at&t one in just to complete the restoration process that the iphone will lock again and not read the tmobile sim card, then all my hard work has gone for nothing. ( this whole process was caused by me trying wanting to empty my pictures onto my computer because i did not have any storage space left). <--- that may not be as important, but i included it just because.

Maybe you are looking for

  • Can't use purchased iTunes music

    I can't use some purchased iTunes music. We moved and I have a new computer (iMac). When we moved I had to drop my charter account - which I used as my itunes account. Now I use my gmail as my iTunes account but can't play 1 downloaded album (James T

  • Regarding Navigation in obiee 11g

    Hi All, i have recently migrated from obiee 10g to 11g. after migration the naviagation is not working. i have implemented navigation in 10 g in which on clicking one report it naviagate to another report also drilling down. but in 11g it is not happ

  • Need Oracle jdeveloper old version 9.0.3

    I ' m learning Oracle Jdeveloper and I'm begining with earlier versions . plase I need help. thanks a lot kboka, Abidjan, Ivory Coast, West Africa

  • Anyone care to make a suggestion on this error ?

    trying to run the startup.bat script in the bin folder C:\jwsdp-1.1\bin>startup Exception in thread "main" java.lang.NoClassDefFoundError: start

  • Oracle XE 10g connect for the first time

    I have just installed Oracle10 g express edition on Windows XP service pack 3, when trying to connect for the first time I get the ORA-12631 message error when trying to connect!! SQL> connect system Immettere la password: ERROR: ORA-12631: Recupero