Change datatype

I changed the data type of column of a table, but the data model of the report keeps the previous data type of the column.
How can change it to the new data type ?

Force the query in the data model to requery to set the datatype on the column to the new one. Usually adding a return in the query should do the trick.
--Lauren                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Can we  change datatype  without deleting records ?

    Hi all ;
    Without deleting records in a table  , can we  change datatype in oracle 10g and 11g ?
    SQL> desc emp
    Name                                      Null?    Type
    NO                                                 NUMBER
    NAME                                            VARCHAR2(10)
    CITY                                               VARCHAR2(15)
    DEP_ID                                          NUMBER
    SQL> select * from emp;
            NO NAME       CITY                DEP_ID
            1   madhir   calcutta                10
    SQL> alter table emp modify(dep_id  varchar2(5));
    alter table emp modify(dep_id varchar2(5))
    ERROR at line 1:
    ORA-01439: column to be modified must be empty to change datatype
    SQL>  select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

    See 'Modifying an Existing Column Definition' in the DBA Guide
    http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables006.htm#i1006645
    Use the ALTER TABLE...MODIFY statement to modify an existing column definition. You can modify column datatype, default value, column constraint, column expression (for virtual columns) and column encryption.
    You can increase the length of an existing column, or decrease it, if all existing data satisfies the new length. You can change a column from byte semantics to CHAR semantics or vice versa. You must set the initialization parameter BLANK_TRIMMING=TRUE to decrease the length of a non-empty CHAR column.
    If you are modifying a table to increase the length of a column of datatype CHAR, realize that this can be a time consuming operation and can require substantial additional storage, especially if the table contains many rows. This is because the CHAR value in each row must be blank-padded to satisfy the new column length.
    And the ALTER TABLE statement in the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_3001.htm#SQLRF01001
    modify_col_properties
    Use this clause to modify the properties of the column. Any of the optional parts of the column definition (datatype, default value, or constraint) that you omit from this clause remain unchanged.
    datatype You can change the datatype of any column if all rows of the column contain nulls. However, if you change the datatype of a column in a materialized view container table, then Oracle Database invalidates the corresponding materialized view.
    You can omit the datatype only if the statement also designates the column as part of the foreign key of a referential integrity constraint. The database automatically assigns the column the same datatype as the corresponding column of the referenced key of the referential integrity constraint.
    You can always increase the size of a character or raw column or the precision of a numeric column, whether or not all the rows contain nulls. You can reduce the size of a datatype of a column as long as the change does not require data to be modified.The database scans existing data and returns an error if data exists that exceeds the new length limit.

  • Function to change DataType member names

    I was wondering if (TestStand 4.2) contains the ability to call all referrences to a Data Type member used in a sequence to be changed to the new name if that DataType member is renamed in the MyTypes.ini file?
    Solved!
    Go to Solution.

    The short answer is no, and it's a difficult problem if you are talking about including source files of code modules written in various different programming languages, and still a semi-difficult problem if you are not because of the possibility of lookupstrings appearing in unsual places or being used in unusual ways.
    There are however 2 features that exist in TestStand 4.2 that should help with this.
    1) Find/Replace in files - If the previous name is fairly unique this should be easy, if it's not then perhaps with clever usage of regular expressions in the search string it should still be doable.
    2) Analyzer - this should help you find places that need fixing or that you might have missed doing 1) above.
    Hope this helps,
    -Doug

  • Changing datatype, afterwards Message-Mapping cannot produce target element

    Hi,
    we use PI/700.
    I changed a working system by changing a datatype of an existing message (adding a new element). My interface mapping contains two mappings: an XSL-Mapping and afterwards a Message-Mapping.
    My interface mapping looks like this:
    Message-Type A ->
          XSL-Mapping ->
    Message-Type B ->
          Message-Mapping ->
    Message-Type B
    When I test each mapping alone everything works fine (with the new element I added).
    But if I test my interface mapping in IBD with both mappings together, I'll get an error:
    "Cannot produce target element /MT_EDM_OUTBOUND_LASTGANG_TO_SAP/LASTGANG/MASSEINHEIT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd".
    Is it possible that XI has problems in refreshing the XSDs?
    I tried this:
    (1) I changed my Message-Mapping and now all elements are mapped 1:1 -> no success!
    (2) Later I changed my Message-Mapping and build in "exists" with "if" to check whether the element "MASSEINHEIT" is generated by the XSL-Mapping -> It doesn't exists (??? - WHY? - when I test it, everything works fine)
    (2) Afterwards I changed my interface mapping and take only the XSL-Mapping (without the following Message-Mapping) -> the element "MASSEINHEIT" exists now!
    I'm totally confused!
    Any ideas?
    Regards
    Wolfgang Hummel

    Hi,
    If you have made structural changes to the data type..such as number of fields have decreased/increased..or some new fld altogether, then you have to activate the datatype..goto message mapping and then re-do the mapping...but if you have made "typo" changes like names have been changed, etc..then i think it should be alrite..i have sometimes made changes to my datatype, but after activating it, i had to redo the mapping..that was it!...the rest would fall into place:) No changes had to be made in the interface mapping..
    Regards,
    Sushumna

  • Change datatype for field of report

    I have a report that uses a Stored procedure for a datasource - it originally had to fields that were "number" as the field datatype and took an integer from the Sp.
    I've since changed the datatype for that field from int to smallmoney.  How can i refresh these links for the report without deleting the data source and loosing the report as it is now. The names stayed the same.  Only the data type for two fields changed from int to smallmoney.
    Thank you!!
    Harry

    use set data source location and update the conection
    regards,
    Raghavendra

  • WLCS 3.5- changing datatypes

    Hi,
    I want to change the datatype for the ID field in the WLCS_ENTITY_ID table
    from numeric to varchar.
    Please let me know if this is possible and what all changes i have make in
    the underlying EJBs.
    Thanks,
    Kunal

    No, a future version of WLCS will be compatible with WLS 6.1. Check
    http://www.bea.com for regular updates on availability of the next WLCS
    release which will be certified on WLS 6.1.
    Mohammed Khan wrote:
    Can I install WLCS 3.5 on WLS 6.1?

  • Add/change datatype column (scripting)

    Hello,
    I am writing a script to add default columns and their values to tables. So far for me it's possible to add columns to an existing table in the model.
    Next I want to add the value for datatype. I found out there's a method called getDataType(). Until now, I didn't find the 'setter; for this property.
    Like other scripts, I started with create a table with columns and then using the API to read the values.
    A simplified version of my code:
    // get columns array
    var myTab = model.getTableSet().getByName("T_POSITIONS");
    colArray = myTab.getElementsCollection().toArray();
    // loop over columns
    for(i = 0; i < colArray.length; i++){
      var dataType = colArray[i].getDataType();
      model.getAppView().log(colArray[i] + " has datatype " + dataType );
      colArray[i].setDataType("VARCHAR2 (1)");
    An error occurs when I want to run this script: Cannot find function setDataType in object ID.
    I cannot find the right method to add/modify the datatype property.
    Any tip would be appreciated.

    Hi Bart,
    here is what is in XML file for column:
    <Column name="FIRST_NAME" id="5E8F1EEC-287E-6496-C568-DFBF6321BD91">
    <sourceConnName>FDB11R21</sourceConnName>
    <sourceObjSchema>EMPLOYEES</sourceObjSchema>
    <sourceObjName>FIRST_NAME</sourceObjName>
    <createdBy></createdBy>
    <createdTime>2015-01-13 12:45:08 UTC</createdTime>
    <commentInRDBMS>First name of the employee. A not null column.</commentInRDBMS>
    <ownerDesignName>HR_870</ownerDesignName>
    <nullsAllowed>true</nullsAllowed>
    <useDomainConstraints>false</useDomainConstraints>
    <use>1</use>
    <logicalDatatype>LOGDT024</logicalDatatype>
    <dataTypeSize>20 BYTE</dataTypeSize>
    <autoIncrementCycle>false</autoIncrementCycle>
    </Column>
    <dataTypeSize>20 BYTE</dataTypeSize>
    So you need to set size to "20 BYTE" or "20 CHAR"
    Philip

  • How do i change datatype to text from number from an excel input file

    I have a simple 2 column excel spreadsheet with 29k rows.
    The 1st column does contain numbers, but are really text and not to be treated as number, so i selected format cells/text and then saved the file as an excel .xls file.
    However whenever i use this data source in crystal, the 1st column/field is always datatype number, and i do not see the text type fields, even if i create a formula totext(datafield)
    .How, or what can i do to the original data source to see both columns as text in crystal ? i have tried saving as .csv.
    i have crystal 12.3.0.601 sp3

    Hi John,
    In Excel if first value i.e. first record value is a number (even though you format as text) it will consider as number.  So, try to make your first record in excel as text field.
    Example :
    123-- takes as number
    '123-- try this --start with a single quote and followed by number.
    or
    A123--This will make this filed as text.
    Thanks,
    Sastry

  • Change datatype in xml output

    Hi all !
    Is it possible to force the display of data type in another format in the xml output :
    <G_TP>
         <YTD_IND>4.1976983*E7*</YTD_IND> ==> 41976983
         <YTD_PREC_IND>3.909673*E7*</YTD_PREC_IND> ==> 39096730
    </G_TP>
    This format causes an error when using the function choose.
    Best regards,
    Ben

    No idea ?

  • Can datatype of a field be changed

    Hi
    I have a live table, but i need to change a field from type number(1) to type number(3). Is there any way to change datatype? Or do i need to delete field and then add the new one?
    Thanks
    Mark

    Here the general way how to change the Oracle table:
    SQL> create table test (col1 number(1));
    Table created.
    SQL> alter table test modify (col1 number(3));
    Table altered.
    SQL> desc test;
    Name Null? Type
    COL1 NUMBER(3)
    But for a live system it would be better to
    - first export the table
    - truncate it
    - change the precision using the alter command
    - import it.
    See also Metalink note:111035.1

  • How to change the datatype in the oracle table?

    Hi,
    I need to change the datatype of the column in Oracle table. That column contains some data. I do not want to loose those data.
    For altering a table/column condition are:
    1. either table should not contain any data.
    2. either that column should not contain any data.
    Please suggest how i can handle this situation.
    Thanks.

    Hello,
    Suppose you have currently datatype of column as VARCHAR and you want to convert it in NUMBER. Do following
    1-Add another column with NUMBER datatype in your table.
    ALTER table tablename
    ADD testcolumn NUMBER;2-Update your actual column data to this test column.
    UPDATE tablename
    SET testcolumn = actualcolumn;
    COMMIT;3-Update your actual column data to null;
    UPDATE tablename
    SET actualcolumn = NULL;
    COMMIT;4-Change Datatype of actual column.
    ALTER table tablename
    MODIFY actualcolumn NUMBER;5-Update actualcolumn to testcolumn
    UPDATE tablename
    SET actualcolumn = testcolumn;
    COMMIT;
    please mark if it help you or correct
    Regards,
    Danish

  • Column Datatype Change

    Hi,
    I created a table with some 10 columns earlier, now one of the column datatype needs to be changed to varchar2(2), which actually in the database it is number.
    The thing the table now contains 10 records. Its not allowing me to modify the column datatype, because it has rows in it. How to change the column datatype with data in the table. Pl reply ASAP.
    Thanks

    See the following example.
    Let's modify deptno column from number to varchar2 :
    SCOTT@demo102> desc emp2
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO NUMBER(2)
    SCOTT@demo102> select count(*) from emp2;
      COUNT(*)
            14
    SCOTT@demo102> alter table emp2 modify deptno varchar2(2);
    alter table emp2 modify deptno varchar2(2)
    ERROR at line 1:
    ORA-01439: column to be modified must be empty to change datatype
    SCOTT@demo102> alter table emp2[b] add deptno2 varchar2(2);
    Table altered.
    SCOTT@demo102> update emp2 set deptno2=deptno;
    14 rows updated.
    SCOTT@demo102> commit;
    Commit complete.
    SCOTT@demo102> alter table emp2 drop column deptno
    SCOTT@demo102> /
    Table altered.
    SCOTT@demo102> alter table emp2 rename column deptno2 to deptno
    SCOTT@demo102> /
    Table altered.
    SCOTT@demo102> desc emp2
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO VARCHAR2(2)
    SCOTT@demo102>
    Pl reply ASAP.Since this is saturday, and saturday is an unworked day in most of countries, and since this forum is based on volunteers, you cannot ask ASAP...
    Nicolas.

  • Database Adapter: NVARCHAR2 datatype in stored procedure

    Hi,
    when I try to define partner link as database adapter - call stored procedure with datatype NVARCHAR2, I'm getting following error:
    Error while writing wsdl file .....
    Exception: WSDLException: faultCode=OTHER_ERROR: Database type is either not supported or is not implemented. Parameter INP_TEL is of type NVARCHAR2 which is either not supported or not an implemented datatype.
    Is it possible to wokaround this problem without changing datatype nvarchar(utf16) to varchar2(iso8859p2)?
    There should be no difference between mapping of varchar and nvarchar to string at BPEL side.
    BPEL version: 10.1.2.0.0
    Regards
    Karel

    Better workaround is to define stored procedure with varchar datatype, generate wsdl
    and then change stored procedure definition to nvarchar.
    This works and mapping (java) string to (oracle) nvarchar2 is correct.
    But sometimes this could be difficult ( invalidations of thousands objects).
    Maybe there could be better solution like add mapping to some files ???
    Karel

  • How to change ExchangeRate Type Property in EPMA

    Hi all,
    I would like to change the ExchangeRate Type Property (from NONE to AVERAGE) in EPMA Accounts Dimension (local dimension) for a lev0 member, but the Property is read-only (and it is flagged as "DERIVED"). How can I change the Property or another question where the fuck is the Source for the inherited value????
    Thanks in advance
    André
    P.S.: If I create a new lev0 Member the property is read-only, too.
    Edited by: Andre on 11.03.2013 14:55

    Ok, I could find it - if you change DataType to currency (was unspecified) than you can change the ExchangeRate Type.
    Nevetheless many thanks to all :-)

  • Change Data type column - Performance of Index in Oracle 10g

    Hi,
    I have a table with too many rows (over 2000000 rows) . I have changed datatype (NUMBER to VARCHAR2) of an indexed column (the index is only for this column), using a temporay backup table:
    CREATE TABLE BKTABLE AS SELECT FIELD, ROWID AS IDROW FROM ORIGNALTABLE;
    UPDATE ORIGNALTABLE SET FIELD = NULL;
    ALTER ORIGNALTABLE MODIFY FIELD VARCHAR2(256);
    UPDATE ORIGNALTABLE A SET FIELD = (SELECT FIELD FROM BKTABLE B WHERE B.IDROW = A.IDROW);
    This way worked OK.
    There is any performance knowed issue over an index of ORIGNALTABLE? Need rebuild this index?
    Thks!

    Need rebuild this index? YES
    ALWAYS
    Post Operating System (OS) name & version for DB server system.
    Post results of
    SELECT * from v$version
    or post Oracle version to 4 decimal places

Maybe you are looking for

  • Problem with iphone showing battery ussage?

    I just recently noticed that my iphone doesnn't show the battery ussage any more. i reset the phone and still doesn't show it. anyone got any idea's or should i just return it to the applestore.

  • # coming when I select data from oracle table using Native SQL

    Hi Gurus, I am selecting 'First name' from oracle table directly using native sql. I am fetching 65000 records but 10+ records having '#' at the end of firstname. For eg: John#. But oracle team couldn't find '#' in their table for those records. What

  • Portege 2010 - Cannot find the END button in order to save BIOS changes

    I couldnt save my Bios setup because i can't find the end keys to save the changes. I tried to hit all the keys in keyboard but none of it save the settings. Can you show me the keyboard diagram showing the end keys? I have toshiba portege 2001 serie

  • Extended withholding tax for customer tds

    I WANT CONFIGURATION STEPS FOR CUSTOMER TDS ( CREDIT MEMO)

  • Productive Client

    Hi experts, I am developing interfaces, and testing them in an XI development system (client 100). I have received from the basis team the XI productive system and they told me i have to request them to create a client. I think they will mean i have