Update of table with invalid identifiers

Hello!

I use a third-party plug-in and that comparisons of chemical structures. I want to update a table with the values of the other when the plugin matches two rows. However, I'm a problem invalid identifier.

Two tables:
PLATES: a VARCHAR2 columns of PLATE_SMILES, IN_DB
INVEST: a VARCHAR2 columns of SMILES

The operator is a binary: jc_compare (PLATE_SMILES, SMILES) = 1 (or 0 if they do not match)

I want my query to say: "If comparison SMILES, PLATE_SMILES = 1, define IN_DB = 1 for row" - effectively asking if PLATE_SMILES exists in the table INVEST.

I tried a number of "renditions", all identifiers not valid donations. Here is an example:

Update (select plate. PLATE_SMILES, plate. IN_DB, invest. SMILES
plate PLATES
INVEST invest
WHERE jc_compare (PLATE_SMILES, SMILES) = 1)
set plate. IN_DB = 1;


ORA-00904: "FLAT". "" IN_DB ": invalid identifier


I hope that this should be an easy fix, and any help is greatly appreciated!

Hello

You have

UPDATE (SELECT plate.plate_smiles,
               plate.in_db,
               invest.smiles
        FROM   plates plate, invest invest
        WHERE  jc_compare ( plate_smiles, smiles) = 1)
SET    plate.in_db = 1;   -- Error here

PLATE is not known outside the display online. Just remove it.

Concerning
Peter

Tags: Database

Similar Questions

  • Best way to update a table with separate values

    Hi, I would really appreciate some advise:

    I need to regularly perform a task where I update 1 table with all the new data that has been entered in another table. I cannot perform a complete insert because this will create data duplicated each time it works, so the only way I can think of is the use of cursors in the script below:


    CREATE OR REPLACE PROCEDURE update_new_mem IS
    tmpVar NUMBER;

    CURSOR c_mem IS
    SELECT nom_membre, member_id
    OF gym.members;
    CREC c_mem % ROWTYPE;


    BEGIN
    OPEN c_mem.
    LOOP
    SEEK c_mem INTO crec;
    EXIT WHEN c_mem % NOTFOUND;
    BEGIN
    UPDATE gym.lifts
    Name = crec.member_name
    WHERE member_id = crec.member_id;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN NULL;
    END;
    IF SQL % NOTFOUND THEN
    BEGIN
    INSERT INTO gym.lifts
    (name, member_id)
    VALUES (crec.member_name, crec.member_id);
    END;
    END IF;
    END LOOP;
    CLOSE C_mem;

    END update_new_mem;



    This method works, but y at - it a (faster) easier way to update another table with new data only?

    Thank you very much

    >
    This method works, but y at - it a (faster) easier way to update another table with new data only?
    >
    Almost anything would be better than this treatment of slow-by-slow loop.

    You don't need a procedure, you should just use MERGE for this. See the examples in the section of the MERGER of the doc of the SQL language
    http://docs.Oracle.com/CD/B28359_01/server.111/b28286/statements_9016.htm

    MERGE INTO bonuses D
       USING (SELECT employee_id, salary, department_id FROM employees
       WHERE department_id = 80) S
       ON (D.employee_id = S.employee_id)
       WHEN MATCHED THEN UPDATE SET D.bonus = D.bonus + S.salary*.01
         DELETE WHERE (S.salary > 8000)
       WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)
         VALUES (S.employee_id, S.salary*.01)
         WHERE (S.salary <= 8000);
    
  • Update of table with 14 million records

    good day, I'm updating a table with 14 million documents column. using the data from another table.
    This takes terrible time just updated to 500,000 over the weekend, which is unacceptable.
    ideas to improve my code and get the fastest update is much appreciated.

    DECLARE
    TYPE vc_type is table of index varchar2 (20) by pls_integer;
    type tabtype_rowid is table of pls_integer rowid indexes;
    my_cur sys_refcursor;
    cur_limit integer: = 10000;

    tab_rowid tabtype_rowid;

    Start
    OPEN FOR My_cur
    SELECT value, rowid
    TABLE 1A

    where the value IS NOT NULL
    and id is null;


    loop
    collect the fetch my_cur in bulk in tab_value, cur_limit limit tab_rowid;

    FORALL k IN 1.tab_npi.count

    UPDATE table 1A
    A.ID = (select id SET
    in Table 2b
    where value = tab_value (k)
    and rownum = 1
    )
    WHERE a.rowid = tab_rowid (k);

    COMMIT;

    When the output tab_value.count < cur_limit;.
    end loop;

    END;


    Thank you

    903537 wrote:
    I tried to update basic training, as a first step and it crashed...

    He didn't fail, it failed.

  • Update of table with no column

    Hello

    Why oracle is that although the statement is incorrect? is there any docid for this?

    SQL > select banner version of v$.

    BANNER
    ----------------------------------------------------------------
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production
    PL/SQL Release 9.2.0.8.0 - Production
    CORE Production 9.2.0.8.0
    AMT for Solaris: 9.2.0.8.0 - Production Version
    NLSRTL Version 9.2.0.8.0 - Production


    SQL > desc one
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    AA NUMBER (1)
    BB NUMBER (1)

    SQL > desc b
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    AA NUMBER (1)
    CC NUMBER (1)

    SQL > select * from a;

    AA BB
    ---------- ----------
    1 1
    2 2
    3 3
    4 4
    3 s

    SQL > select b bb;
    Select bb b
    *
    ERROR on line 1:
    ORA-00904: "BB": invalid identifier


    SQL > update a game aa = 3 where bb (select b BB); -> bb of the column does not exist in table b

    5 lines to date.

    SQL > select * from a;

    AA BB
    ---------- ----------
    1 of 3
    1 p
    3 3
    3 4
    6 P

    Thank you
    Shanker

    No specific document. He has correlated subqueries. There is, of course, usually join condition.

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_10002.htm#i2066912

  • update of table with similar registration information using the same key

    Version: 11.1.0.7.0

    We have large table probably 30 M records

    -test code table follows

    create table people)

    person_id number,

    first name varchar2 (50).

    middle_name varchar2 (50).

    last_name varchar2 (50)

    );

    insert into persons (person_id, first_name, last_name, middle_name) values (1, 'JOHN', 'A', 'DOE');

    insert into people (person_id, first_name, last_name, middle_name) values (1, 'JOHN', ","DOE");

    insert into persons (person_id, first_name, last_name, middle_name) values (1, 'JOHN', 'ADAM', 'DOE');

    insert into persons (person_id, first_name, last_name, middle_name) values (2, 'JOHN', ' C ', 'DOE');

    insert into people (person_id, first_name, last_name, middle_name) values (2, 'JOHN', ","DOE");

    insert into people (person_id, first_name, last_name, middle_name) values (3, 'JOHN', ","MOE");

    insert into persons (person_id, first_name, last_name, middle_name) values (3, 'JOHN', 'FRANK', 'MOE');

    I am trying to write more efficient code to take the middle name of the most complete and updated all records with the same KEY (person_id) with her.

    Expected result:

    1, JOHN, ADAM, DOE

    1, JOHN, ADAM, DOE

    1, JOHN, ADAM, DOE

    2, JOHN, C., DOE

    2, JOHN, C., DOE

    3, JOHN, FRANK, MOE

    3, JOHN, FRANK, MOE

    Hello

    Here is an example of the use of the aggregate LAST instead of the function ROW_NUMBER analytic function:

    MERGE INTO dst people

    WITH THE HELP OF)

    WITH got_longest_middle_name AS

    (

    SELECT person_id

    , MIN (middle_name) DUNGEON (DENSE_RANK LAST ORDER OF LENGTH (REPLACE (middle_name, '.')))

    AS longest_middle_name

    AMONG the people

    WHERE middle_name IS NOT NULL

    GROUP BY person_id

    )

    SELECT person_id

    longest_middle_name

    Got_longest_middle_name c - c is for candidates

    WHERE DOES NOT EXIST)

    SELECT 1

    AMONG the people

    WHERE person_id = c.person_id

    AND c.longest_middle_name NOT AS REPLACE (middle_name, '.'). '%'

    )

    )             src

    WE (dst.person_id = src.person_id)

    WHEN MATCHED THEN UPDATE

    SET dst.middle_name = src.longest_middle_name

    WHERE dst.middle_name <> src.longest_middle_name

    OR dst.middle_name IS NULL

    ;

    I suspect that this may be a little faster, but try it on your system with your data to make sure.

  • Update a table with one column of another

    Oracle 11g
    Hello

    i'im trying to update the two columns of table SUPPORT (SUPPORT_X, SUPPORT_Y) with two columns of table POST_HTA_BT (POSTHTABT_GPS_X, POSTHTABT_GPS_Y)

    Understand that the two tables have the colum below:

    SUPPORT (SUPPORT_ID, SUPPORT_PLAQUE, POSTHTABT_ID, SUPPORT_X, SUPPORT_Y,...)

    POST_HTA_BT (POSTHTABT_ID, POSTHTABT_GPS_X, POSTHTABT_GPS_Y,...)

    The SUPPORT_PLAQUE has type varachar. Except the keys, the other columns are varchar type in both tables.

    The point here is to update the support_x, support_y with posthtabt_gps_x and posthtabt_gps_y.But before the update we have Sheik if the fifth number of the support plate is a number of characters from "0" to "9"and the rest of the caracter of the support_plaque is '00000'

    Please note that the support_plaque is stored in the table with the form: "0025800000!"

    So I did the below script, I try to execute in sql develop.

    SET SERVEROUTPUT ON

    DECLARE
    chiffre_liste varchar (200): = '0 ', '1', '2', '3', '4', ' 5 ', ' 6' ', 7', ' 8 ', ' 9';
    CURSOR CUR_GPS_SUPPORT IS
    Select MEDIA. SUPPORT_X, SUPPORT. SUPPORT_Y, POSTE_HTA_BT. POSTHTABT_ID, SUPPORT. EXPL_ID,
    SUPPORTED. SUPPORT_PLAQUE, POSTHTABT_GPS_X, POSTHTABT_GPS_Y
    support,.
    POSTE_HTA_BT
    where
    SUPPORTED. SUPPORT_X IS NULL and
    SUPPORTED. SUPPORT_Y IS NULL and
    SUPPORTED. POSTHTABT_ID = POSTE_HTA_BT. POSTHTABT_ID and
    SUPPORTED. EXPL_ID = POSTE_HTA_BT. EXPL_ID
    Order of SUPPORT. POSTHTABT_ID;

    w_POSTHTABT_ID POSTE_HTA_BT. Type of POSTHTABT_ID %;
    w_SUPPORT_X SUPPORT. TYPE % SUPPORT_X;
    w_SUPPORT_Y SUPPORT. TYPE % SUPPORT_Y;
    w_EXPL_ID SUPPORT. TYPE % EXPL_ID;
    w_SUPPORT_PLAQUE SUPPORT. TYPE % SUPPORT_PLAQUE;
    w_POSTHTABT_GPS_X POSTE_HTA_BT. TYPE % POSTHTABT_GPS_X;
    w_POSTHTABT_GPS_Y POSTE_HTA_BT. TYPE % POSTHTABT_GPS_Y;

    BEGIN
    DBMS_OUTPUT. Put_line ('loading the coordoonnees GPS - GPS Coord update takes care of starting ');

    FOR HEART LOOPING CUR_GPS_SUPPORT

    w_POSTHTABT_ID: = cur. POSTHTABT_ID;
    w_SUPPORT_PLAQUE: = cur. SUPPORT_PLAQUE;
    w_SUPPORT_X: = cur. SUPPORT_X;
    w_SUPPORT_Y: = cur. SUPPORT_Y;
    w_POSTHTABT_GPS_X: = cur. POSTHTABT_GPS_X;
    w_POSTHTABT_GPS_Y: = cur. POSTHTABT_GPS_X;

    If substr (cur.support_plaque, 5, 1 chiffre_liste) and substr (cur.support_plaque, 6, 5) = '00000'
    w_SUPPORT_X: = CUR. POSTHTABT_GPS_X
    w_SUPPORT_Y: = CUR. POSTHTABT_GPS_Y
    END if;
    EXCEPTION WHEN NO_DATA_FOUND THEN w_SUPPORT_X: = NULL and w_SUPPORT_Y: = NULL;
    END;

    -Updated the table of the supports
    Update SUPPORT
    Set SUPPORT_X = w_SUPPORT_X,
    SUPPORT_Y = w_SUPPORT_Y
    where SUPPORT_PLAQUE = w_SUPPORT_PLAQUE;
    -On valid imm? immediately
    commit;
    EXCEPTION when no_data_found then null;
    -No details found
    END;

    END;
    /

    and I got the following errors:

    Error report:
    ORA-06550: line 2, colum 34:
    PLS-00103: symbol ',' met instead of one of the following symbols:

    * & = - + ; <>/ is mod remains not rem
    <>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
    like4 likec between | submultiset of type multiset Member
    ORA-06550: line 2, column 52:
    PLS-00103: symbol ';' met instead of one of the following symbols:

    ), * & = - + <>/ is mod remains not rem = >
    <>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
    like4 likec between | Member of multiset must
    ORA-06550: line 38, colum 48:
    PLS-00103: symbol 'CHIFFRE_LISTE' met instead of one of the following symbols:

    (
    Symbol "(" a été substitué à "CHIFFRE_LISTE" verser continuer.) "
    ORA-06550: line 39, 12 colum:
    PLS-00103: symbol 'W_SUPPORT_X' met instead of one of the following symbols:

    ), * & -+ / at rem mod < Hurst (*) > rest and or.
    multiset
    ORA-06550: line 40, 12 colum:
    PLS-00103: symbol 'W_SUPPORT_Y' met instead of one of the following symbols:

    . (), * @ % & = - + <>/ is mod remains not rem
    <>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
    like4 likec between | mult
    ORA-06550: line 41, colum 9:
    PLS-00103: symbol 'END' met instead of one of the following symbols:

    . (), * @ % & = - + <>/ is mod remains not rem
    <>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
    like4 likec between | multiset members
    06550 00000 - "line %s, column % s:\n%s".
    * Cause: Usually a PL/SQL compilation error.
    * Action:

    I checked the line number, but do not see the error in my code.

    Please could you help me?

    peace

    Hello

    glad to know that it worked. In fact, I don't see the reason to make these complicated processes.

    Remember the mantra:

    • If you can do it with SQL then do it with SQL

    Good evening!

    Alberto

  • How to update the table with the number management

    Hello

    I need as there is a loc_tab of the created table as below,

    CREATE TABLE loc_tab
    (
    Country_ID NUMBER,
    country_code VARCHAR2 (3),
    country_name VARCHAR2 (50).
    State_ID NUMBER,
    state_code VARCHAR2 (3),
    state_name VARCHAR2 (50).
    city_id NUMBER,
    city_code VARCHAR2 (3),
    city_name VARCHAR2 (50)
    );

    I inserted records like below,
    COUNTRY_ID     COUNTRY_CODE     COUNTRY_NAME     STATE_ID     STATE_CODE     STATE_NAME     CITY_ID     CITY_CODE     CITY_NAME
    
              IND          INDIA                    TN          TAMIL NADU          CHN          CHENNAI
              IND          INDIA                    TN          TAMIL NADU          TRI          TRICHY
              IND          INDIA                    TN          TAMIL NADU          CMT          COIMBATORE
              IND          INDIA                    TN          TAMIL NADU          MDU          MADURAI
              IND          INDIA                    AP          ANDHRA PRADESH          HYD          HYDERABAD
              IND          INDIA                    AP          ANDHRA PRADESH          SEC          SECUNDRABAD
              AUS          AUSTRALIA               QLD          QUEENSLAND          BRI          BRISBANE
              AUS          AUSTRALIA               TAS          TASMANIA          HB          HOBART
              AUS          AUSTRALIA               TAS          TASMANIA          CCE          CITY OF CLEARANCE
              AUS          AUSTRALIA               TAS          TASMANIA          BUR          BURNIE
    Now, I wanted to update the table such that all ID columns are updated with running number.

    Each ID columns should get incremented so that, for Country_ID column corresponding to "India" If country_id is 1, that there must be one for all the lines with the name as "India". Likewise for "Australia".

    In the case of State, she also has the same logic with numbers repeated until the very name of the State comes.

    For the city, it of course will hold separate ID only because the name of the city will not get duplicated.

    This update must be done in the normal way using simple SQL such as no PLSQL don't like looping, etc... is involved.

    Here are the contents of the table, and that's how the table should be updated,
    COUNTRY_ID     COUNTRY_CODE     COUNTRY_NAME     STATE_ID     STATE_CODE     STATE_NAME     CITY_ID     CITY_CODE     CITY_NAME
                                            
    1          IND          INDIA          1          TN          TAMIL NADU     1     CHN          CHENNAI
    1          IND          INDIA          1          TN          TAMIL NADU     2     TRI          TRICHY
    1          IND          INDIA          1          TN          TAMIL NADU     3     CMT          COIMBATORE
    1          IND          INDIA          1          TN          TAMIL NADU     4     MDU          MADURAI
    1          IND          INDIA          2          AP          ANDHRA PRADESH     1     HYD          HYDERABAD
    1          IND          INDIA          2          AP          ANDHRA PRADESH     2     SEC          SECUNDRABAD
    2          AUS          AUSTRALIA     1          QLD          QUEENSLAND     1     BRI          BRISBANE
    2          AUS          AUSTRALIA     2          TAS          TASMANIA     1     HB          HOBART
    2          AUS          AUSTRALIA     2          TAS          TASMANIA     2     CCE          CITY OF CLEARANCE
    2          AUS          AUSTRALIA     2          TAS          TASMANIA     3     BUR          BURNIE
    Thank you and best regards,
    Shiva
  • move the lob segment fails with invalid identifier

    Why this fails:

    SQL > desc APPLSYS. WF_INBOUND_TABLE
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    Q_NAME VARCHAR2 (30)
    MSGID NOT NULL RAW (16)
    CORRID'ART VARCHAR2 (128)
    PRIORITY NUMBER
    NUMBER OF THE STATE
    TIMESTAMP DELAY (6)
    NUMBER OF EXPIRY
    TIME_MANAGER_INFO TIMESTAMP (6)
    NUMBER OF LOCAL_ORDER_NO
    NUMBER OF CHAIN_NO
    NUMBER OF THE CSCN
    DSCN NUMBER
    ENQ_TIME TIMESTAMP (6)
    NUMBER OF ENQ_UID
    ENQ_TID VARCHAR2 (30)
    DEQ_TIME TIMESTAMP (6)
    NUMBER OF DEQ_UID
    DEQ_TID VARCHAR2 (30)
    NUMBER OF RETRY_COUNT
    EXCEPTION_QSCHEMA VARCHAR2 (30)
    EXCEPTION_QUEUE VARCHAR2 (30)
    NUMBER OF STEP_NO
    NUMBER OF RECIPIENT_KEY
    DEQUEUE_MSGID RAW (16)
    USER_DATA SYSTEM. WF_PAYLOAD_T
    SENDER_NAME VARCHAR2 (30)
    SENDER_ADDRESS VARCHAR2 (1024)
    NUMBER OF SENDER_PROTOCOL
    ANYDATA USER_PROP


    SQL > alter table APPLSYS. WF_INBOUND_TABLE move TABLESPACE APPS_TS_TX_DATA;

    Modified table.

    SQL > ALTER TABLE APPLSYS. WF_INBOUND_TABLE MOVE LOB (USER_PROP) STORE DID (TABLESPACE APPS_TS_TX_DATA);
    *
    ERROR on line 1:
    ORA-00904: "USER_PROP": invalid identifier

    user600570 wrote:
    Well, no matter what the type is be, how to move to this segment?

    The segment does not move when the corresponding table is moved to new tablespace?
    At least that's what I see.

    SQL> select * from v$version ;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE     10.2.0.4.0     Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    
    SQL> create table t nologging as select * from applsys.wf_inbound_table where 1 = 2 ;
    
    Table created.
    
    SQL> select dbms_metadata.get_ddl('TABLE','T') from dual ;
    
    DBMS_METADATA.GET_DDL('TABLE','T')
    --------------------------------------------------------------------------------
    
      CREATE TABLE "APPS"."T"
       (     "Q_NAME" VARCHAR2(30),
         "MSGID" RAW(16),
         "CORRID" VARCHAR2(128),
         "PRIORITY" NUMBER,
         "STATE" NUMBER,
         "DELAY" TIMESTAMP (6),
         "EXPIRATION" NUMBER,
         "TIME_MANAGER_INFO" TIMESTAMP (6),
         "LOCAL_ORDER_NO" NUMBER,
         "CHAIN_NO" NUMBER,
         "CSCN" NUMBER,
         "DSCN" NUMBER,
         "ENQ_TIME" TIMESTAMP (6),
         "ENQ_UID" NUMBER,
         "ENQ_TID" VARCHAR2(30),
         "DEQ_TIME" TIMESTAMP (6),
         "DEQ_UID" NUMBER,
         "DEQ_TID" VARCHAR2(30),
         "RETRY_COUNT" NUMBER,
         "EXCEPTION_QSCHEMA" VARCHAR2(30),
         "EXCEPTION_QUEUE" VARCHAR2(30),
         "STEP_NO" NUMBER,
         "RECIPIENT_KEY" NUMBER,
         "DEQUEUE_MSGID" RAW(16),
         "USER_DATA" "SYSTEM"."WF_PAYLOAD_T" ,
         "SENDER_NAME" VARCHAR2(30),
         "SENDER_ADDRESS" VARCHAR2(1024),
         "SENDER_PROTOCOL" NUMBER,
         "USER_PROP" "SYS"."ANYDATA"
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING
      STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505
      PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "APPLSYSD"
     OPAQUE TYPE "USER_PROP" STORE AS LOB (
      ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      CACHE
      STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505
      PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    
    SQL> select owner, table_name, column_name, segment_name, tablespace_name from dba_lobs
      2  where table_name = 'T' ;
    
    OWNER                          TABLE_NAME
    ------------------------------ ------------------------------
    COLUMN_NAME
    -----------------------------------------------------------------------------------------------------------------------------------
    SEGMENT_NAME                   TABLESPACE_NAME
    ------------------------------ ------------------------------
    APPS                           T
    USER_PROP
    SYS_LOB0000365381C00035$$      APPLSYSD
    
    SQL> alter table t move tablespace APPLSYSX ;
    
    Table altered.
    
    SQL> select dbms_metadata.get_ddl('TABLE','T') from dual ;
    
    DBMS_METADATA.GET_DDL('TABLE','T')
    --------------------------------------------------------------------------------
    
      CREATE TABLE "APPS"."T"
       (     "Q_NAME" VARCHAR2(30),
         "MSGID" RAW(16),
         "CORRID" VARCHAR2(128),
         "PRIORITY" NUMBER,
         "STATE" NUMBER,
         "DELAY" TIMESTAMP (6),
         "EXPIRATION" NUMBER,
         "TIME_MANAGER_INFO" TIMESTAMP (6),
         "LOCAL_ORDER_NO" NUMBER,
         "CHAIN_NO" NUMBER,
         "CSCN" NUMBER,
         "DSCN" NUMBER,
         "ENQ_TIME" TIMESTAMP (6),
         "ENQ_UID" NUMBER,
         "ENQ_TID" VARCHAR2(30),
         "DEQ_TIME" TIMESTAMP (6),
         "DEQ_UID" NUMBER,
         "DEQ_TID" VARCHAR2(30),
         "RETRY_COUNT" NUMBER,
         "EXCEPTION_QSCHEMA" VARCHAR2(30),
         "EXCEPTION_QUEUE" VARCHAR2(30),
         "STEP_NO" NUMBER,
         "RECIPIENT_KEY" NUMBER,
         "DEQUEUE_MSGID" RAW(16),
         "USER_DATA" "SYSTEM"."WF_PAYLOAD_T" ,
         "SENDER_NAME" VARCHAR2(30),
         "SENDER_ADDRESS" VARCHAR2(1024),
         "SENDER_PROTOCOL" NUMBER,
         "USER_PROP" "SYS"."ANYDATA"
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING
      STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "APPLSYSX"
     OPAQUE TYPE "USER_PROP" STORE AS LOB (
      ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      CACHE
      STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    
    SQL> select owner, table_name, column_name, segment_name, tablespace_name from dba_lobs
      2  where table_name = 'T' ;
    
    OWNER                          TABLE_NAME
    ------------------------------ ------------------------------
    COLUMN_NAME
    -----------------------------------------------------------------------------------------------------------------------------------
    SEGMENT_NAME                   TABLESPACE_NAME
    ------------------------------ ------------------------------
    APPS                           T
    USER_PROP
    SYS_LOB0000365381C00035$$      APPLSYSX
    
    SQL> drop table t purge ;
    
    Table dropped.
    

    If you want to be able to move the segment to a different tablespace to the table, I guess that's not possible. Oracle only allows LOB to be stored in a separate tablespace as the corresponding table provided that they are defined as the LOBs explicitly during the creation of the table, unlike the LOB created by oracle internally because of the column datatype being ANYDATA as in this case.

  • update a table with sequence colmn

       how to update a colmn of table with sequence 
    
       e.x 
       
    COLMN1     COLMN2
    A     
    D     
    RTR     
    XX
    G     
    
    how to update colm2 like 
    
    COLMN1     COLMN2
    A               1
    D               2
    RTR               3
    XX              4
    G               5
    update tab set col2 = rownum;
    commit;
    
  • Update the Table with the push button

    Hi I want to update my table using the push button that requires a transfer of account

    For example a single account transactions into 2nd account


    I used this query, but his does not work

    Update of cb
    Set cb_acc_id =: block3.acc_id_target
    where
    cb_acc_id =: block3.acc_id_source;



    Concerning

    Wasim Ismail

    You may forgot to validate your update...

    BTW:
    your form will not recognize, you start a transaction and make an update in the database.

  • Update a table with primary key

    Hello

    I have a table called Temp

    CREATE TABLE TEMP
    (
       A   VARCHAR2 (50 CHAR),
       B   VARCHAR2 (50 CHAR),
       C   VARCHAR2 (50 CHAR),
       D   VARCHAR2 (18 CHAR),
       E   DATE,
       F   NUMBER,
       G   VARCHAR2 (18 CHAR),
       H   FLOAT
    );
    

    The primary key is the PRIMARY KEY: (A, B, C, D, E, F, G).

    I HAVE THE TEMPORARY TABLE 48052365 COUNTY,

    HOWEVER I HAVE A REQUIREMENT TO UPDATE WHERE E (COLUMN) IS WEDNESDAY, THE SAME DAY IN MONDAY (I.E., C - 2 TO EXISTING DATE)

    Approach;

    I CREATED the TABLE TEMP_WED_TO_MONDAY AND SELECTED ALL THE RECORDINGS ELIGIBLE IN CE AND TABLE AND INDEX UNIQUE CREATED on this SUBJECT. TO UPDATE, I WROTE UNDER ANONYMOUS BLOCK.

    Number of Tables: TEMP_WED_TO_MONDAY is 46,921,912 and count of total of the table is 48052365

    Anonymous block:

    DECLARE
       CURSOR UPDATE_TEMP_DATE
       IS
          SELECT A,
                 B,
                 C,
                 D,
                 E,
                 F,
                 G,
                 E - 2 NEW_E
            FROM TEMP_WED_TO_MOONDAY;
    
    
       TYPE UPDATE_TEMP_DATE_REC IS RECORD
       (
          A       VARCHAR2 (50 CHAR),
          B       VARCHAR2 (50 CHAR),
          C       VARCHAR2 (50 CHAR),
          D       VARCHAR2 (18 CHAR),
          E       DATE,
          F       NUMBER,
          G       VARCHAR2 (50 CHAR),
          NEW_E   DATE
       );
    
    
       TYPE UPDATE_TEMP_DATE_TBL_TYPE IS TABLE OF UPDATE_TEMP_DATE_REC;
    
    
       UPDATE_TEMP_DATE_TBL   UPDATE_TEMP_DATE_TBL_TYPE;
    BEGIN
       OPEN UPDATE_TEMP_DATE;
    
    
       LOOP
          FETCH UPDATE_TEMP_DATE
             BULK COLLECT INTO UPDATE_TEMP_DATE_TBL
             LIMIT 1000000;
    
    
          EXIT WHEN UPDATE_TEMP_DATE_TBL.COUNT = 0;
    
    
          FORALL I IN UPDATE_TEMP_DATE_TBL.FIRST .. UPDATE_TEMP_DATE_TBL.LAST
             UPDATE TEMP
                SET E = UPDATE_TEMP_DATE_TBL (I).NEW_E
              WHERE     A = UPDATE_TEMP_DATE_TBL (I).A
                    AND B = UPDATE_TEMP_DATE_TBL (I).B
                    AND C = UPDATE_TEMP_DATE_TBL (I).C
                    AND D = UPDATE_TEMP_DATE_TBL (I).D
                    AND E = UPDATE_TEMP_DATE_TBL (I).E
                    AND F = UPDATE_TEMP_DATE_TBL (I).F
                    AND G = UPDATE_TEMP_DATE_TBL (I).G;
    
    
          COMMIT;
       END LOOP;
    
    
       CLOSE UPDATE_TEMP_DATE;
    END;
    
    

    But for the past 6 hours, it only updated records 20,00,000(Twenty lakh) only. because this update in the table and is also part of the teaching primary key I think it takes time, but pointers to improve/acceleration of the update

    Explain the plan:

    update statement all_rows (Cost 4)
      3 update hr.temp 
        2   table access by index rowid table hr.temp (Cost 4, Bytes : 64 ,Cardinality 1)
          1    index range scan index hr.temp_wed_to_monday (Cost 3: Cardinality 1)
    

    Thank you guys, I would be grateful if someone provides the solution for the scenario, rather than highlight the design. Please understand someone designed to best with whatever the limits it has during this period. (and this isn't me).

  • Update a table with a query that uses the table updated

    Hi This is my request. It's a mistake, but I hope that the basic idea may carry out. Cost_before_Decision is a column by using an alter table statement, I added:
    UPDATE fraud_nov_14_final
    SET Cost_before_Decision = (select Cost_Prior 
                                from    fraud_nov_14_final ff
                                      ,(select cla_case_no, sum(case when decline = 1 or decline = 2  
                                                                  THEN (nvl(total_cost_adj_old,0) + nvl(decline_estimate,0)) 
                                                                  ELSE Total_Cost 
                                                                  END) Cost_Prior
                                        from reporting.ci_final@test
                                            group by cla_case_no) z
                                                    where ff.cla_case_no = z.cla_case_no)
    Error I get is:
    Error report:
    SQL error: ORA-01427: einreihig subquery returns multiple rows
    01427 00000 - "einreihig subquery returns several lines.

    Thanks in advance for your help:

    Banner:
    Oracle Database 11 g Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production."
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    Try this

    update fraud_nov_14_final a
       set cost_before_decision = (
                        select cost_prior
                          from (
                             select cla_case_no, sum(case when decline = 1 or decline = 2  then (nvl(total_cost_adj_old,0) + nvl(decline_estimate,0)) else total_cost end) cost_prior
                               from reporting.ci_final@test
                             group by cla_case_no
                               ) b
                                   where a.cls_case_no = b.cls_case_no
                         )
    
  • How can I update this table with values from another table?

    Hello

    I have a table 'governed '. I want to replace the values in the column "regies.agent" by the value of the column "regies_personnes.id."
    As you can see the tables have a column of common values. IE regies.agent = regies_personnes.nom

    Table 'governed ':
    Insert into 'authorities' (AGENT) values ('Humberdot Alain");
    Insert into 'authorities' (AGENT) values ("Danard Patrick");

    Table 'regies_personnes ':
    Insert into REGIES_PERSONNES (NAME, ID) values ("Humberdot Alain", 1);
    Insert into REGIES_PERSONNES (NAME, ID) values ("Danard Patrick", 2);

    Before having it
    SQL > select agent of authorities;
    Humberdot Alain
    Patrick Danard

    After the update, the result should be
    SQL > select agent of authorities;
    1
    2

    Thank you for your kind reply.

    You can

    update regies r set agent = (select id from regies_persones p where r.agent = p.nom)
      where exists (select id from regies_persones p where r.agent = p.nom)
    
  • How to update the table when change list item in the classic report

    Hello
    I worked with apex 4.2 and I create normal classic report with list (named loved) select a column, now I want to update the table when the user changes the list with the new value, I can't create a dynamic action to do this, I create checkbox with the primary key and the loop for check point to update the table but I can not get the value of the list item. and for more speed, the user want to do it when changing the value from the list.

    My question
    1. how to do it in javascript and get the value of the list item and update the table with the new value
    2. do I have to use the API to create the list item so I can get the value of the report item or what.





    Thank you

    Ahmed

    You can find a lot of information in this forum (and outside in google) when you search for AJAX processes and demand. However, the tutorial in the link below should be useful:
    http://www.Oracle.com/WebFolder/technetwork/tutorials/OBE/DB/hol08/apexweb20/ajax_otn.htm

    BTW, if we answer your question, don't forget to mark the appropriate post as correct. It will help all of us in the forum.

  • Update target tables...

    Hello

    I'm actually in a difficult situation. I need to update a table with a view. The table has 3 columns (* col1, col2, col3 *) initialized as NULLs in all records, noting that the other columns are given inside... So what I'm basically doing is this:

    I maps the columns to display in the table and click on the table to display the table operator properties, then set the type of loading for UPDATE. Then under a conditional loading in the filter of the target for the update , I have inserted the following condition:

    (INOUTGRP1.*col4 * IS NOT NULL) which shows a successful validation.

    Taking into account the constraints Match is chosen to be NO_CONSTRAINTS...

    After that I click on col1, col2 and col3 respectively to put the Match column when new line Yes...

    Unfortunately, these warnings will appear saying the following:

    + VLD-2753: all mapped attributes are used in corresponding to the criteria of 15_REC.

    It will be a meaningless update action if all attributes are mapped are used for matching. The update statement selects rows that meet the condition of correspondence and be updated with the same values. Specify at least one mapped attribute of my_table to use for updating by setting use update for Matching No.: ( COL1 COL2 COL3). +


    + VLD-2761: impossible to generate the Merge statement.

    MERGE statement cannot be generated because the COL4 column is used for correspondence and updating. A column can be updated in a merge statement. +



    So if anyone has any kind of idea help as soon as possible... Since it is in fact urgent...

    Thanks a lot already recognizing in reading.
    Hossam

    "Merge statement cannot be generated because the COL4 column is used for correspondence and updating. A column cannot be updated in a merge statement.

    You have to column 4, set the Match column when new line no. and update column Yes?

    Concerning
    Nico

Maybe you are looking for

  • Touchpad disconnects

    I have a nice Mac Book Pro of the retina with OSx 10.10.5. Recently, I had a problem with my track disconnect pad. It works normally when starting up, but the cursor can be moved with the external mouse (blue tooth, Mac mouse) after some time. There

  • 12.4 composer view breaks track #1 albums.

    I finally found the sight of the composer... To see only the first track of some albums was severed in a unique tack album of it own. The tracks weren't like that before 12.4. It occurs under several composers. Suggestions for a way around this?

  • Can not download the update of BIOS for Tecra M5

    I am trying to download the giving the Tecra M5 BIOS update.When I click on the download link, I get redirected to another server. My connection doesn't seem to work for this server - is there another place I can download the file from? Thank you.

  • Detection of InsightCM Server service stopped

    Hello. Is it possible to get some kind of alarm or notification, if the InsightCM Server service stopped running on the server? It is not something I've experienced, but I just got the issue with the customer, so that I am currently working. Thank yo

  • Windows Update indicates false failed State

    I have Windows 7 Ultimate 64-bit and Windows udpate reported the following in the summary page: "updates have been installed: 15/04/2010 at 08:37 (down)." View update history". However, when I discovered the history/details, the update to this date a