Sysdate is not updating to a column

I have a query that update column to sysdate. The problem sometimes it updates but sometimes not.
Here is my sample query.
Update table1 set a= 'a', b='b', c=SYSDATE where table1.no = '1'
Is there any issue of a SYSDATE.
Thanks a lot!

... and this is what language?
SQL> drop table tst purge
  2  /
Table dropped.
SQL>
SQL> create table tst
  2  (a varchar2(1)
  3  ,b varchar2(1)
  4  ,c date
  5  );
Table created.
SQL>
SQL> insert into tst values ('A', 'B', sysdate);
1 row created.
SQL> select a
  2       , b
  3       , to_char (c, 'hh24:mi:ss')
  4    from tst
  5  ;
A B TO_CHAR(
A B 10:30:33
SQL> begin
  2     dbms_lock.sleep (1);
  3  end;
  4  /
PL/SQL procedure successfully completed.
SQL>
SQL> update tst
  2     set a = 'a'
  3       , b = 'b'
  4       , c = sysdate
  5  ;
1 row updated.
SQL> select a
  2       , b
  3       , to_char (c, 'hh24:mi:ss')
  4    from tst
  5  ;
A B TO_CHAR(
a b 10:30:34
SQL> Are you executing the same statement within the same second (granularity of DATE) multiple times?

Similar Messages

  • Derived table 'tablename' is not updatable because a column of the derived table is derived or constant.

    Hi Guys,
    I have a With CTE table expression ,this cte gets the value from startdate and enddate
    I need to insert this startdate and enddate into a table ,while inserting into table,i got the below error,
    Derived table 'Datematrix' is not updatable because a column of the derived table is derived or constant.
    below is the query i used,
    declare @StartDate date='01/01/2013'
    declare @EndDate date='12/31/2013'
    ;WITH Datematrix(AllocationDate)
    As
    SELECT @StartDate AS AllocationDate
    UNION ALL
    SELECT DATEADD(D,1,AllocationDate) AS AllocationDate
    FROM Datematrix WHERE AllocationDate<@EndDate
    Insert into Datematrix(AllocationDate)
    select * from Datematrix 
    any guys update this solution.
    Thanks 
    Bhupesh.R

    ;WITH Datematrix(AllocationDate)
    As
    SELECT @StartDate AS AllocationDate
    UNION ALL
    SELECT DATEADD(D,1,AllocationDate) AS AllocationDate
    FROM Datematrix WHERE AllocationDate<@EndDate
    Insert into Datematrix(AllocationDate)
    select * from Datematrix 
    Hello,
    Your CTE bases only on fix value = @StartDate , not on a table/view; here do you want to insert data to? This don't work in any way.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • SPD workflow not updating a Lookup Column

    I have a 2 lists (Computers & Lending Library) that both have a look-up column (Item Status) pointing to a 3rd list (Item Status - Category).
    Both lists are properly looking up when manually edited via the web interface. When I try to use a SPD workflow to "Update or Create List Item" and I set the column in the Lending Library (Item Status) = Current Item (Items Status) the column is not populated.
    I took the same value and updated a Text column and the value is "0".
    The strange thing is when setting the (Item Status) it only gives me the options:
    As Integer
    Lookup ID (as Integer)
    Lookup Value (as Integer)
    What am I missing?
    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.

    Its been a long time since I looked at this but yes we did figure it out.
    Here is my Comment to myself on the lookup: "Must extract the [Item type] as a string and then lookup the corresponding List Item [ID] in the "Item Type - Category" list, use that value to update the "LendLib"[Item
    Type]."
    As suggested you need to reference the ID of the lookup, and I am caching that. Then when setting the [Item Type] column, by referencing the [ID] column in the Lookup list, then set your value to the Title of that lookup.
    If I recall the issue was the lookup, if you don't use the [ID] then you don't actually retrieve the value from the [Title] column correctly.
    My screenshots below are a bit confusing at first because my Lookup List is called "Item Type - Category" and the column in the 2nd list that is the
    Lookup Column,  is called "Item Type".
    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.

  • SQL Server 2008 R2 Replication - not applying snapshot and not updating all repliacted columns

    We are using transactional replicating on SQL Server 2008 R2 (SP1) using a remote distributor. We are replicating from BaanLN, which is an ERP application to up to 5 subscribers, all using push publications. 
    Tables can range from a couple million rows to 12 million rows and 100's of GBs in size. 
    And it's due to the size of the tables that it was designed with a one publisher to one table architecture.  
    Until recently it has been working very smooth (last four years)) but we have come across two issues I have never encountered.
    While this has happen a half dozen times before, it last occurred a couple weeks ago when I was adding three new publications, again a one table per publication architecture.
    We use standard SS repl proc calls to create the publications, which have been successful for years. 
    On this occasion replication created the three publications, assigned the subscribers and even generated the new snapshot for all three new publications. 
    However,  while it appeared that replication had created all the publications correctly from end to end, it actually only applied one of the three snapshot and created the new table on both of the new subscribers (two on each of the
    publications).  It only applied the snapshot to one of the two subscribers for the second publications, and did not apply to any on the third.  
    I let it run for three hours to see if it was a back log issue. 
    Replication was showing commands coming across when looking at the sync verification at the publisher and 
    it would even successfully pass a tracer token through each of the three new publications, despite there not being tables on either subscriber on one of the publishers and missing on one of the subscribers on another.  
    I ended up attempting to reinitialize roughly a dozen times, spanning a day, and one of the two remaining publications was correctly reinitialized and the snapshot applied, but the second of the two (failed) again had the same mysterious result, and
    again looked like it was successful based on all the monitoring. 
    So I kept reinitializing the last and after multiple attempts spanning a day, it too finally was built correctly.  
    Now the story only get a little stranger.  We just found out yesterday that on Friday the 17th 
    at 7:45, the approximate time started the aforementioned deployment of the three new publications, 
    we also had three transaction from a stable and vetted publication send over all changes except for a single status column. 
    This publication has 12 million rows and is very active, with thousands of changes daily. 
    , The three rows did not replicate a status change from a 5 to a 6. 
    We verified that the status was in fact 6 on the publisher, and 
    5 on both subscribers, yet no messages or errors.  All the other rows successfully updated.  
    We fixed it by updating the publication from 6 back to 5 then back to 6 again on those specific rows and it worked.
    The CPU is low and overall latency is minimal on the distributor. 
    From all accounts the replication is stable and smooth, but very busy. 
    The issues above have only recently started.  I am not sure where to look for a problem, and to that end, a solution.

    I suspect the problem with the new publication/subscriptions not initializing may have been a result of timeouts but it is hard to say for sure.  The fact that it eventually succeeded after multiple attempts leads me to believe this.  If this happens
    again, enable verbose agent logging for the Distribution Agent to see if you are getting query timeouts.  Add the parameters
    -OutputVerboseLevel 2 -Output C:\TEMP\DistributionAgent.log to the Distribution Agent Run Agent job step, rerun the agent, and collect the log.
    If you are getting query timeouts, try increasing the Distribution Agent -QueryTimeOut parameter.  The default is 1800 seconds.  Try bumping this up to 3600 seconds.
    Regarding the three transactions not replicating, inspect MSrepl_errors in the distribution database for the time these transactions occurred and see if any errors occurred.
    Brandon Williams (blog |
    linkedin)

  • ID not updated in calculated column

    I have a calculate column in a shrepoint list:
    =ID&" "&Title
    But I see that when an item is openend the calculation is not done and the ID and Title is only the Title...
    Mike

    for your requirement you can use an simple workflow
    create a column for example staticID
    when an item is created fill this with the ID
    in the calculated column you can use
    [staticID]&" "&[Title]
    /blog
    twttr @esjord

  • AP_INVOICE_DISTRIBUTIONS_ALL.LAST_UPDATE_DATE was not updated

    Hi,
    I would like to raise one question on AP_INVOICE_DISTRIBUTIONS_ALL.LAST_UPDATE_DATE of EBS 11.5.10 which is related to OBI Application 7.9.6.1
    One customer mentioned that AP_INVOICE_DISTRIBUTIONS_ALL.LAST_UPDATE_DATE was not updated whenever AP_INVOICE_DISTRIBUTIONS_ALL.PREPAY_AMOUNT_REMAINING filed is updated.
    In reverse, I asked customer if it is expected in EBS 11.5.10 because I understand that LAST_UPDATE_DATE field is mandatory updated whenever any column is changed.
    "1/ Basically, AP_INVOICE_DISTRIBUTIONS_ALL.LAST_UPDATE_DATE field is mandatory updated whenever any column is changed. If not, it must be a Source Application problem. Why do your Source Application person think that it is expected?
    Ans: Because Source Application person think that Oracle apps basic application functionality for AP Invoice."
    Could you let me know if it is really expected in EBS 11.5.10 or any other suggestions?
    Regards,
    ChongHak

    If the last_update_date is not updated when another column in the table is updated, it is most likely a bug in EBS.
    You should search metalink for a patch or raise an SR to obtain one.
    Hope this helps,
    Sandeep Gandhi

  • Views, not updatable???

    Have run the script demobld.sql in schema SCOTT/TIGER and created the following view
    SQL> @C:\scripts\demobld.sql
    Building demonstration tables. Please wait.
    Demonstration table build is complete.
    CREATE OR REPLACE VIEW empdept AS
    SELECT emp.empno, emp.ename, emp.job, dept.deptno, dept.dname, dept.loc
    FROM emp, dept
    WHERE emp.deptno = dept.deptno;
    select * from user_updatable_columns where table_name like 'EMPDEPT';
    OWNER     TABLE_NAME COLUMN_NAME UPD INS DEL
    SCOTT EMPDEPT EMPNO NO NO NO
    SCOTT EMPDEPT ENAME NO NO NO
    SCOTT EMPDEPT JOB NO NO NO
    SCOTT EMPDEPT DEPTNO NO NO NO
    SCOTT EMPDEPT DNAME NO NO NO
    SCOTT EMPDEPT LOC NO NO NO
    I don't understand why the view is not updatable for the columns from the base table EMP, they should be. Does anyone know what the problem could be
    Cheers
    Fergus

    Are you sure that you have all the primary keys and foreign keys correctly defined on those two tables?
    SQL> alter table dept drop constraint pk_Dept ;
    Table altered.
    SQL>
    SQL> CREATE OR REPLACE VIEW empdept AS
      2  SELECT emp.empno, emp.ename, emp.job, dept.deptno, dept.dname, dept.loc
      3  FROM emp, dept
      4  WHERE emp.deptno = dept.deptno;
    View created.
    SQL>
    SQL> select * from user_updatable_columns where table_name like 'EMPDEPT';
    OWNER                          TABLE_NAME                     COLUMN_NAME                    UPD INS DEL
    SCOTT                          EMPDEPT                        EMPNO                          NO  NO  NO
    SCOTT                          EMPDEPT                        ENAME                          NO  NO  NO
    SCOTT                          EMPDEPT                        JOB                            NO  NO  NO
    SCOTT                          EMPDEPT                        DEPTNO                         NO  NO  NO
    SCOTT                          EMPDEPT                        DNAME                          NO  NO  NO
    SCOTT                          EMPDEPT                        LOC                            NO  NO  NO
    6 rows selected.
    SQL>

  • The workflow could not update the item, possibly because one or more columns for the item require a different type of information. Outcome: Unknown Error

    Received this error (The workflow could not update the item, possibly because one or more columns for the item require a different type of information.) recently on a workflow that was
    working fine and no changes were made to the workflow.
    I have tried a few suggestions, i.e. adding a pause before any ‘Update’ action (which didn’t help because the workflow past this action without incident); checked the data type being written
    to the fields (the correct data types are being written); and we even checked the list schema to ensure the list names and the internal names are aligned (they
    are), but we still cannot figure out why the workflow is still throwing this error.
    We located the area within the workflow step where it is failing and we inserted a logging action to determine if the workflow would execute the logging action but it did not, but wrote the same error message.
    The workflow is a Reusable Approval workflow designed in SharePoint Designer 2010 and attached to a content type. 
    The form associated with the list was modified in InfoPath 2010. 
    Approvers would provide their approval in the InfoPath form which is then read by the workflow.
    Side note - items created after the workflow throws this Unknown Error some seem to be working fine. 
    We have deleted the item in question and re-added it with no effect. 
    Based on what we were able to determine there don’t seem to be any consistency with how this issue is behaving.
    Any suggestions on how to further investigate this issue in order to find the root cause would be greatly appreciated?
    Cheers

    Hi,
    I understand that the reusable workflow doesn’t work properly now. Have you tried to remove the Update list item action to see whether the workflow can run without issue?
    If the workflow runs perfectly when the Update list item action is removed, then you need to check whether there are errors in the update action. Check whether the values have been changed.
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • The workflow could not update the item, possibly because one or more columns for the item require a different type of information using Update Item action

       I got error  "The workflow could not update the item, possibly because one or more columns for the item require a different type of information "I  found out the cause is  Update Item action       
    I need to update item in another List call Customer Report ,the field call "Issues"  with data type  "Choice"   to yes
    then the error arise .   please help..

    Thanks for the quick response Nikhil.
    Our SPF 2010 server is relatively small to many setups I am sure. The list with the issue only has 4456 items and there are a few associated lists, eg lookups, Tasks, etc see below for count.
    Site Lists
    Engagements = 4456 (Errors on this list, primary list for activity)
    Tasks = 7711  (All workflow tasks from all site lists)
    Clients = 4396  (Lookup from Engagements, Tslips, etc)
    Workflow History = 584930 (I periodically run a cleanup on this and try to keep it under 400k)
    Tslips = 3522 (Engagements list can create items here, but overall not much interaction between lists)
    A few other lists that are used by workflows to lookup associations that are fairly static and under 50 items, eg "Parters Admin" used to lookup a partners executive admin to assign a task.
    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.

  • NULLABLE column is not updated after the NOT NULL constraint definition...

    Hi,
    SQL> select column_name,nullable from all_tab_columns where table_name='EMP';
    COLUMN_NAME                    NULLABLE
    EMPNO                          N
    ENAME                          Y
    JOB                            Y
    MGR                            Y
    HIREDATE                       Y
    SAL                            Y
    COMM                           Y
    DEPTNO                         Y
    CODE_POLEIS_DIAM               Y
    9 rows selected
    SQL> ALTER TABLE EMP add constraint emp_job_nn check(job is not null);
    Table altered
    SQL> select constraint_name from all_cons_columns
      2  where table_name='EMP';
    CONSTRAINT_NAME
    FK_DEPTNO
    PK_EMP
    EMP_JOB_NN
    SQL> select column_name,nullable from all_tab_columns where table_name='EMP';
    COLUMN_NAME                    NULLABLE
    EMPNO                          N
    ENAME                          Y
    JOB                            Y                         <---------'NULL'
    MGR                            Y
    HIREDATE                       Y
    SAL                            Y
    COMM                           Y
    DEPTNO                         Y
    CODE_POLEIS_DIAM               Y
    9 rows selected
    Why is not updated....????
    In Oracle ebook:
    Oracle® Database Reference
    10g Release 2 (10.2)
    Part Number B14237-02
    the comments about the NULLBLE column are as follows:
    "Specifies whether a column allows NULLs. Value is N if there is a NOT NULL constraint on the column or if the column is part of a PRIMARY KEY. The constraint should be in an ENABLE VALIDATE state."
    BUT BY DEFAULT ALL CONSTRAINTS ARE IN VALIDATE STATE
    (Ref: Oracle® Database SQL Reference
    10g Release 2 (10.2)
    Part Number B14200-02 )Note : I use OraDB 10g v.2
    Thanks a lot
    Sim

    Hi,
    Tom Kytes answer it before:
    SQL> create table t ( id int );
    Table created.
    SQL> desc t
    Name                            Null?    Type
    ID                                       NUMBER(38)
    SQL> alter table t add constraint t_nn check (id is not null);
    Table altered.
    SQL> insert into t (id) values (null);
    insert into t (id) values (null)
    ERROR at line 1:
    ORA-02290: check constraint (TANDREWS.T_NN) violated
    SQL> desc t
    Name                            Null?    Type
    ID                                       NUMBER(38)
    Followup July 16, 2003 - 10am US/Eastern:
    that is not a NOT NULL constraint, that is a check constraint
    ops$tkyte@ORA920LAP> create table t ( x int );
    Table created.
    ops$tkyte@ORA920LAP> alter table t modify x not null;
    Table altered.
    ops$tkyte@ORA920LAP> set linesize 50
    ops$tkyte@ORA920LAP> desc t
    Name                    Null?    Type
    X                       NOT NULL NUMBER(38)To see the full thread in asktom, please refer to:
    - http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1338402651192
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com

  • BLOB column not updating using automated row processing

    I have fiddled around with creating a simple application to understand how APEX handles images stored in blobs - did a simple app that stores them, gets them, displays them. it all works great.
    so i have this existing table/application that i am trying to add a BLOB column to here's what i did:
    it's a pretty simple form on a table with report application. just one table.
    I added the BLOB to the table (and the other mimetype etc cols as well).
    i added the page items to the form page.
    i basically made everything identical in terms of page item settings and such to the working simple application.
    so here's the problem... when i run the application and update a row, the BLOB column isn't updating. neither are the mimetype or filename columns. the activity date col is.
    and here's another interesting thing. i quickly created another form and report pair on the same table, and when i ran it, it updates the blob col just fine.
    why is my original form not updating it? what can i do to remedy this? any ideas? i've gone though setting by setting for the blob page item and the one that works is identical to the one that doesn't.
    i'm using the automatic row processing to update the table.
    Edited by: moo on Jun 23, 2011 5:33 AM

    Gary,
    The DML processes (and the creation wizards for them) are for use with items having source type Database Column. If your page items don't use this source type, then neither the Automated Row Fetch nor the Automatic Row Processesing (DML) process types will work.
    Scott

  • Audit columns not updated when update statement is invoked

    I am trying to perform DML operation using "Process Row" process.
    I have provided the default values for audit columns in the default section of the page item attributes.
    When I insert, the record is inserted with proper default values.
    The problem arises when I try to update the record. For e.g. the last_update_date is not update with the current timestamp. I tried using "After Submit -Computation". But the column is not updated with the current timestamp value.
    I do not want to use database triggers.

    I am trying to perform DML operation using "Process Row" process.I have provided the default values for audit columns in the default section of the page item attributes.
    When I insert, the record is inserted with proper default values.
    The problem arises when I try to update the record. For e.g. the last_update_date is not update with the current timestamp. I tried using "After Submit -Computation". But the column is not updated with the current timestamp value.>
    What is the datatype of Last_update_date, DATE or TIMESTAMP or some variant of TIMESTAMP ?
    Post your code and describe your computation point and conditions on it.
    >
    I do not want to use database triggers.>
    I really wonder why you do not want to use the better approach. Don't elaborate, I don't want to hear it.
    Cheers,

  • Modified by column the user name is not updated

    Hi
     I am using the client side object model to upload the document in the document library, its working fine, but the modified by column  the each user name is  not updated, instead of system name is updated for all the
    upload. 
    In the below screen shot where all the documents uploaded by the different users but its show the only the system instead of user name how to solve the issue.

    thanks Hemendra
    Agrawal
    i will
    try it another one issue 
    i cant able to upload the file size >1 MB its showing error."the remote server returned an error (400) bad request."
    i tried your previous post but its not working.

  • BLOB column not updating

    i have two blob columns in my table say b1 and b2, that are used to store the images. the problem is, when i updates B1 column it works but as i try to update the B2 column only it the error 'ORA-100505 Oracle unable to update record' appears.
    but if i updates both the columns then it accepts the value in B2 as well.
    i am working with orcle 8i 6.1. i had faced this proble earlier agaisnt oracle 8, but as shifted to 8i the problem was solved, but it appeared again.
    the other strange problem is,if the coloumn is blank and i call this any coloumn in report the rports aborts displaying message 'unable to read the image format', how ever it was working very much fine earlier. I tried to recreate the column but no success, i also used EMPTY_BLOB() to initialize the coloum but of no avail.
    Any body could help please?
    thanks in advance

    i have two blob columns in my table say b1 and b2, that are used to store the images. the problem is, when i updates B1 column it works but as i try to update the B2 column only it the error 'ORA-100505 Oracle unable to update record' appears.
    but if i updates both the columns then it accepts the value in B2 as well.
    i am working with orcle 8i 6.1. i had faced this proble earlier agaisnt oracle 8, but as shifted to 8i the problem was solved, but it appeared again.
    the other strange problem is,if the coloumn is blank and i call this any coloumn in report the rports aborts displaying message 'unable to read the image format', how ever it was working very much fine earlier. I tried to recreate the column but no success, i also used EMPTY_BLOB() to initialize the coloum but of no avail.
    Any body could help please?
    thanks in advance

  • Quantity column is not updating in YR02 report

    Dear Experts,
    While doing download the asset data into excel through t.code YR02 the field quantity is not updating. If i checked in asset master data, there i am getting asset quantity 1 for each asset but in YR02 report i am not getting.
    Please help me to resolve this issue.
    Thanks,
    Anjiee
    Edited by: anjiee on Mar 21, 2011 12:47 PM

    Transaction YR02 is in customer namerange and hence it is not a standard functionality of the system .
    Hence whenever you are quoting any queries then you will have to also provide the Y programme that you have created for the purpose .
    I mean to say the coding of the programme to comment further .
    Cheers ,
    Dewang

Maybe you are looking for

  • Re: How to set time to send a SMS automatically

    I am ennoyed by the fact that it's not included the Sony SMS app in my Z3 Dual D6633, but alternative is here. Why would this app need access to Photos/Media/Files? 

  • IPhoto 08 exporting albums

    I have a Mac laptop running 10.5.2 with iPhoto 08 and FCE (express)4.0. I have a plugin called Multifader by CM ImageFlow Fx and am making a 4 minute photomontage. My problem is that I don't know how to set the quality in iPhoto for exporting. For ex

  • ITunes U problem

    When I am trying to open iTunes U the page keeps flicking with Screen shots of the music page etc and the page won't stay on the iTunes U page. It keeps defaulting back to the Other options as music, movies etc. Does anyone know how to resolve this i

  • Smpatch + hotspot error

    Hello - we downloaded and installed the newest sol10 sparc on a v440 - went to patch it and got this. How does one fix? Thank you. # smpatch analyze # An unexpected error has been detected by HotSpot Virtual Machine: # SIGSEGV (0xb) at pc=0xfea28974,

  • My phone is totally jammed!!! Help!

    I added this to another thread but think it needs its own to get recognized. Thanks I'm currently living in NZ and have my iphone with me. I have no phone service but have been using it for music and email and such. I've been keeping it in airplane m