Name of the table mistakenly renamed

Hello

I've migrated a MySQL existing database to the oracle database.
MySQL database had a few tables and columns with length > 30, as oracle does not support the length > 30 so it automatically renamed length 30 characters by removing the last characters who are after 30 characters, but today, I found a column of names that are renamed as
All following columns are in single table only

surgey_pa_premedication_detail_dosa renamed to SURGEY_PA_PREMEDICATION_DETAIL (which is quiet right) 
But
surgey_pa_premedication_detail_id renamed to SURGEY_PA_PREMEDICATION_DE_730
surgey_pa_premedication_detail_route renamed to SURGEY_PA_PREMEDICATION_DE_731
surgey_pa_premedication_detail_type renamed to SURGEY_PA_PREMEDICATION_DE_732
Thanx

Oracle was smarter than you think.

Could not truncate all the columns to 30characters because the first 30characters of each column are exactly the same. Truncation to 30characters would result in the same column name repeats another three times.

Thus, he executed the only for the first coumn truncate. For the following columns, he 26characters are truncated and added strings of 4 distinct characters.

You will need to rename the columns yourself to more meaningful names.

Hemant K Collette

Tags: Database

Similar Questions

  • maximum length of the name of the table.

    Hi all

    I think that the maximum length of the array and the name of column in oracle 11g is 30 characters.
    I want to increase the limit I want to import a mysql database that is to have more big names in the table.
    I can set the length of the name and the table column name?

    Thanx.

    Before the migration, you can rename your tablename in MYSQL
    http://docs.Oracle.com/CD/E12151_01/doc.150/e12155/oracle_mysql_compared.htm

    You can't increase and change the length of the table

  • Change the name of the table/view to RPD.

    Hello

    I have a domain which has two points of view in it. The joints are given and have the subject area in the presentation layer. I created a few reports and they work fine. Now, we want to change the name of the views and do not want in the database. I changed the names in the presentation layer. I ran the created reports and they work fine. I have approach the right way? Did I modify them elsewhere? I don't want my reports to be affected in any way with the change of the view names. Please advice.

    Hello
    When you change the name of table or a view in the presentation layer of the RPD, it will create aliases for that name .you may notice to double-click on the name of the table, alias tab

    If you remove that alias name the report will be the effect on best practice is that do not delete aliases for name reports was changed from RPD table

    the same scenario will apply for object zone rename also

    Thank you
    Saichand.v

  • Creating a view of mast bearing the same name with the name of the table

    Hello world

    After having dropped the name of view mast QQ. "" TRDLN_DIM_MV ", I try to recreate by having the same name as the table, but I got an error message stating that"the name is already used by an existing object. How to create a matte view to resemble the object possessed by schema 'GQ', with a name identical to the name of the table, drop the table?

    OWNER_O CREATED LAST_DDL_ TIMESTAMP STATUS OBJECT_NAME OBJECT_TYPE
    ===
    GQ MATERIALIZED VIEW 5 NOVEMBER 08 2008 13 DECEMBER 08-11 - 05:06:31:46 TRDLN_DIM_MV VALID
    GQ TABLE 5 NOVEMBER 08 2008 15 DECEMBER 08-11 - 05:06:31:00 TRDLN_DIM_MV VALID
    QQ TABLE 17 AUGUST 07 16 MARCH 09 2007-08 - 17:17:05:21 TRDLN_DIM_MV VALID

    SQL & gt; CREATE THE QQ MATERIALIZED VIEW. TRDLN_DIM_MV
    2 TABLESPACE FPLC01S
    3 NOCACHE
    4 NOLOGGING
    5 PACK
    6 PARALLEL (DEGREE 1 2 INSTANCES)
    7 BUILD IMMEDIATE
    8 REFRESH FORCE ON REQUEST
    9 WITH PRIMARY KEY
    10 AS
    11 Select / * + NO_REWRITE * / trdln_id,.
    trdln_skid 12,
    trdln_end_date 13,
    FIRST_VALUE (trdln_end_date) 14 over (partition by order of trdln_id trdln_end_date DESC) as MaxDate
    15 QQ.trdln_dim;
    of QQ.trdln_dim
    *
    ERROR on line 15:
    ORA-00955: name is already used by an existing object

    I appreciate your help. Thanks in advance!

    Kind regards
    Radic

    You must rename the table (using ALTER TABLE TableName RENAME to othername ;) before creating the MV.
    You cannot have both existing with the same name in the same schema.

    What you see in the scheme of GQ, is that the 'picture' is the underlying table for the materialized view.
    When you do a MY_MV CREATE MATERIALIZED VIEW AS...
    Oracle creates two objects with the same name, we the MY_MV materialized view, and the other being the MY_MV table, which is the physical storage. {Don't forget that a materialized view is a way to get a physical representation of views.}

    In the schema QQ is what you
    a. a real Table
    or
    b. a MV incorrectly deleted, resulting in the underlying Table always presents.

  • Impossible to change the name of the Table in figures

    I'm unable to change the title of a table, when I change the title name and press on enter it reverts to the original title. I tried to click away and save the document, but both go back to the original title. The only way to work is, it seems if the option a table a few times then start trying a new title.

    This can happen when you have a table with the same name on the same sheet.  Numbers of refuses to accept the name "double".  Check the names of the tables on the al sheet again.  One way to do that is to click the right part of the tab "" at the top with the sheet and inspect the table names in the drop-down menu that appears.

    SG

  • The name of the Table may be 2 lines

    Can the name of the Table "numbers be 2 lines?

    I don't seem to be able to make a table name two lines.  You can use a box of text instead, while hiding the name of the table:

    Disable the table name in the Table formatter (lower-right)

    Add a text box

  • What is the name of the table that has the name of the custom in the Oracle database Section?

    What is the name of the table that has the name of the custom in the Oracle database Section?

    Thank you

    Nefertari

    The names of the custom Sections are stored in commonExtendedAttributeML, the extended attribute table.

  • Using the name of the table to Insert variable

    Hello

    I'm trying to use a variable as the name of table to do an insert.

    The name of the table where my datas have to be inserted is EVV_ + the Ref_var of data.

    My code will be more explicit:

    SELECT 'EVV_ ' | Ref_Equip

    IN v_Ref_Equip

    OF user.c_equip

    WHERE clef_equip = v_clef_equip;

    INSERT INTO 'user '. || v_Ref_Equip (Clef_var, Date1, value)

    VALUES (v_clef_var, 18 May 01 ', 49, 156');

    I can't find the proper syntax for inclusion in. I tried a lot of syntax, but not good.

    So, how can I concatenate 'user.' + my v_Ref_Equip variable?

    Thanks for the help

    Have a look at this immediate execution method

    SQL> set serveroutput on;
    SQL> declare
      2  v_tab_name varchar2(20) := 'temp';
      3  begin
      4      execute immediate 'create table temp(id number)';
      5      execute immediate 'insert into '||v_tab_name||' values (1)';
      6      commit;
      7  end;
      8  /
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from temp;
    
            ID
    ----------
             1
    
    SQL>
    
  • name of the table in the EM repository to return the State of the database

    Hi, I would like to know the name of the table in MS repository on which I can query for the status of the database. I've tired to search in the target of $ mgmt and did not find the status of the db

    Please take a look at the AVAILABILITY_CURRENT view of $ MGMT.

    http://docs.Oracle.com/CD/E24628_01/doc.121/e57277/ch19_monview.htm#EMVWS12346

    Kind regards

    -Loc

  • SQL how to use a variable and use the result as a reference for the name of the table

    Hi all

    I have new in the declaration of Oracle, sorry in advance if something is easy for you all. BTW, I have this scenario:

    I have a table OL structured in this way:

    Date - it contains dates, for example 11/01/2015

    TableName - it contains strings, for example, OL1, OL2, OL3 and so on...

    Then I have a different table, the name of these tables are of the same name in the table of the OL, so I have table table, OL1, OL2, OL3 table and so on. The structure of these tables is the same. And Yes.

    table OL1

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

    ID LAST NAME FIRST NAME PHONE

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

    1 JOHN DOE 12345679

    2 PAUL 111111122 TIBBS

    table OL2

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

    ID LAST NAME FIRST NAME PHONE

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

    1 ANNA KRAIG (NULL)

    NATHAN FRESHMANN 111111133 2

    If the scenario is clear, I would like to retrieve the value (null), research in all the OL * tables by using the value of the OL table (tablename) max.

    If I'm going to do these simple steps, I got the result:

    Select max (TableName) OL

    the result will be OL2

    # I know not how to use the option set to avoid changing the table name in the sql statement all the time.

    set mytable = 'OL2.

    Select Name, family name

    of & mytable

    When the phone is null

    Any idea?

    Thank you very much in advance.

    Hello

    run immediately "select dt.log_id, obj.presentation_name, dl.begin_time

    bulk collect into v_result_set

    of ' | v_ol |' dt join internal ol_object obj on

    DT.object_type_id = obj.object_type_id

    inner join ol_chunk_log dl on

    DT.log_id = DL.log_id

    where dt.data_value is null';

    dbms_output.put_line (v_ol);

    end;

    Correct the code such as:

    run immediately "select dt.log_id, obj.presentation_name, dl.begin_time

    of ' | v_ol |' dt join internal ol_object obj on

    DT.object_type_id = obj.object_type_id

    inner join ol_chunk_log dl on

    DT.log_id = DL.log_id

    where dt.data_value is null' bulk collect into v_result_set;


    for i in v_result_set.first ... v_result_set. Last

    loop

    dbms_output.put_line ('LOG ID: ' | ) ( v_result_set.log_id (i)) ;

    dbms_output.put_line (' NAME CLOSELY: ' |) v_result_set.presentation_name (i));

    dbms_output.put_line (' START TIME: ' |) ( v_result_set.begin_time (i)) ;

    end loop;

    end;

    Kind regards.

  • Find the name and the table constraint type based on the name of the field

    I have a field name or a column with me... I want to find the name of the table is a primary key... Any request to make this work so that the running costs are low...

    Currently, I mix dba_constraints and ALL_TAB_COLUMNS to get this... is possible to extract the data of a process cost effective single table/any other is appreciated

    You must include the USER/ALL_CONSTRAINTS with USER/ALL_CONS_COLUMNS to achieve your desired results. For your specific condition, you can try this query.

    Select constraint_name

    column_name

    de)

    Select c.constraint_name

    cc.column_name

    count on column_count (c.constraint_name score) (cc.column_name)

    from user_constraints c

    Join user_cons_columns cc

    on c.constraint_name = cc.constraint_name

    where constraint_type = 'P '.

    )

    where column_name = 'EMPNO '.

    and column_count = 1;

    I used USER_CONSTRAINTS and USER_CONS_COLUMNS. If you use ALL or DBA dictionary table add join OWNER condition as well.

  • Look for the name of the table of choice in stock or manufacturing


    What is the name of the table in the inventory which is used to store information in list of choice?

    To make my question clear, here are the steps:

    (1) connect to Oracle EBS (R12) with responsibility for the inventory.

    2) go to settings

    (3) go in the research - you see the screen named "manufacturing research."

    4) click on your flashlight to select the value for the Type.

    (5) for example, select MTL_CONVERSION_TYPE - you'll see the Code values and columns meaning listed below:

    Meaning of the code

    1 specific item

    2 standard

    3 standard and specific item

    Question:

    What is the name of the table that contains the values above?

    Hello

    I finally found the name of the table. The name is "FND_LOOKUP_VALUES".

    Thank you

  • Concatenation of the name of the table in the Insert query

    Greetings,

    Oracle Version - Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64 bit Production


    I want to write a procedure in which we give the name of the table in the Insert at runtime through cursor


    But the problem is

    insert into tra_temp

    Select * tra_smi23 of

    in statement above 23 must be dynamic like tra_smi | 23


    Here is my code, but something is not

    Kindly help


    create or replace procedure as

    cursor c1 is

    Select op_ID, operators OP_NAME where OP_NAME like '% TRA '.

    and OP_ID <>9;

    Start

    run immediately 'truncate table tra_temp;

    for rec in c1

    loop

    insert into tra_temp

    Select * from tra_SMI | ' recomm. OP_ID';

    commit;

    When exit c1% notfound;

    end;

    Hello

    Then you must change the insert statement for: run immediately ' insert into tra_temp select * from tra_SMI'| recomm. OP_ID;

    Concerning

    Mr. Mahir Quluzade

  • by selecting the name of the table as a variable

    Please correct it.

    declare
    v_ename varchar2 (10): = 'emp ';

    Start
    for j in (select ename from v_ename)
    loop
    dbms_output.put_line (j.ename);
    end loop;
    end;

    get error table v_ename does not exist.
    I have to use v_ename, as I don't know the name of the table.

    You need to use dynamic SQL statements if it is really an obligation. In the majority of cases, when people think that they need to code SQL dynamic, however, they attempt to conceal a more fundamental problem of design (often a data model that needs to be fixed). Since you haven't explained why you think you have need to use dynamic SQL statements, it is difficult to know if it's just adding more complexity to your environment.

    If you know that there is always an ENAME column in which table is passed, you know that the ENAME column is always a VARCHAR2 (10), and the number of rows in the table is reasonably small

    SQL> ed
    Wrote file afiedt.buf
    
      1  declare
      2    type ename_tbl is table of varchar2(10);
      3    l_enames ename_tbl;
      4    l_table_name varchar2(30) := 'EMP';
      5  begin
      6    execute immediate 'select ename from ' || l_table_name
      7       bulk collect into l_enames;
      8    for i in 1..l_enames.count
      9    loop
     10      dbms_output.put_line( l_enames(i) );
     11    end loop;
     12* end;
     13  /
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    
    PL/SQL procedure successfully completed.
    

    Justin

  • Name of the table to see the forecast in the backend SQL query

    Hello


    Forecast is released on ASIC of Dematra,

    I have the name of the table to see the forecast published in Demantra

    How to confirm that the same forecasts are published in CPSA also

    What is the name of Table to see forecasts, forecasts

    Data published in the CAWC Demantra forecasts will be stored in the following MSD_DP_SCN_ENTRIES_DENORM table

    first get the scenario_id of the msd_dp_ascp_scenarios_v of table using scenario_id check if the forecast is filled in msd_dp_scn_entries_denorm

    Published by: user11986840 on August 13, 2012 03:15

Maybe you are looking for