Rename a column

Hello friends,

I'm trying to rename a column using the alter statement.

ALTER TABLE KAW_OWNER. X_HOUSEHOLD_UBS_DETAIL RENAME X_PEAK_12M_SEGMENT_CD IN X_PEAK_12M_SUBSEGMENT_CD ;



ORA-14155: lack of PARTITION or SUBPARTITION keyword.

I checked the table script and there are no partitions and void / partitions.


Published by: kumar73 on January 24, 2011 07:09

Published by: kumar73 on January 24, 2011 07:15

It is an error message disturbing Oracle. you simply missed the keyword COLUMN:

ALTER TABLE your_table RENAME COLUMN from_col TO to_col;

Tags: Database

Similar Questions

  • Cannot rename a column in the presentation layer 11.1.1.9

    Hello world

    I'm having a time difficult trying to rename a column in the presentation to 11.1.1.9 layer - even if I uncheck 'use the logical name Colmn' the "name" box does not become white, it remains grey. Am I missing something simple? I thought I could rename objects in the presentation layer to make them more user-friendly for some reason any?

    A quick search in this forum you will get the answer

    Cannot rename objects presentation

  • Warning message before you rename a column

    Hi gurus,

    I need your suggestion. I am desiging a module to move data from one table to the schema of intermediate archives and then delete intermediate tables, such as each table has it's own rules to keep history (some of them need 2 weeks, 1 month etc) and deleting based on reporting_date for some tables, rpt_dt other reporting_dt other and so on... (inconsistent naming). Because most of the tables is not partitioned, I have to do in the conventional way of copying the data and then remove. (Speaking of ~ 100 tables, data to remove from 100K to 1 million)

    My plan is to create a table as follows, which highlights each table name and field based on which remove will

    Table of correspondence:

    KEYSOURCE_TABLEFIELDNAMESTARTEGYKEY
    1000T1REPORTING_DATE1
    2000T2RPT_DT1
    3000T3RPT_DT2

    Strategy table:

    STRATEGYKEYSTG_KEEP_DAYSCOMMENTS
    114Default option
    230Keep the last 30 days

    My question is I want to create an alert so that if a developer RENAMES the RPT_DT of the RPTDT column in table T2, it must either refuse the user until it changes the above new domain name mapping table entry. Otherwise refuse, at least draw the attention of the user. How do I get it? I was curious to know if there are new techniques in versions of oracle 10 g / 11 g (mine is 11 g) apart from old techniques I could think

    (1) create a level trigger statement for 100 + tables on the field of Reporting_dt/Reporting_date/RPT_Dt, such that the error is thrown in the exception block (this could slow down the load ETL). Difficult to maintain.

    (2) handle reactive IE perform a daily check to see if a field name in the mapping table exists in all_tables.

    I learned a lot of new techniques in this forum where many new features have been introduced by oracle, or others had a cleaner and better how to implement their experience practice.

    Thank you

    Sunny

    I do not understand how your statement-level trigger approach would work.  Rename a column is DOF, no DML, the ALTER TABLE that rename the column don't trigger a DML trigger.  Level trigger statement that try to validate the structure of the table to the data you're now would place a huge burden and would not raise an error up to this than potentially long after that the disturbing change has been made.

    I guess you can create a DDL trigger that took place when a user has changed the table who tried to validate the DDL against the data in the table (probably using ora_is_alter_column and ora_is_drop_column functions).  That could probably be put into work, but you should always remember to change the data in your table and then run DDL on your table, and not the reverse.

    A DML trigger on your mapping table that checks if the data in your mapping table corresponding to the table definition would be easier to write.  But you would be once again be capture potentially long errors after a rogue DDL statement was executed.

    You could get even more esoteric using something like water course to post the DDL changes and write a subscriber process may change your mapping table or triggered some kind of alert if there was a disconnect.  If you are the Subscriber for a little delay, you could give time for the LMD to the mapping table (most likely) would have completed to make coherent whole before validating the DDL.

    If you are looking for a technical solution, however, I will do as you no matter what time you want to make sure that coherent sets of changes are made - would create a stored procedure that combines some DOF and you want to allow and prevent people from having the possibility to issue direct DDL statements of the DML changes.  If your procedure is written correctly and is the only way to do this kind of manipulation, you should be able to track changes in sync (except for cases where the procedure was partially successful because engages in the DDL and mistakes elsewhere).

    In reality, however, this is not a technical problem if you probably don't want a technical solution.  Rename a column isn't something that would be never done willy nilly.  This is something that should be done as part of a change of control.  This change of control should be considered at least two beings who can catch stupid things.  That change control should be accompanied by tests that validate things like the ability of your process to ETL, data in the mapping table corresponds to the definition tables.  This change of control should be tested in environments below.  At the time wherever a change is ready to be deployed to production, you should be fairly confident roughly that the definition of the table will match the data in your mapping table.  A process-based solution would make me much more comfortable than a technical solution to this kind of question.

    Justin

  • Hundreds of rename logical columns

    Hello!

    I am new to OBIEE and I could not find a solution on google, so I hope you could help us. I have so few physical tables with many columns I want to rename it, but Assistant rename is not an option for me. Most of the names of columns are as assistant to rename and "BF5648" who is unable to transform into a human-readable text.

    So I, in Excel, all the names of physical column and alongside the description I want to use in the business layer and presentation. Can I create a kind of script or I don't know, something I would say OBIEE bulk rename a column with this description.

    If I have to do it manually, it would be a huge waste of time to rename every single logical column one by one.

    I really hope that there is some sort of solution to this!

    I think I have an idea, as we tried to export of AWM to OBIEE and it creates a file of text which I think I can examine and recreate one for my needs, or something like that and I hope it works. It seems to me that a lot of code, but if there is no other way, so be.

  • I need to rename a column for a tabular presentation

    How to rename a column, I created for a tabular presentation?

    I added a new column to a tabular presentation (using 'add a new link in the column') and he gave me a name of column, called "link column. I tried to change, but it does not - note: I can't change a sql column does not exist outside Apex - I created it for the display of a calculation.

    I don't know that it can be done as I did before.

    change the column name photo columnnamechange.png

    Does not change the name of  photo colunnamechange.png so cannot reference in my calculation

    Well, I found a way to do it anyway. This should be changed in the definition of region > source.

  • Rename the column name of the view

    Suppose I have an employee of the table with the column name. Now, I want to make a view of the employee to the table with the name of the First_name and Last_name column. Is this possible?

    You can also use aliases in the view definition:

    CREATE VIEW employee_view (
      first_name,
      last_name
    ) AS
      SELECT first,
             last
      FROM   employee;
    

    However, you can rename a column in a view. You would have to DROP and CREATE or to CREATE or REPLACE.

    Concerning
    Peter

  • How to rename a column

    Hai All

    How to rename a column


    Select sysdate double

    And it displays the column as sysdate and I need to change in the Regulartime


    How to do this


    Thanks in advance

    Srikkanth.M
    entman@aepw02> select sysdate as Regulartime from dual;
    
    REGULARTIME
    --------------------
    10-MAY-2010 11:26:13
    
    1 row selected.
    
  • How to rename column?

    employee Table
    EMPNO   EMPNAME       JOB            SALARY   PLACE
    ----------- ----------------     ------            ------------  -------------
    1           san              employee       25000     africa
    
    2           tan              employee       30000     Africa
    
    3           pan              employee       35000     Africa
    
    4           sony            employee        40000     africa
    I want to rename EMPNAME as employeename,
    and EMPNO as employeenum

    the querry please

    Thank you

    Published by: 978976 on December 27, 2012 22:18

    Published by: 978976 on December 27, 2012 22:19

    you want to rename the columns during the term of execution of query or in the table itself?

    in the case of then run time query:

    Select empname as employeename, empno as employeenum of the employee;

    If you want to rename the columns in the table itself then:

    ALTER table employees rename column empno to employeenum;

  • How to rename columns

    I have a lot of tables and have to rename a large number of columns (due to data transfer that I made from sql server 200)... Is it possible to pl/sql create procedure to rename the columns of the table...

    Can be like that?

    BEGIN
     EXECUTE IMMEDIATE 'alter table table_name rename column old_col_name to new_col_name';
    END;
    
  • How to rename columns fast

    Hi all

    I am creating guests to filter a report on employment applications, and would rename the column (label) that describes the prompt.

    The column is initially called 'Employment requisition Source name status', but I simply invite him to display "Status".

    How can I achieve this?

    Of guest are what kind you referring? Prompt dashboard? This is the area of the label. Prompt Filter column? That's the legend.

    Does that answer your question? If this isn't the case, be more specific, please.

  • How to rename and delete a particular column in a table?

    Hello

    Suppose I have a table with the following defination:

    create table t1
    (a number not null,
    b varchar2 (20).
    c varchar2 (20));

    eventually I want to rename the column b to x and the next step I want to remove column c and all of its contents. How to do this?

    Hello

    To copy the column b: column a

    UPDATE  t2
    SET     b  = a;
    

    To drop a constraint:

    ALTER TABLE  t2
    DROP CONSTRAINT  on_b;
    
  • Referring to created columns

    Hi all

    I am a trainee comes to be introduced to OBIEE and the knowledge that you can share with me would be much appreciated!

    In Oracle BI answers, I created two columns using case statements. These columns return the value of ' 0 'or a ' 1'. I would like to create another line which divides the results of these two columns.

    However, since I myself have created and renamed these columns, I can't reference it in another formula of column in the "typical" report "" Format of variables. Is there a way that I'm able to reference these columns? Or is it possible that I am able to use an arithmetic function to divide the results of two case statements?

    Thanks for any help you can offer!

    -Mark

    Hi Mark,

    Welcome to the world of OBIEE

    You cannot reference your owner created columns (Forms) by a name or a variable, OBIEE means in this case is to use the complete formula again.

    In your column formula window, you have a drop down showing you the columns existing in your analysis, if you select one of your 2 columns, you will see that OBIEE does not insert a reference (name) of your column in the formula, but it will again insert the complete formula.

    It of the way it works, so if you change the formula in one of your columns 2 you must also, by yourself, update the formula in the 3rd column with the division.

  • [SQL * Loader] ORA-01747 on column name 'INDEX '.

    Hello

    I use SQL * Loader to load the test data for the CSV files. I have a column whose name is "INDEX". SQL * Loader works very well under Linux (Red Hat 6 - Client Oracle 11.2.0.1.0) but I encounter ORA-01747 launch my Workstation Windows (Oracle Server 11.2.0.1.0).

    For more information, I target the same instance (Red Hat 6 - Oracle Server 11.2.0.1.0).

    You have an idea how to solve the problem (without renaming the column )?

    Thanks for any help you can provide.

    I finally find the solution surrounding the column name with double quotes ("") within the control file. Thank you to remember the format of "protector".

  • 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

  • Columns mysteriously changed its name

    Hi all

    I came across something unusual...
    When im buidling a new analysis and select a 'Sentence' column that is issued, in the right hand window the column is to be dispalyed as 'issued sentence (Accepted). There is notthing on this column in the webcat or the RPD which associate the word "ACCEPTED".

    Everyone comes through this before?

    Please see the link for the image of the column

    http://ImageShack.us/photo/my-images/850/columndefect5070.jpg/
    http://img850.imageshack.us/img850/4353/columndefect5070.jpg

    Thank you guys

    Hello

    I suspect some other developers might have renamed this column and saved as 'System wide default' parameter.

    I hope this helps.

    Thank you
    Diakité

Maybe you are looking for

  • Satellite U300 and WXP driver support

    Browsing the Web site of Toshiba, it seems that this laptop has driver support Windows XP.It came with Vista, but I have some software I need to run that does not work under Vista. It's a Satellite U300-13U, model: PSU30E-04L02QKS.On the downloads pa

  • Of 10.11.2 to 10.11.1

    Unfortunately I upgraded from 10.11.1 in 10.11.2 a few weeks ago. After that, my Airplay is very unstable (which has always been the case, with the exception of 10.11.1). How to get back (downgrade) to 10.11.1?

  • [BIOS password recovery] HP Pavilion G6-2303sq

    Hello HP technical support! Let me tell you a little story about how I closed my computer. All started ten minutes ago, when I tried to put my white BIOS password, hoping to remove it that way. I saved and then tried to start the machine. To my surpr

  • Windows Mail response/redirect email questions

    I have problems with Windows Live Mail. Running windows 7. I get e-mails very well and I can open and read them ok. However, when I try to reply to the email or transfer it Windows Live Mail stops and restarts. Have restarted, made sure all updates i

  • On 31/10/09 bought blackBerry Smartphones has BeWeather (order # 7054940214)...

    purchased 31/10/09 BeWeather(order # XXXXXXXXXX) had trouble with phone before backup and lost all data on the phone. Is any way to get this app again without having to pay since it was purchased only a few days ago? (deleted order No.)