Automatic renaming of columns

Hi,
Due to new busines requirements, I have to comment couple of tables in the query object. When I start compiling after commenting out the conditions and tables, it starts throwing errors BAD BIND VARIABLE xxx NOT DEFINED. Report has automatically renamed a lot of columns by itself, for e.g. a column called name has been renamed to name1. There are PL/SQL programs which refer the column name. Now when I attempt to compile the report it starts throwing the error BAD BIND VARIABLE name NOT DEFINED because it has been renamed to name1, automatically by reports. I am baffelled at this as the columns does not have any relationship to the commented out tables. Is there a way to avoid this.
Thanks,
Bharath

The best way to avoid this is to alias the columns in the query. Whenever you make a change to the query, reports reparses the query. If other columns exist with the same name then a numeric suffix will be added. You could also apply the latest patch set (patch 10), as some fixes were made in this area.
Thanks,
Danny

Similar Messages

  • When rename a column...

    Hi,
    When I rename a column in presentation layer, I will have to go through each of the reports that use the column, drop the old column and pull the new one into the request and reformatting,... etc. There has to be an easier way to do this.
    Appreciate any ideas, suggestions.
    May

    Thank you all for your kind reply.
    I experimented with your comments a bit, and this is what I found:
    - Renaming columns or presentation tables did not seem to affect any of my reports even if I have formulas "case when ..." in my report. It automatically creates an alias.
    - Renaming a presentation catalog/subject area ( folder in presentation layer) did not affect reports either. But if you want to modify the report, say, add a new column, then you will have problem. When you edit the report, on the left side where it used to show the presentation folder, now shows this message "Either you do not have permission to use the subject area MYOLDSUBJECT within Answers, or the subject area does not exist.". I double checked my subject area folder, it does have an alias which is the old name.
    May

  • How to rename a column

    i cannot rename a column in a table;
    i tried so many sql statements but with no results;
    i use the following:
    alter table tablename rename column old_column to new_columnname;

    In other case you can create a view on that table to rename the columns like
    SQL> select empno, ename, job from scott.emp;
         EMPNO ENAME      JOB
          7369 SMITH      CLERK
          7499 ALLEN      SALESMAN
          7521 WARD       SALESMAN
          7566 JONES      MANAGER
          7654 MARTIN     SALESMAN
          7698 BLAKE      MANAGER
          7782 CLARK      MANAGER
          7788 SCOTT      ANALYST
          7839 KING       PRESIDENT
          7844 TURNER     SALESMAN
          7876 ADAMS      CLERK
         EMPNO ENAME      JOB
          7900 JAMES      CLERK
          7902 FORD       ANALYST
          7934 MILLER     CLERK
    14 rows selected.
    SQL> create or replace view emp_vw as select empno as emp_no, Ename as Employee_Name, job from scott.emp;
    View created.
    SQL> select * from emp_vw;
        EMP_NO EMPLOYEE_NAME        JOB
          7369 SMITH                CLERK
          7499 ALLEN                SALESMAN
          7521 WARD                 SALESMAN
          7566 JONES                MANAGER
          7654 MARTIN               SALESMAN
          7698 BLAKE                MANAGER
          7782 CLARK                MANAGER
          7788 SCOTT                ANALYST
          7839 KING                 PRESIDENT
          7844 TURNER               SALESMAN
          7876 ADAMS                CLERK
        EMP_NO EMPLOYEE_NAME        JOB
          7900 JAMES                CLERK
          7902 FORD                 ANALYST
          7934 MILLER               CLERK
    14 rows selected.
    SQL>

  • How to rename a column name in a table? Thanks first!

    I tried to drop a column age from table student by writing the
    following in the sql plus environment as :
    SQL> alter table student drop column age ;
    but I found the following error
    ORA-00905: 缺少关键字 (Lack of Key word)
    I have oracle enterprise edition 8.0.5 installed at windows 2000
    thank you
    And I want to know how to rename a column name in a table?
    thanks

    In Oracle 8i, your syntax would have worked.  However, if I
    recall correctly, in Oracle 8.0, you can't rename or drop a
    column directly.  One way to get around that problem is to
    create another table based on a select statement from your
    original table, providing the new column name as an alias if you
    want to change the column name, or omitting that column from the
    select statement if you just want to drop it.  Then drop the
    original table.  Then re-create the original table based on a
    select statement from the other table.  Then you can drop the
    other table.  Here is an example:
    CREATE TABLE temporary_table_name
    AS
    SELECT age AS new_column_name,
           other_columns
    FROM   student
    DROP TABLE student
    CREATE TABLE student
    AS
    SELECT *
    FROM   temporary_table_name
    DROP TABLE temporary_table_name
    Something that you need to consider before doing this is
    dependencies.  You need to make a list of all your dependecies
    before you do this, so that you can re-create them afterwards. 
    If there are a lot of them, it might be worthwhile to do
    something else, like creating a view with an alias for the
    column or just providing an alias in a select.  It depends on
    what you need the different column name for.

  • How to rename the column name in oracle 8i?

    hi,
    Does anyone know how to rename the column name in oracle 8i?My method was drop the relationship key first then delete the old column,finally add the new column.
    Thanks for your replay.
    jing

    There is no facilty to rename a column name in Oracle 8i. This is possible from Oracle 9.2 version onwards.
    For you task one example given below.
    Example:-
    Already existed table is ITEMS
    columns in ITEMS are ITID, ITEMNAME.
    But instead of ITID I want ITEMID.
    Solution:-
    step 1 :- create table items_dup
    as select itid itemid, itemname from items;
    step 2 :- drop table items;
    step 3 :- rename items_dup to items;
    Result:-
    ITEMS table contains columns ITEMID, ITEMNAME

  • How to rename a column name

    dear friends,
    Is there any other way to rename a column without creating another table with the requested colum name and dropping the eariler table after inserting the values from it.

    SQL> desc t2
    Name                                      Null?    Type
    ID2                                                NUMBER
    SQL> alter table t2 rename column id2 to id;
    Table altered.
    SQL> desc t2
    Name                                      Null?    Type
    ID                                                 NUMBERRgds.
    ...but don't forget side effects !
    SQL> create or replace view v2 as select id from t2;
    View created.
    SQL> select status from user_objects where object_name = 'V2';
    STATUS
    VALID
    SQL> alter table t2 rename column id to id2;
    Table altered.
    SQL> select status from user_objects where object_name = 'V2';
    STATUS
    INVALID
    SQL> select * from v2;
    select * from v2
    ERROR at line 1:
    ORA-04063: view "SCOTT.V2" has errorsMessage was edited by:
    dnikiforov

  • How can i change the settings so that before download the firefox gives a propmt that same file name already exists, instead of automatically renaming duplicate files by adding .1 suffix?

    When I download a file, if a file of similar name already exists in the same download folder, the firefox downloads the file and renames it by adding numeric .1 to the file name.
    I want the firebox to give me a prompt that similar file already exist, rather than automatically renaming it by adding suffix .1.

    Downloads Options
    * https://support.mozilla.com/en-US/kb/Options%20window%20-%20General%20panel#w_downloads
    Unable to Download or Save files
    * https://support.mozilla.com/en-US/kb/Unable%20to%20download%20or%20save%20files
    Check and tell if its working.

  • Rename the column names in Embedded BPM Worklist

    Hi,
    I have embedded the BPM worklist in ADF Page.
    My requirement is to rename the column names in the task list.
    For example, the column 'state' should be renamed as 'Status' and the column 'from User' should be renamed as 'From'.
    Is there any possibility to achieve this? Please let me know.
    Regards,
    Tamil

    See if the solution in this post helps -
    Re: Customize workspaceAlso , its better to post these questions in the BPM forum -
    Business Process Management SuiteEdited by: Sudipto Desmukh on Apr 27, 2012 8:57 AM

  • Can we rename a column in a table ?

    I am faced with a situation where I need to rename the column in a particular table. The version of Oracle is 8.1.7.2.0
    Is there a DDL clause for renaming a column, or does it have to be done the conventional way - drop the column ( you want to rename ) and add a new column (with new name) ?

    Direct column renaming is not available unti 9iR2. Prior to that, yes, you need to:
    1) Add a column with the new name
    2) Update new column with old column data
    3) Drop old column

  • Can we rename a column in Oracle 8.1.7.4 version?

    Can we rename a column in Oracle 8.1.7.4 version?

    Hi,
    There is no direct way of doing it but if you have DBA access then try this: (these 2 tables are in SYS user)
    SELECT obj#
    FROM obj$
    WHERE name = 'your table name';
    SELECT col#
    FROM col$
    WHERE obj# = obj# from above query
    AND name = 'your column name';
    UPDATE col$
    SET name = 'new column name'
    WHERE obj# = obj# from first query
    AND col# = col# from above query;
    And this change might not be immediately visible.
    So once you are done with above, run the following:
    ALTER SYSTEM FLUSH SHARED_POOL;
    Then go to the respective user and describe the table and you will see new name. There might be some mistake in the above queries as I could not test it because I don't have ORACLE on my current system.
    Hope this helps.
    Regards
    -Rajeev

  • Rename a column in query

    Hello,
    I want to rename a column in a query. What are the possible method?
    1. We use "AS" to rename.
    E.g.
    SQL> select sysdate as "Today's date" from dual;
    Today's d
    12-JUN-07
    The above query returns "Today's Date". But the column name in the result set is not colplete "Today's Date" Why?
    Thanks.

    It' because SQL*Plus truncates it, try this
    col "Today's date" on format a12
    SQL> select sysdate as "Today's date" from dual;
    Today's date
    12-JUN-07
    Regards,
    PP
    Message was edited by:
    porzer

  • Automatically renaming an uploaded file

    I am creating a page to upload files, as well as to submit
    data about the file to be stored in a database. When the form data
    is submitted, how can I program it to automatically rename the
    uploaded file to the ID or Key number of the row in the database in
    which the file's information is stored?

    What scripting language are you using?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "AngryCloud" <[email protected]> wrote in
    message
    news:evmlp4$lfh$[email protected]..
    >I am creating a page to upload files, as well as to
    submit data about the
    >file
    > to be stored in a database. When the form data is
    submitted, how can I
    > program
    > it to automatically rename the uploaded file to the ID
    or Key number of
    > the row
    > in the database in which the file's information is
    stored?
    >

  • TO Rename a column name

    Hi all,
    I have a table employee with columns
    'employee_id',
    'employee_name'
    ' employee_city' ( Note the spaces before the column name )
    The table is created successfully.
    But i cant to able to retreive the data by specifying the column name..
    eg: select employee_city from employee.
    It throws an error.
    Please send me a solution to reanme the column name, so that it should not contain any spaces at start & end.
    Thanks & Regards,
    Hariharan ST

    Obviously the table was created this way:
    SQL>create table testtab
    "employee_id" number,
    "employee_name" varchar2(100),
    " employee_city" varchar2(100)
    Table created.
    SQL>desc testtab
    Name                                      Null?    Type
    employee_id                                        NUMBER
    employee_name                                      VARCHAR2(100)
      employee_city                                     VARCHAR2(100)Note the double quotes: Columns that are created this way can only be selected using double quotes, too:
    SQL>select employee_city from testtab;
    select employee_city from testtab
    ERROR at line 1:
    ORA-00904: "EMPLOYEE_CITY": invalid identifier
    SQL>select " employee_city" from testtab;
    employee_city
    Chicago
    SQL>This of course is a very bad idea. Dave already showed you how to rename the columns.
    Regards,
    Gerd

  • Rename a column name

    Hi All,
    Can rename a column name permanantly.?
    Please clarify

    Yes. It is possible
    alter table some_table rename column column_name to new_column_name;
    Regards
    K.Rajkumar

  • Odi REVERSE ENGINEERING AFTER RENAMING  A COLUMN.

    hi,
    i have altered the table definition .
    i have just renamed the columns name .
    now when i reverse engineer , the model contains new as well old columns.
    is there any way by which i can rename existing columns to the new one.

    No. You cannot.
    ODI doesnt know what your intentions were with the column renames.
    It doesnt remove the columns during reverse engineering that dont exist in the database because the columns in ODI maybe used in the mappings.
    The only way you can do is by doing it manually in ODI by renaming them

Maybe you are looking for

  • Bitwise Operators & IP Addresses

    I am trying to determine an ip address class type ie: Class A - 0 followed by 7 bits Class B - 0 followed by 6 bits Class C - 110 followed by 5 bits The IP address & Subnet Mask are entered by the user By ANDING the IP address and the subnet mask I h

  • Brspace -f tbreorg -t "*" -a cleanup command

    Hi All we have  around 124GB for stuck #$ table after online reorg fail,can you please update me how safe is command brspace -f tbreorg -t "*" -a cleanup  command in running system?, and its impact on EDI40 table? Thanks Dinesh

  • InDesign says file still open when it is not

    I have experienced this poblem in InDesign CS4 & 5. It seems worse in CS5. When I finish with project I am working on and close out then I want to move the folder, rename it or delete it. I am unable to do this because the error message says there is

  • If you are running skype with video.....

    Don't install the OTA update. Many of us found that wonderful leaked version of skype back in april....the one that could actually make video calls. The most recent update renders it useless if you're not having reboot issues then I have yet to see t

  • Alternate HTML content should be placed here. This content requires the Adobe Flash Player

    Somehow today I get this message when I am tring to open website with flash player : Alternate HTML content should be placed here. This content requires the Adobe Flash Player Yesterday was ok but not today ! with netsacpe and mozila it's ok but with