Issue while Updating a table having Unique Secondary Index

Hi,
I am trying to update a 'Z' table in which there are 5 fields comprising of primary key. Out of them 2 key fields are defined as a part of seconadry index with 'Unique' option selected.
As per the requirement, I am trying to update the table using modify statement so whenever this statement occurs it will check the primary keys and accordingly try to m

958572 wrote:
Hi,
We have observed the exception *'JDBC activity timed out while updating the table -Table1"* in our logs in prod environment.
1)we verified the AWR report for that particular time and observed that one update statement was trying to update the table table1.
its a simple update statement as below
UPADTE TABLE1 SET COL1=VAL1,COL2=VAL2 WHERE ID1=VAL1 AND ID2=VAL2;
there is a PK index on ID2 column.
2)we also came to know that there were no locks on TABLE1 during this time.
can some one please let me know what could be the possible reason for this kind of exception?
ThanksOS/Networking mis-configuration.
Oracle does not know or care about the type or flavor of remote client (JDBC, OCI, ODBC, etc).
Oracle's default configuration contains no timeout.
I suspect a FireWall setting.

Similar Messages

  • Trigger Issue while updating same table

    Hi all,
    I am creating one after insert trigger on table tests, which will check, if application id is null, application will be fetched from another table and update the table
    tests table. But this trigger is not updating the application id of the table tests
    CREATE OR REPLACE
    TRIGGER TB_REC_APPL_TESTS1
    AFTER INSERT ON tests FOR EACH ROW
    DECLARE
    v_application_id NUMBER;
    v_rec_appl_tests_id NUMBER;
    v_a_recruit_id NUMBER;
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    v_rec_appl_tests_id := :NEW.rec_appl_tests_id;
    v_a_recruit_id := :NEW.a_recruit_id;
    IF :NEW.a_applic_id IS NULL THEN
    SELECT a_applic_id INTO v_application_id FROM recruit WHERE a_recrut_id = v_a_recruit_id;
    dbms_output.PUT_LINE(v_application_id||'-'||v_rec_appl_tests_id);
    UPDATE tests SET a_applic_id = v_application_id
    WHERE rec_appl_tests_id = v_rec_appl_tests_id;--:NEW.rec_appl_tests_id;
    END IF;
    commit;
    END;
    Thanks in advance,
    Pal

    user546710 wrote:
    Hi all,
    I am creating one after insert trigger on table tests, which will check, if application id is null, application will be fetched from another table and update the table
    tests table. But this trigger is not updating the application id of the table tests
    CREATE OR REPLACE
    TRIGGER TB_REC_APPL_TESTS1
    AFTER INSERT ON tests FOR EACH ROW
    DECLARE
    v_application_id NUMBER;
    v_rec_appl_tests_id NUMBER;
    v_a_recruit_id NUMBER;
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    v_rec_appl_tests_id := :NEW.rec_appl_tests_id;
    v_a_recruit_id := :NEW.a_recruit_id;
    IF :NEW.a_applic_id IS NULL THEN
    SELECT a_applic_id INTO v_application_id FROM recruit WHERE a_recrut_id = v_a_recruit_id;
    dbms_output.PUT_LINE(v_application_id||'-'||v_rec_appl_tests_id);
    UPDATE tests SET a_applic_id = v_application_id
    WHERE rec_appl_tests_id = v_rec_appl_tests_id;--:NEW.rec_appl_tests_id;
    END IF;
    commit;
    END;
    Thanks in advance,
    Palyou are creating triger on the table and updating it. It will not allow to update since you are firing trigger on same table.
    Best practice is to use other table to update or any other operation.

  • Issue while updating field SCHZU (shift Premium) in table view  V_T508A

    Hi All,
    I am facing an issue while updating the field SCHZU(Shift premium) in Table view V_T508A.For some WSR entries when i am trying to update the shift premium say with a value 19400,the value is accepted.However for some other WSR entries,the value for shift premium gets modified to 19.400.Can someone please let me know why this error is occuring and how to rectify the same.
    Regards,
    Punam Jha

    usually its a percentage value. please check what value you enter

  • BDC to update CAT2 transaction.one issue while updating CAT2 transaction

    Good Day Friends,
    i have one issue while updating CAT2 transaction,
    i have enhnced 3 custom fields in CAT2 tx-code. while updating through manually the data is getting stored in CATSDB tx-code for this i have done validation in enhamcement spots ECC 6.0.
    but when i am running bdc this custom field data is not updating in CATSDB table.
    my dout is will  BDC work for enhancement spots or not , also please suggest if you have any idea ?

    Hi,
    Usually I am trying to avoid BDC. So I would try to use BAPIs BAPI_CATIMESHEETMGR_INSERT and BAPI_CATIMESHEETMGR_CHANGE. Similar to other BAPIs, you can pass values for your extended fields using table EXTENSIONIN. It's described in BAPI's documentation or look for EXTENSIONIN on SDN. The principle is same for all BAPIs.
    Regards

  • While updating a table i am getting ORA-00600 error.

    Hi all,
    While updating a table i am getting the following:
    **SQL Error: ORA-00600: internal error code, arguments: [qkebCreateConstantOpn1], [], [], [], [], [], [], [], [], [], [], []**
    **00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"**
    I am not getting how to proceed on this. Please guide me.
    Thanks,
    Ritesh

    While performing some unspecified action (no DML) on an unknown table (no DDL) in an unknown version and edition of the Oracle database you had an untrapped Oracle exceptions.
    There are too many unknowns to help you beyond recommending you open an SR at MyOracleSupport.

  • Exception while updating a table

    Hi
    while updating a table throw entity bean i am getting
    Base EJBException
    java.sql.SQLException: ORA-01401: inserted value too large for column
    how to resolve this problem
    com.sap.engine.services.ejb.exceptions.BaseEJBException: SQLException while the data is being flushed. The persistent object is com.chep.portfolio.da.ejb.admin.UserPreferencesEJBBean4_0Persistent.
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:101)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
         at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:226)
         at com.chep.portfolio.da.ejb.admin.UserPreferencesEJBLocalLocalObjectImpl4_0.setUserProfileId(UserPreferencesEJBLocalLocalObjectImpl4_0.java:614)
         at com.chep.portfolio.admin.business.facade.user.UserFacadeBean.updateUserPreferences(UserFacadeBean.java:774)
         at com.chep.portfolio.admin.business.facade.user.UserFacadeLocalLocalObjectImpl0_0.updateUserPreferences(UserFacadeLocalLocalObjectImpl0_0.java:247)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.sql.SQLException: ORA-01401: inserted value too large for column
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:240)
         at com.chep.portfolio.da.ejb.admin.UserPreferencesEJBBean4_0Persistent.ejb_iUpdate(UserPreferencesEJBBean4_0Persistent.java:552)
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:80)
         ... 33 more
    java.sql.SQLException: ORA-01401: inserted value too large for column
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:240)
         at com.chep.portfolio.da.ejb.admin.UserPreferencesEJBBean4_0Persistent.ejb_iUpdate(UserPreferencesEJBBean4_0Persistent.java:552)
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:80)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
         at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:226)
         at com.chep.portfolio.da.ejb.admin.UserPreferencesEJBLocalLocalObjectImpl4_0.setUserProfileId(UserPreferencesEJBLocalLocalObjectImpl4_0.java:614)
         at com.chep.portfolio.admin.business.facade.user.UserFacadeBean.updateUserPreferences(UserFacadeBean.java:774)
         at com.chep.portfolio.admin.business.facade.user.UserFacadeLocalLocalObjectImpl0_0.updateUserPreferences(UserFacadeLocalLocalObjectImpl0_0.java:247)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    how to solve this one

    Hi, vanaja,
    "inserted value too large for column" - this is the reason for the exception. That is, you are trying to persist a value that exceeds the table column capacity.
    What you can do is reduce the length of the data element you want to update, or, 2) first increase the relevant column maximum length, then try to update the table again.
    If you choose 2), and if you are using the system database, then you can use Java Dictionary and follow [THIS|http://help.sap.com/saphelp_nw70/helpdata/en/fe/53fb40f17af66fe10000000a1550b0/frameset.htm] procedure to increase the maximum length of a column.
    Hope that helps!
    Regards,
    Yordan

  • Issue with Update of Table VARINUM

    Hi,
    I am getting waiting Issues with Update of table VARINUM. Has anybody faced such an issue.
    I have a lot of Jobs which are running in background. I am submitting it through a report. what can be the issue.
    Regards,
    Abhishek jolly

    Thisi is quite old, but not answered properly yet, so there you go:
    SAP generates a new job and temporary variant on report RSDBSPJS, for each HTTP call,which creates database locks on table VARINUM .
    This causes any heavyweight BSP application  to hang and give timeout errors.
    The problem is fixed applying OSS note 1791958, which is not included in any service pack.

  • JDBC activity timed out while updating a table.

    Hi,
    We have observed the exception *'JDBC activity timed out while updating the table -Table1"* in our logs in prod environment.
    1)we verified the AWR report for that particular time and observed that one update statement was trying to update the table table1.
    its a simple update statement as below
    UPADTE TABLE1 SET COL1=VAL1,COL2=VAL2 WHERE ID1=VAL1 AND ID2=VAL2;
    there is a PK index on ID2 column.
    2)we also came to know that there were no locks on TABLE1 during this time.
    can some one please let me know what could be the possible reason for this kind of exception?
    Thanks

    958572 wrote:
    Hi,
    We have observed the exception *'JDBC activity timed out while updating the table -Table1"* in our logs in prod environment.
    1)we verified the AWR report for that particular time and observed that one update statement was trying to update the table table1.
    its a simple update statement as below
    UPADTE TABLE1 SET COL1=VAL1,COL2=VAL2 WHERE ID1=VAL1 AND ID2=VAL2;
    there is a PK index on ID2 column.
    2)we also came to know that there were no locks on TABLE1 during this time.
    can some one please let me know what could be the possible reason for this kind of exception?
    ThanksOS/Networking mis-configuration.
    Oracle does not know or care about the type or flavor of remote client (JDBC, OCI, ODBC, etc).
    Oracle's default configuration contains no timeout.
    I suspect a FireWall setting.

  • Error while updating JDBD table

    Hi all,
    Am getting the error at the receiver JDBC CC. I have checked the conceren mapping also . i t is working under test tab.
    Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAP_STG_AP_SAP_REF' (structure 'Statement'): com.sybase.jdbc3.jdbc.SybSQLException: Attempt to insert duplicate key row in object 'SAP_STG_AP_SAP_REF' with unique index 'SAP_STG_AP_SAP_REF_IX1'
    Any sugestion?
    Thanks,
    kanan

    ya issue is while updating the jdbc table ..duplicate entries are coming...I have check the maping xml also with the same data..I think I need to change the mapping -to remove the duplicate (entry in that field) using some function. Any idea which will be the function?? + please let me know how to find out which field is the error refering to in the jdbc table-- with unique index 'SAP_STG_AP_SAP_REF_IX1'
    In my scenario Action is INSERT. At the mapping output, there are some entries (5-6 ACCESS) where all the fields under the ACCESS are similar
    kanan

  • Issue with updating partitioned table

    Hi,
    Anyone seen this bug with updating partitioned tables.
    Its very esoteric - its occurs when we update a partitioned table using a join to a temp table (not non-temp table) when the join has multiple joins and you're updating the partitoned column that isn't the first column in the primary key and the table contains a bit field. We've tried changing just one of these features and the bug disappears.
    We've tested this on 15.5 and 15.7 SP122 and the error occurs in both of them.
    Here's the test case - it does the same operation of a partitioned table and a non-partitioned table, but the partitioned table shows and error of "Attempt to insert duplicate key row in object 'partitioned' with unique index 'pk'".
    I'd be interested if anyone has seen this and has a version of Sybase without the issue.
    Unfortunately when it happens on a replicated table - it takes down rep server.
    CREATE TABLE #table1
        (   PK          char(8) null,
            FileDate        date,
            changed         bit
    CREATE TABLE partitioned  (
      PK         char(8) NOT NULL,
      ValidFrom     date DEFAULT current_date() NOT NULL,
      ValidTo       date DEFAULT '31-Dec-9999' NOT NULL
    LOCK DATAROWS
      PARTITION BY RANGE (ValidTo)
      ( p2014 VALUES <= ('20141231') ON [default],
      p2015 VALUES <= ('20151231') ON [default],
      pMAX VALUES <= (MAX) ON [default]
    CREATE UNIQUE CLUSTERED INDEX pk
      ON partitioned(PK, ValidFrom, ValidTo)
      LOCAL INDEX
    CREATE TABLE unpartitioned  (
      PK         char(8) NOT NULL,
      ValidFrom     date DEFAULT current_date() NOT NULL,
      ValidTo       date DEFAULT '31-Dec-9999' NOT NULL,
    LOCK DATAROWS
    CREATE UNIQUE CLUSTERED INDEX pk
      ON unpartitioned(PK, ValidFrom, ValidTo)
    insert partitioned
    select "ET00jPzh", "Jan  7 2015", "Dec 31 9999"
    insert unpartitioned
    select "ET00jPzh", "Jan  7 2015", "Dec 31 9999"
    insert #table1
    select "ET00jPzh", "Jan 15 2015", 1
    union all
    select "ET00jPzh", "Jan 15 2015", 1
    go
    update partitioned
    set    ValidTo = dateadd(dd,-1,FileDate)
    from   #table1 t
    inner  join partitioned p on (p.PK = t.PK)
    where  p.ValidTo = '99991231'
    and    t.changed = 1
    go
    update unpartitioned
    set    ValidTo = dateadd(dd,-1,FileDate)
    from   #table1 t
    inner  join unpartitioned u on (u.PK = t.PK)
    where  u.ValidTo = '99991231'
    and    t.changed = 1
    go
    drop table #table1
    go
    drop table partitioned
    drop table unpartitioned
    go

    wrt to replication - it is a bit unclear as not enough information has been stated to point out what happened.  I also am not sure that your DBA's are accurately telling you what happened - and may have made the problem worse by not knowing themselves what to do - e.g. 'losing' the log points to fact that someone doesn't know what they should.   You can *always* disable the replication secondary truncation point and resync a standby system, so claims about 'losing' the log are a bit strange to be making. 
    wrt to ASE versions, I suspect if there are any differences, it may have to do with endian-ness and not the version of ASE itself.   There may be other factors.....but I would suggest the best thing would be to open a separate message/case on it.
    Adaptive Server Enterprise/15.7/EBF 23010 SMP SP130 /P/X64/Windows Server/ase157sp13x/3819/64-bit/OPT/Fri Aug 22 22:28:21 2014:
    -- testing with tinyint
    1> use demo_db
    1>
    2> CREATE TABLE #table1
    3>     (   PK          char(8) null,
    4>         FileDate        date,
    5> --        changed         bit
    6>  changed tinyint
    7>     )
    8>
    9> CREATE TABLE partitioned  (
    10>   PK         char(8) NOT NULL,
    11>   ValidFrom     date DEFAULT current_date() NOT NULL,
    12>   ValidTo       date DEFAULT '31-Dec-9999' NOT NULL
    13>   )
    14>
    15> LOCK DATAROWS
    16>   PARTITION BY RANGE (ValidTo)
    17>   ( p2014 VALUES <= ('20141231') ON [default],
    18>   p2015 VALUES <= ('20151231') ON [default],
    19>   pMAX VALUES <= (MAX) ON [default]
    20>         )
    21>
    22> CREATE UNIQUE CLUSTERED INDEX pk
    23>   ON partitioned(PK, ValidFrom, ValidTo)
    24>   LOCAL INDEX
    25>
    26> CREATE TABLE unpartitioned  (
    27>   PK         char(8) NOT NULL,
    28>   ValidFrom     date DEFAULT current_date() NOT NULL,
    29>   ValidTo       date DEFAULT '31-Dec-9999' NOT NULL,
    30>   )
    31> LOCK DATAROWS
    32>
    33> CREATE UNIQUE CLUSTERED INDEX pk
    34>   ON unpartitioned(PK, ValidFrom, ValidTo)
    35>
    36> insert partitioned
    37> select "ET00jPzh", "Jan  7 2015", "Dec 31 9999"
    38>
    39> insert unpartitioned
    40> select "ET00jPzh", "Jan  7 2015", "Dec 31 9999"
    41>
    42> insert #table1
    43> select "ET00jPzh", "Jan 15 2015", 1
    44> union all
    45> select "ET00jPzh", "Jan 15 2015", 1
    (1 row affected)
    (1 row affected)
    (2 rows affected)
    1>
    2> update partitioned
    3> set    ValidTo = dateadd(dd,-1,FileDate)
    4> from   #table1 t
    5> inner  join partitioned p on (p.PK = t.PK)
    6> where  p.ValidTo = '99991231'
    7> and    t.changed = 1
    Msg 2601, Level 14, State 6:
    Server 'PHILLY_ASE', Line 2:
    Attempt to insert duplicate key row in object 'partitioned' with unique index 'pk'
    Command has been aborted.
    (0 rows affected)
    1>
    2> update unpartitioned
    3> set    ValidTo = dateadd(dd,-1,FileDate)
    4> from   #table1 t
    5> inner  join unpartitioned u on (u.PK = t.PK)
    6> where  u.ValidTo = '99991231'
    7> and    t.changed = 1
    (1 row affected)
    1>
    2> drop table #table1
    1>
    2> drop table partitioned
    3> drop table unpartitioned
    -- duplicating with 'int'
    1> use demo_db
    1>
    2> CREATE TABLE #table1
    3>     (   PK          char(8) null,
    4>         FileDate        date,
    5> --        changed         bit
    6>  changed int
    7>     )
    8>
    9> CREATE TABLE partitioned  (
    10>   PK         char(8) NOT NULL,
    11>   ValidFrom     date DEFAULT current_date() NOT NULL,
    12>   ValidTo       date DEFAULT '31-Dec-9999' NOT NULL
    13>   )
    14>
    15> LOCK DATAROWS
    16>   PARTITION BY RANGE (ValidTo)
    17>   ( p2014 VALUES <= ('20141231') ON [default],
    18>   p2015 VALUES <= ('20151231') ON [default],
    19>   pMAX VALUES <= (MAX) ON [default]
    20>         )
    21>
    22> CREATE UNIQUE CLUSTERED INDEX pk
    23>   ON partitioned(PK, ValidFrom, ValidTo)
    24>   LOCAL INDEX
    25>
    26> CREATE TABLE unpartitioned  (
    27>   PK         char(8) NOT NULL,
    28>   ValidFrom     date DEFAULT current_date() NOT NULL,
    29>   ValidTo       date DEFAULT '31-Dec-9999' NOT NULL,
    30>   )
    31> LOCK DATAROWS
    32>
    33> CREATE UNIQUE CLUSTERED INDEX pk
    34>   ON unpartitioned(PK, ValidFrom, ValidTo)
    35>
    36> insert partitioned
    37> select "ET00jPzh", "Jan  7 2015", "Dec 31 9999"
    38>
    39> insert unpartitioned
    40> select "ET00jPzh", "Jan  7 2015", "Dec 31 9999"
    41>
    42> insert #table1
    43> select "ET00jPzh", "Jan 15 2015", 1
    44> union all
    45> select "ET00jPzh", "Jan 15 2015", 1
    (1 row affected)
    (1 row affected)
    (2 rows affected)
    1>
    2> update partitioned
    3> set    ValidTo = dateadd(dd,-1,FileDate)
    4> from   #table1 t
    5> inner  join partitioned p on (p.PK = t.PK)
    6> where  p.ValidTo = '99991231'
    7> and    t.changed = 1
    Msg 2601, Level 14, State 6:
    Server 'PHILLY_ASE', Line 2:
    Attempt to insert duplicate key row in object 'partitioned' with unique index 'pk'
    Command has been aborted.
    (0 rows affected)
    1>
    2> update unpartitioned
    3> set    ValidTo = dateadd(dd,-1,FileDate)
    4> from   #table1 t
    5> inner  join unpartitioned u on (u.PK = t.PK)
    6> where  u.ValidTo = '99991231'
    7> and    t.changed = 1
    (1 row affected)
    1>
    2> drop table #table1
    1>
    2> drop table partitioned
    3> drop table unpartitioned

  • Reg : BDC issue while updating infotype 40 inside BADI class method

    Hi Friends,
         Actually in my badi class, there is a method where i need to save the infotype fields including comment fields.. So with BDC recording i recorded screen fields and passing the pernr internal table values to recorded pernr values.. by doing this im getting error and so BDC is not upadting the data.. moreover if i pass directly pernr number within single quotes, BDC is working fine and data is getting updated..
    bdc_field        'RP50G-PERNR'   pernr.  --> Error Message while calling transaction through BDC
    bdc_field        'RP50G-PERNR'   '00001234'  ---> updating successfully..
    1. Tell me whether the issue is with BADI or wat ? means we cant able to use BDC inside badi ?
    2. I also tried changing my internal table value of pernr to type 'C' of length 8.. eventhough its showing error..
    Please tell me what i need to do .... ?

    Hi  Dilek Ersoz Adak ,
      I also tried with that, but getting same error..  Below is my error im getting while updating BDC through call transaction,
    1     PA30     SAPMP50A     1000     E     K     PBAS_SERVICE     001     HRADMIN     EPPRELE 00000121     HRAdministrator          CTU     RP50G-PERNR
              Person is treated already by the HR Administrator

  • Issues while joining two tables as the joining column has duplicate values - Please help!

    Hi,
    I have a table A -which has few columns including a Amount column - I am joining this table A to Table B. The joining column in B has duplicates.  So, the number of records are getting more after the joining. As per the requirment when I create a table
    after joining the tables and count the salary clumn, there is a difference in the counting. How can I solve this? Can you please help me?
    Here is the DDL and sample values
    create table #student (sid int, name varchar(10),salary int)
    create table [#address] (sid int, city varchar(10),grade char(1),lineneumber int)
    insert into #student values (1,'sachin',8000)
    insert into #student values (2,'Dhoni',2000)
    insert into #student values (3,'Ganguly',7000)
    insert into #student values (4,'Kohli',1000)
    insert into [#address] values(1,'mumbai','A',1)
    insert into [#address] values(1,'mumbai','B',2)
    insert into [#address] values(1,'mumbai','C',3)
    insert into [#address] values(1,'mumbai','D',4)
    insert into [#address] values(2,'JARKHAND','D',3)
    insert into [#address] values(2,'JARKHAND','D',4)
    SELECT S.SID,NAME,salary,CITY ,grade,linenumber
    into #FINAL
    FROM #STUDENT S
    LEFT JOIN #ADDRESS A
    ON S.SID=A.SID
    SELECT SUM(salary) FROM #FINAL
    --44000
    Final result should be 18000 , but it is coming as 44000. can you please help me to get the correct result - what do i do in the joining?
    In my real project, i have 5 tables joining, each table have more than 30 columns and few joining tables joining column have duplicates. I have simplified the issue so that i can ask the question clearly. So,while answering, please consider that also in mind.
    thanks in advance for your help!

    SELECT S.SID,NAME,salary,CITY 
    into #FINAL
    FROM #STUDENT S
    LEFT JOIN (SELECT DISTINCT sid,city
    FROM #Address) A
    ON S.SID=A.SIDthis will do a join on student table and city table with unique sid and city name so adddress selection will be sid city1 mumbai2 jarkand

  • Issue while updating(Changing) quantity on line at quick sales order form

    Hi,
    I am facing a issue while changing quantity ordered on the order line in quick sales order form. (R12.1.3)
    Although the same logic works exactly as required in 11.5.9.
    There is a custom logic, post booking line status is Awaiting Shipping.
    Now when quantity is changed +(Saved), the status changes to a custom state but at the same time a new row is created with the same line id but different reservation id in the MTL_RESERVATIONS.
    The quantity here is the difference between the original quantity and the new entered quantity.
    And post completion of the custom logic the original row is updated, but being there a additional row the quantity reserved at the shipping tab comes wrong.
    Our requirement is of update which is happening but not the additional insert which is going into MTL_RESERVATIONS.
    The logic is perfect in 11.5.9 and no additional insert is being made.
    Kindly help and give some ideas for the possible reason the issue.
    Please ask for more information if required.
    Thanks,
    Vishal

    Hi Mahendra,
    I have gone through the note id that you have given. sorry to say that, that is refering to diffrent issue.
    Actually what i did is, At form header level, I have hide the fileds using the folder options. once after changes I have closed the form and re-opened it. by that time I can see that Button names got changed in bottom of the "Quick sales order form". Not sure how it become changed. there five buttons over the form, only two button names got changed.
    Kindly suggest any other options.

  • Error while updating DBDIFFVIEW table

    Hi,
    When we are doing new entries into the table: DBDIFFVIEW, the error:
    " Fill table key for table DBDIFFINFO only up to position 040 only  " is coming.
    Since updating the table at DB level directly is not advisable, please advise to correct the above error.
    Thanks & Regards,
    DVRK

    Hi All,
    The entries are maintained from DB level.
    Thanks for the help.
    DVRK

  • Issue while updating

    I have a table which has a column containing text with multiple lines.while i am trying to update that column i am facing the issue
    "Dear User,
    Enclosed is the attachment.
    Please direct problems at 209876534 or
    [email protected]
    Regards,
    Developement team"
    update t1 set c1="Dear User,
    Enclosed is the attachment.
    Please direct problems at 209876534 or
    [email protected]
    Regards,
    New developer group"
    Above update statement is not working.
    Looking for your help
    Thanks

    user518809 wrote:
    I have a table which has a column containing text with multiple lines.while i am trying to update that column i am facing the issueWhat is the column type? If varchar2, then only 4000 bytes worth of characters can be stored in it.
    Also, it is crititcal! to performance that you use bind variables. Do not use literal values in SQL! That is the #1 reason for poor Oracle performance.
    This is what your client software should be doing (using SQL*Plus) to demonstrate.
    Step 1 . Create a bind variable:
    SQL> var colValue varchar2(4000)Step 2. Assign a value to the bind variable:
    SQL> exec :colValue := '...<your string of text comes here>..';Step 3. Execute the SQL using that bind variable:
    SQL> update t1 set c1 := :colValue;Of course, the update statement will update all rows in the table. So you likely need to add a predicate (using a bind variable) to specify which specific row you want to update.
    And note that this is the correct way to do it. Not using bind variables is the wrong way to do it.

Maybe you are looking for