Strange problem casting between the DATE and time STAMP

Hello world

I'm faced with a problem of strange casting between the DATE and time STAMP. Strange, because this happens in SQL-Developer and the Testdatabase, but not when called from inside SQL-Plus, even if all Session settings are set to the top completely equal.

I work on the Oracle 11 g Enterprise Edition Release 11.2.0.1.0 Windows database and run the following script, taken from SQL-Developer script output:

< pre >
create table ts_test)
time/date stamp,
stamp_copy timestamp)
table TS_TEST standing.

create or replace view vw_test as
Select cast (date stamp) buffer,
Cast (stamp_copy as date) stamp_copy
of ts_test
view VW_TEST standing.

insert into ts_test
Select systimestamp, the double null
1 eingefugt Zeilen.

Commit
festgeschrieben.

create or replace trigger trg_ts_test_iu
instead of update on vw_test
Start
Update ts_test
Set stamp_copy =: new.stamp_copy;
end;
RELAXATION trg_ts_test_iu kompiliert

Update vw_test
Set stamp_copy = stamp
1 Zeilen written on.

Select the stamp, stamp_copy, dump (stamp_copy)
of ts_test
STAMP STAMP_COPY DUMP (STAMP_COPY)
-----------------------------------------------------------------------------------------------------------------
30.05.2012 19:08:49, 218000000 30.05.3192 20:09:50, 000000000 Typ = 180 Len = 7: 131,192,5,30,21,10,51

Select *.
of nls_session_parameters
VALUE OF THE PARAMETER
----------------------------------------------------------------------
NLS_LANGUAGE GERMAN
NLS_TERRITORY GERMANY
NLS_CURRENCY €
NLS_ISO_CURRENCY GERMANY
NLS_NUMERIC_CHARACTERS.
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT exact hh24:mi:ss
NLS_DATE_LANGUAGE GERMAN
NLS_SORT GERMAN
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT JJ. MM YYYY HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT JJ. MM YYYY HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY €
BINARY NLS_COMP
NLS_LENGTH_SEMANTICS TANK
NLS_NCHAR_CONV_EXCP FAKE

17 Zeilen offiziell

Rollback
Rollback abgeschlossen.
< / pre >

Look at the strange data that stamp_copy was after the update.

When run from SQL over, everything is fine. But when I run this code in our application, the same phenomenon occurs. I've even seen a data dating back to the year 11907 (!), giving an exception by selecting from the table.

Someone at - it an idea on how to work around this bug?

Best regards

Jürgen

Did you check metalink for bugs?

There are a few listed in this blog, that may be useful for you.

http://hoopercharles.WordPress.com/2011/02/17/strange-timestamp-behavior/

Tags: Database

Similar Questions

  • How can I print my photos displaying the date and time stamp

    I have pictures in a legal context but do not understand how to print them displaying the date and time stamp.  The timbre of the date and time are necessary for me to present my case exactly.  Can someone tell me how to print with these marks.

    Thank you

    The following instructions will prepare photos
    with the EXIF Date/time stamp then you can print
    them.

    FastStone Image Viewer freeware can add
    EXIF Date/time in the face of your photos in a batch.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    FastStone Image Viewer
    http://www.FastStone.org/FSViewerDetail.htm
    (Windows XP / Vista / 7)

    I suggest that you create a new folder and add
    copies of your photos for experimental purposes.
    If you are unhappy with the result your originals
    will be intact.

    After FastStone is downloaded and installed...
    Open the program and go...

    Tools / open the Batch Conversion / tab Batch convert...

    Check the box... Use of advanced options...

    Advanced Options button / tab text.
    Check the box... Add text...

    (You will need to experiment with the position and the police
    size and color to get the desired result.)
    (the text size will need to be adjusted according to the)
    the size of the photos)

    Open the window drop... "Insert a Variable."
    choose... EXIF Date Time / Date and time...
    (in the white field you should see ($H1)
    Left click... Ok

    On the Batch tab convert... in the left field...
    Left click the square button "select the Source folder.
    Find and select the photos you want to
    Add.

    Left, click on the Add button to move the files to
    the right field.

    Choose an output Format...

    Choose an output folder...

    Click on the button convert...

    It's much easier to do than to explain then
    give it a try before say you "Good Grief... it's too
    a lot of work.

  • Script Automator for the DATE and TIME stamped record

    Hi all

    I'm not a scripter, but are in need of a DATE and time-STAMPED folder (or file) I would like to put on my desktop and have updated automatically so that I can use this tool to quickly see if a backup external (or internal) is current. probably I could also use it to quickly find out how /old/ a backup is.

    for now, I do this manually if I want to quickly verify that a backup works by creating a "date named folder" on the desktop - such as '-2016 03 26 "."» so I can quickly see if a backup I just ran ran.

    I have a lot of backups (internal, external, off site, etc.) and it would be super useful for me to have.

    I consider the name of the folder to be customizable (potentially) in case I need to change it, but a good default would be "-YEAR MONTH DAY" so that I could see easily when this backup has been but also I name my files in this way so they can appear in chronological order "."

    is anyone able to help me with something like that or suggest another forum for cross-post this?

    Thank you

    Jon

    Hello

    Create the the ""new folder " action, like this:"

    ---------------

    Drag and drop the 'Shell Script' variable in the "name:" field.

    --------------

    Double click on the variable in the "name:" field:

    Copy and paste this text in the field 'Script ':

    date "+%Y %m %d"
    
  • PLS-00307: too many statements - overloaded method w. the date and time stamp

    I ran in an overload situation but can't seem to find out exactly why the following error occurs:
    create or replace package pkg_overload
    as
      procedure overload(p_in in date);
      procedure overload(p_in in timestamp);
    end pkg_overload;
    /
    
    create or replace package body pkg_overload
    as
      procedure overload(p_in in date)
      as
      begin
        dbms_output.put_line('overload > date');
      end overload;
    
      procedure overload(p_in in timestamp)
      as
      begin
        dbms_output.put_line('overload > timestamp');
      end overload;
    end pkg_overload;
    /
    When I run the overloaded methods sysdate and systimestamp, I get an error on the timestamp:
    exec pkg_overload.overload(sysdate);
    
    overload > date
    
    exec pkg_overload.overload(systimestamp);
    
    Error starting at line 27 in command:
    exec pkg_overload.overload(systimestamp)
    Error report:
    ORA-06550: line 1, column 7:
    PLS-00307: too many declarations of 'OVERLOAD' match this call
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    It seems that Oracle is trying both the implicit conversion of the timestamp to date and no conversion, thus obtaining the error PLS-00307. Can anyone provide more insight in this? Is their still around him (in addition to creating a single method named timestamp procedure)?

    Thank you

    Martin
    -----
    http://www.talkapex.com
    http://www.clarifit.com

    SYSTIMESTAMP is a TIMESTAMP WITH time ZONE SCHEDULE. You must provide a separate overload for the TIMESTAMP WITH time ZONE SCHEDULE (and you'll probably want one for a setting of TIMESTAMP WITH time ZONE SCHEDULE LOCAL as well).

    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace package pkg_overload
      2  as
      3    procedure overload(p_in in date);
      4    procedure overload(p_in in timestamp);
      5    procedure overload(p_in in timestamp with time zone);
      6    procedure overload(p_in in timestamp with local time zone);
      7* end pkg_overload;
    SQL> /
    
    Package created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace package body pkg_overload
      2  as
      3    procedure overload(p_in in date)
      4    as
      5    begin
      6      dbms_output.put_line('overload > date');
      7    end overload;
      8    procedure overload(p_in in timestamp)
      9    as
     10    begin
     11      dbms_output.put_line('overload > timestamp');
     12    end overload;
     13    procedure overload(p_in in timestamp with time zone)
     14    as
     15    begin
     16      dbms_output.put_line('overload > timestamp with time zone');
     17    end overload;
     18    procedure overload(p_in in timestamp with local time zone)
     19    as
     20    begin
     21      dbms_output.put_line('overload > timestamp with local time zone');
     22    end overload;
     23* end pkg_overload;
     24  /
    
    Package body created.
    
    SQL> set serveroutput on;
    
    SQL> exec pkg_overload.overload( systimestamp );
    overload > timestamp with time zone
    
    PL/SQL procedure successfully completed.
    

    Justin

  • DATE and time STAMP

    All,

    I am convert some sql server scripts to the oracle scripts. I met several times the data type DATETIME has been used in sql server scripts.

    http://docs.Oracle.com/CD/E10405_01/doc/AppDev.120/e10379/ss_oracle_compared.htm

    In the link above, I stumbled upon DATETIME (sql server) is equal to the DATE / TIMESTAMP in Oracle (Oracle).

    Which is better to use between the DATE and time STAMP, performance wise. Please give me some suggestions.

    Thank you

    Hello
    Use the DATE where you have the choice.
    I don't know that the DATEs are more effective than the TIMSTAMPs (even if I have no solid evidence). In addition, DATEs require less storage space, and there are more features available to manipulate DATEs. (These functions usually work on the timestamps also, but they start by converting the TIMESTAMP of a DATE).

  • Date and time stamp not updated

    Following my previous posts, the date and time stamp of the files updated don't are not updated in the RoboSource Control, i.e. the column changed in the Explorer RoboSource Control. However, it seems that changes are stored on the server when the topics are archived, as I can right-click a file to source code control that I've changed, choose the command view and see the changes in the HTML code.

    Basically, this means that source code control is not recognizing that the files have changed and that's why when someone is trying to get the last version he thinks he's one because the date and time are the same as the previous version.

    Everyone knows this behavior before or know why the modified column suddenly stopped updating?

    Thank you

    Jonathan

    After a few Google searches of the digging and random, the following article seems to have solved my problem.

    It seems that if you run RoboSource Control on 64-bit computers, there are problems with checking in files.

    http://helpx.adobe.com/robohelp/kb/cant-check-files-robosource-control.html.

  • Problems with the date and time - have to reset the date & time on reboot

    original title: problems with the date and time

    Whenever I turn on my computer (Windows XP 2002) I click on F2.  Then I re - set the date and time it occurred in January 2006 1 h every time I have turn off the computer.  Can someone tell me what I need to do?

    You need to replace the battery in time clock (RTC) real of your computer.  It can also be called the CMOS or BIOS battery.

    Many computers, this battery is an inexpensive CR2032 button available in almost every pharmacy corner.  There are, however, some computers (especially laptops) that require a different (and probably more expensive) battery.

    Whatever the expense, almost all of these batteries are easy to replace.

    To get help, post back with the brand and model of your computer.

  • Passport problems of blackBerry with date and time on the passport of Blackberry

    Hello!
    I have problems with my passport for Blackberry.
    For the couple in a day time, it changes itself. So my hub doesn't work, I get no new messages, I can't send messages! The last time I did correct settings did not help. If everything is correct or hub or messages do not work. I tried to make different adjustments, tried to restart the hub, tried to restart the phone. but it does not work. I really need your help because I can't use my phone and nobody can connect with me.
    I didn't drop the phone. I know that these problems are related to the date and time because since the first problem with hub and messages has occurred, I saw that the date and time were bad, changed to correct and everything went well. I don't understand why he doesn't now. Can you tell me what to do?
    OS 10.3.2.2836
    1 January, I received this phone and it worked allright until some of the OS updates, can't tell which exactly because I have auto update.

    For those who have the same problem: I deleted the contact of my mother on the phone. I deleted the messages displayed as January 27, then I added my mother to local contacts and new messages started coming

  • Find the difference between two date and time

    Hi friends,

    I wanted to find the difference between two date and time, but my qury is slightest error "invalid number."

    select sql_step_num,proc_name,run_seqno,start_date,end_date,(to_char(start_date,'HH24-MI-SS') - to_char(end_date,'HH24-MI-SS') ) as ed  
    from eval.EVAL_RUNTIME_DETAILS
    where trunc(start_date) = trunc(sysdate) 
    order by sql_step_num;

    You try to get the feel between two char strings.
    And more difference between two dates gives a NUMBER of days.
    Try this:

    select sql_step_num,proc_name,run_seqno,start_date,end_date,numtodsinterval(end_date-start_date,'DAY') as ed
    from eval.EVAL_RUNTIME_DETAILS
    where trunc(start_date) = trunc(sysdate)
    order by sql_step_num;
    
  • given the date and time not set when computer starts. also have a problem with typing

    by turning on my computer, sometimes it lights up at all, and then I try several times so that it lights up. When switching on the main screen, it says error due to the date and time not set and puts my computer starts in safe mode. When I am that I then have to set the date and time again. Why this keep happening?

    on my second question that I have is when I type an email or anything, my writing will just jump on another line and start typing in the middle of other sentences. Why is it jump around like that?

    You may have a failed in your motherboard CMOS battery.

    It's a battery power supply NET, size piece that keeps your system settings when your computer is off.

    They cost about $5 to replace.

    http://www.computerhope.com/issues/ch000239.htm

    How to replace the CMOS battery in the above link info.

    See you soon.

    Mick Murphy - Microsoft partner

  • Automatically set to the Date and time does not

    Date and time settings on my iPad Air set them automatically does not work? When I turn it out it will allow me to choose a city (Knoxville).

    When I turn it on with (location settings) it just turns and turns?

    Any ideas?

    Hello and welcome to Apple Support communities,

    This problem may be caused by a number of things, most often the cause is the device not being able to contact the time server. Here are the instructions from Apple supported for this problem, as well as a link to the appropriate article.

    Follow these steps, after each step:

    1. Make sure you have the latest version of iOS.
    2. Automatically turn on set in settings > general > Date & time. This will automatically put your date and time based on your time zone.
    3. Make sure that your time zone is set correctly. Tap Settings > general > Date & time > time zone.

    If you still have any questions affecting your date, time, or time zone, you can automatically disable in the settings > general > Date & time and manually set the time and time zone. Or contact your carrier.

    The option to enable the value automatically may not be available in all countries or all shells.

    If the time on your iOS device does not go after a sync with your computer, the computer may be time wrong. Check the time on your computer in system preferences > Date & time. You can select "Set date and time automatically."

    Support the Article HT203483

    Get help with the date and time on your iPhone, iPad and iPod touch - Apple Support

    Of course, if the time of your carrier server cannot connect the other option is to manually set the date and time until the carrier server are again available.

    Hope you helps out.

    Kind regards

    Peter.

  • The date and time does not work.

    I have an iphone 5 c.

    The date and time does not work. This is the second time.  The first time was about 3 to 4 months again and now again after upgrade to iOs9.3.1.

    Even after trying to change it manually, time slows down or stops.

    Everyone has problems with their date and time?

    • Try a forced reboot: hold down the House and on the buttons until the unit turns off. Ignore the cursor off if it appears. Once completed, if it does not start on it own, turn off power with the key On. In some cases, it also contributes to double click the Home button and close all applications before restarting.
    • Restore factory settings (no backup)
    • Make an appointment at your local Apple store to have it checked.
  • Satellite Pro 6100 - how to change the date and time in the BIOS

    Hello

    I received a satellite pro 6100 that had not been used for some time. Windows does not work then he reinstalled with the good drive.

    When I try and windows 'enable', I get the error 32777 and the laptop is unable to connect with the activation servers that a google leads to believe me that the date and time are incorrect in the bios.

    I know that Press esc to access the bios but there is no option to change the date and time in there. I put the date / the correct time in windows, but this does not seem to synchronize with the bios. I've updated to the latest version of the bios, but this is not enough.

    How can I change or update the time in the bios?

    Thank you

    Hello

    I doubt this time and date setting BIOS does affect Windows activation time Windows doesn t affect it in my opinion. There must be another reason for this problem.
    You can activate Windows by phone?

    Normally the date and time in the BIOS can change you if you mark the date or time, and then press on + or - to change this. Sometimes you have to press PageDown/to the top according to the model of BIOS or laptop.
    Usually in the configuration of the BIOS you will find a brief info how changing the values.

    Check this box!

  • Camcorder Camileo P100 store the date and time

    My recently purchased camcorder camileo P100 store the date and time.
    Whenever it starts it must be reset because it refers to the default date.

    Has anyone else had this problem

    It looks like a camera malfunction don t think you can fix it.
    I suggest you to get in touch with the dealer and replace the cam

  • Tecra M5 does not record the date and time - battery RTC or CMOS checksum is inconsistent

    My Tecra M5 PTM50E reverend new does not record the date and time. I loaded RTC battery for 8 hours when electricity is on in the said user's manual. I don't know where is the problem. The BIOS settings are respect after power is on.

    When I change any value in the BIOS, the changes are saved properly but date & time system restored to their value 01/01/2000, 00:00 every time when I get out of turning off more of 2-3 min. Message "RTC battery is low or CMOS checksum is inconsistent.

    Press [F1] to set Date/time"does not appear when I power on the computer. Any suggestions?

    Hi guys

    Usually this problem appears only if the CMOS (real time clock) battery is empty or corrupted.
    The real time clock battery powers the internal clock in real time and calendar. It also maintains the system configuration. If the RTC battery is completely discharged, the system loses these data and the real-time clock. In this case, the message RTC battery is low or CMOS checksum is inconsistent appears.

    So I see only two possibilities:
    Either you will charge the battery for real-time clock, or you ask the technician for replacement.

    Generally, the battery must be completely charged after 8-9 hoers but try to connect the laptop to the power adapter for a long time.
    If it will not help solve the problem if you contact the ASP for the RTC battery replacement.

Maybe you are looking for