Create table of type integer

How can we create a table of type integer in MDM. (what the code should be?)
When I create a table, it only allows type Text.
Thanks

Hi R.N,
we can create table of type Flat, Hierarachy, Taxanomy, Qualified Flat and Families.
you are talking about field, by default whenever you create any table a field "Name" of type Text get generated, but here if you want this field to be integer, just create new field by right clickin "Add Field" by going into table in which you want that field. here you can give any name to that field and select type Integer . if you want only Integer field into your table then also make it "Display Field" only after that you can delete field "Name" of type Text.
Note: For creating Table Click on your repository where you can see and create tables and for field just click on any table where you want to include that field into table
Code takes important incase of Java APis and ABAP Apis. where APIs recognise table and fields with their code only.
Remember to unload repository before creating Table and Fields and then load it.
Hope it helps you,
Mandeep Saini
Edited by: Mandeep Saini on May 6, 2008 10:43 AM
Edited by: Mandeep Saini on May 6, 2008 10:48 AM

Similar Messages

  • CREATE TABLE  integer  replaced by  NUMBER(38)..

    Hi,
    I am using Oracle 11.1.0.6.O. Create a table using following query.
    CREATE TABLE VENDOR_MASTER_new (
    VENDOR_ID integer,
    VENDOE_NAME VARCHAR2(50 CHAR),
    STATUS smallint DEFAULT 1
    Table Created.
    check the table structure using DESC VENDOR_MASTER_new
    It showing
    SQL> desc vendor_master_new
    Name Null? Type
    VENDOR_ID NUMBER(38)
    VENDOE_NAME VARCHAR2(50 CHAR)
    STATUS NUMBER(38)
    SQL>
    integer replaced by NUMBER(38)..
    if it is possible to make integer. help me resolve this issue.

    954124 wrote:
    Hi,
    I am using Oracle 11.1.0.6.O. Create a table using following query.
    CREATE TABLE VENDOR_MASTER_new (
    VENDOR_ID integer,
    VENDOE_NAME VARCHAR2(50 CHAR),
    STATUS smallint DEFAULT 1
    Table Created.
    check the table structure using DESC VENDOR_MASTER_new
    It showing
    SQL> desc vendor_master_new
    Name Null? Type
    VENDOR_ID NUMBER(38)
    VENDOE_NAME VARCHAR2(50 CHAR)
    STATUS NUMBER(38)
    SQL>
    integer replaced by NUMBER(38)..
    if it is possible to make integer. help me resolve this issue.
    That should be fine as number(38) is having one much bigger range than integer.

  • JDBB SQL create table PreparedStatement

    Hi
    How can I use preparedSatement to create a variable table?
    PreparedStatement ps=con.prepareStatement("what is the SQL Code for a table named [?]");
    ps.setString(1, tableName);
    ResultSet r = ps.executeQuery();

    I think it'd be the usual SQL:
    CREATE TABLE X
       FOO INTEGER,
       BAR VARCHAR2(80),
       etc.
    )The types would have to be correct for your RDB.
    I don't think it'd be a query, so it wouldn't return a ResultSet. I believe it's like an UPDATE, so you'd call executeUpdate on the statement. - MOD

  • Create table in DB2

    I use JDBC Type 4 driver to connect to Db2.
    But the statement always trigger Exception.
    SQLException DB2 SQL error SQLCODE:-104
    SQLSTATE:42601
    Did I configure DB2 wrong?
    This statement is ok for oracle and mysql.
    CREATE TABLE department
    dept_id integer NOT NUlL,
    dept_name varchar(20) NOT NULL,
    location varchar(5)

    sorry,but create table or insert always trigger
    exception.It should work at least with the app-driver. I don't know if type 4 driver (is this the pure-java driver!?) supports it. But with the
    COM.ibm.db2.jdbc.app.DB2Driver create table works fine.
    I would also suggest problem is with the strange execution used. Don't use prepared statement or getResultSet() and executeQuery() for anything other than SELECT. For DDL statements you should use execute() only. For DML you can use executeUpdate() to get number of rows updated (if supported by driver).

  • ORA-00904 on create table with xmltype column

    Hi,
    I am trying to create a table with syntax
    CREATE TABLE ss_test(docid integer primary key, content varchar2(4000),acl XMLType)
    XMLType column acl store as object relational
    XMLSchema "acl.xsd" element "acl"
    varray xmldata."ace" store as table ace_tab;
    and getting ORA-00904.
    acl.xsd is registered as
    begin
    dbms_xmlschema.registerschema('acl.xsd',
    ' <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb">
    <xs:element name="acl" xdb:SQLType="ACL_TYPE">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ace" maxOccurs="100">
    <xs:complexType>
    <xs:attribute name="id" type="xs:integer"/>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>',true,true,false,false);
    end;
    Couldnt figure out whats wrong with the syntax. Any pointers ?
    Thanks,
    Rakesh

    Hmmmm ... I don't know if I should smile or frown with the implication that I am an OO guy :D :D
    Most of my colleagues when I started working as a software engineer, treated me as too low-level because of my C background (started doing C in 1985).
    In my last job, my colleagues hated my guts because I was asking them to squeeze every bit of performance out of C++ by using STL which is definitely not OO (although C++ is).
    My current colleagues treat me as a DB guru (which I most definitely am not) and they overlook/forget the fact that most of them use Java libraries in their projects, that I wrote for them !
    I am inclined to believe that I do not fall into any category in the end...
    The only thing I am for sure - and I am proud of it - is inquisitive. I want to know everything there is about the tools I use, and so I end up spending hours and hours investigating... (Microsoft found that out the hard way when I filed 16 bug reports in 8 days when Visual C++ 6 came out ! Not that it hurt them though...)
    This is where my confession ends (and my working on the XML validator starts...)
    Καληνύχτα Marco
    Philip (Φίλιππος in Greek)
    PS: I did not follow the last solution anyway. I just wanted to verify its operability ;)

  • How to create index not unique at the time of the CREATE TABLE

    Hi,
    I am trying to find out how in Oracle create secondary indexes that can accept duplicated into the CREATE TABLE statement, without have to execute a CREATE INDEX separately.
    As far I can see the only syntax accepted by Oracle 9i to create more than one index at the time of the table creation is:
    CREATE TABLE test_tab (x INTEGER, y INTEGER, z INTEGER PRIMARY KEY(x,y), UNIQUE(z))
    But, in my case I need to have the unicity only for the primary key, but not for the second index, that I would like to have not unique.
    How to do that inside of the CREATE TABLE statement?
    Any help?
    Thanks a lot in advance.

    To create an index automatically (not constraint related) , you will need to have an 'event' trigger on the schema that will (IE: detecting a table create/drop matching ARCHIVE_%) , generate the appropriate SQL required (create index sql) and pass THAT to a DBMS_JOB.
    Make sure you have job queue's enabled.
    This was the ONLY way that I could re-create a view automatically as new tables were created that matched a criteria IE ARCHIVE_JAN06, ARCHIVE_FEB06 etc.
    The application's "archiving" method created and was thus aware of these tables and permitted searching within 'archived' data, but 3rd party reporting applications needed to see a view encompassing all data, regardless of the tables involved. The view automatically created was a 'union_all' of all tables concerned.

  • Error while creating arrayllist of datatype integer in java1.6

    hello... i had a problem while creating arraylist of type integer and float ext.. except String in java1.6.. i can create of type string..its working... and in java1.5 i can create integer type arraylist... is it possible to create arraylist of datatype integer in java1.6?... reply asap

    sugan wrote:
    hello... i had a problem while creating arraylist of type integer and float ext.. except String in java1.6.. i can create of type string..its working... and in java1.5 i can create integer type arraylist... is it possible to create arraylist of datatype integer in java1.6?... reply asap
    Be back in a few hours.

  • How to create indexes using CREATE TABLE statement

    Hi,
    Can anyone please tell me how to create indexes using CREATE TABLE staement? This point is part SQL Expert exam (1Z0-047) and please guide me to use which books for this particular exam.
    Thanks in advance.

    Can anyone please tell me how to create indexes using CREATE TABLE staement?e.g. creating a primary key or a unique constraint will generate indexes along with the create table syntax:
    SQL> create table t (a integer primary key, b integer unique)
    Table created.
    SQL> select   index_name, index_type, uniqueness
      from   user_indexes
    where   table_name = 'T'
    INDEX_NAME                     INDEX_TYPE                  UNIQUENES
    SYS_C0016575                   NORMAL                      UNIQUE  
    SYS_C0016574                   NORMAL                      UNIQUE  
    2 rows selected.

  • Creating an auto incrementing field with CREATE TABLE from Java

    I'm using the "sun.jdbc.odbc.JdbcOdbcDriver" to get a connection towards an ODBC data source that's linked to a Access (.mdb) database.
    I've tried various combinations in my CREATE TABLE statement execution in order to create a table with an auto incrementing integer but neither of them work, not even the most obvious one:
    stmt.executeUpdate("CREATE TABLE mytable(uid integer AUTO_INCREMENT PRIMARY KEY);");
    I always get this runtime exception: *java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition*; and AUTO_INCREMENT is the problem. I've tried all variations like AUTO, INCREMENT, AUTOINCREMENT and such, but nothing works.
    I've looked everywhere but couldn't find an answer to this. Thanks for the help.

    You used MySQL syntax. I think you agree with me that Access isn't a MySQL database. Either use MySQL with a real JDBC driver (recommended) or use Access syntax.
    That said, creating databases and tables using Java is a bad idea. The database and table must be already there. With Java you just do the usual table operations like select, insert, update and delete. Nothing more is needed.

  • How create a record type and a pl/sql table of that record type in database

    Hi
    I want to create a record type and then I want to create a PL/SQL table in the oracle 9i database.
    I have done it in PL/SQL block.
    But when I am trying to do it in database it is throwing me some error.
    Could you please tell me how can I do that?
    Regards

    user576726 wrote:
    Hi
    I want to create a record type and then I want to create a PL/SQL table in the oracle 9i database.
    I have done it in PL/SQL block.
    But when I am trying to do it in database it is throwing me some error.
    Could you please tell me how can I do that?
    RegardsRECORD type is supported only in PL/SQL for SQL you need to use OBJECT type.

  • Error ORA-01426: numeric overflow when Creating table with double data type

    Hi,
    I am using ODP.NET to create a table with data from SQL to Oracle. The problem is with double data type fields that is equivalent to FLOAT(49) in Oracle. My syntax is:
    CREATE TABLE SCOTT.ALLTYPES
    F1 NUMBER(10),
    F10 DATE,
    F2 NUMBER(10),
    F3 NUMBER(5),
    F4 NUMBER(3),
    F5 FLOAT(23),
    F6 FLOAT(49),
    F7 NUMBER (38,5),
    F8 NVARCHAR2(500),
    F9 NVARCHAR2(500)
    Th error is with field F6 but I am not sure what is the correct type equivalent to double in SQL.
    I woul appreciate if anyone can help me with this problem.
    Sunny

    Does this simple test work for you?
    In database:
    create table float_test
      f1 float(49)
    );C# code:
    using System;
    using System.Data;
    using System.Text;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace FloatTest
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          // connect to local db using o/s authenticated account
          OracleConnection con = new OracleConnection("User Id=/");
          con.Open();
          // will hold the value to insert
          StringBuilder sbValue = new StringBuilder();
          // create a string of 49 number 9's
          for (int i = 0; i < 49; i++)
            sbValue.Append("9");
          // command object to perform the insert
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = "insert into float_test values (:1)";
          // bind variable for the value to be inserted
          OracleParameter p_value = new OracleParameter();
          p_value.OracleDbType = OracleDbType.Double;
          p_value.Value = Convert.ToDouble(sbValue.ToString());
          // add parameter to collection
          cmd.Parameters.Add(p_value);
          // execute the insert operation
          cmd.ExecuteNonQuery();
          // clean up
          p_value.Dispose();
          cmd.Dispose();
          con.Dispose();
    }SQL*Plus after executing above code:
    SQL> select * from float_test;
            F1
    1.0000E+49
    1 row selected.- Mark

  • NESTED Tables for Sub-types when creating table for Super-type

    If I create the following types, as an example:
    Person with subtypes: Employee and Customer
    Appointment
    CREATE OR REPLACE TYPE Person_OT AS OBJECT (
    person#                         NUMBER,
    personSurname                    VARCHAR2(50),
    personForenames               VARCHAR2(50),
    personDateOfBirth               DATE,
    personAddress                    Address_OT,
    ) NOT FINAL ;
    CREATE OR REPLACE TYPE Employee UNDER Person_OT (
    empSalary               NUMBER,
    empNoSales          NUMBER,
    makes               Appointment_List_OT
    ) FINAL ;
    CREATE OR REPLACE TYPE Appointment_OT AS OBJECT (
    some attributes
    CREATE OR REPLACE TYPE Appointment_List_OT AS TABLE OF REF Appointment_OT ;
    When creating the table to hold objects of Person type, how can the requisite nested table for representing 'makes' be declared? The below approach is not correct, however the table will not compile without naming the nested tables.
    CREATE TABLE Person_TBL OF Person_OT (
    Person#     PRIMARY KEY)
    NESTED TABLE makes STORE AS Appointment_List_NTBL;
    Advice very much appreciated!

    CREATE TABLE Person_TBL OF Person_OT(
    Person# PRIMARY KEY)
    NESTED TABLE TREAT(SYS_NC_ROWINFO$ AS EMPLOYEE).MAKES STORE AS Appointment_List_NTBL
    Table created.
    SQL> select * from user_nested_tables
      2  /
    TABLE_NAME                     TABLE_TYPE_OWNER
    TABLE_TYPE_NAME                PARENT_TABLE_NAME
    PARENT_TABLE_COLUMN
    STORAGE_SPEC                   RETURN_TYPE          ELEMENT_SUBSTITUTABLE
    APPOINTMENT_LIST_NTBL          SCOTT
    APPOINTMENT_LIST_OT            PERSON_TBL
    TREAT(SYS_NC_ROWINFO$ AS "SCOTT"."EMPLOYEE")."MAKES"
                           DEFAULT                VALUE                         N
    SQL>  SY.

  • How to create table type in SAP3.1i ?

    Hi Friends,
    Is it posible to create table type in SAP 3.1i server ?

    Hi amit,
    I think there were no table types in 3.1i. Still you can define a structured table, i.e.
    DATA: BEGIN OF SORT_SPFLI OCCURS 100,
            CARRID   LIKE SPFLI-CARRID,
            CONNID   LIKE SPFLI-CONNID,
            CITYFROM LIKE SPFLI-CITYFROM,
            CITYTO   LIKE SPFLI-CITYTO,
            SFLIGHT  LIKE SORT_SFLIGHT OCCURS 100,
          END OF SORT_SPFLI.
    You can use field-symbols, but no loop assigning.
    What is it you want to do?
    Anyway: Have fun with good old 3.1 - I put my old docu CD in the trash recently.
    Regards
    Clemens

  • Creating variable of type of a PLSQL table type

    I have an object defined as
    create or replace type emp_rec as object (col1 date, col2 date);
    then I defined
    create or replace type data_emp_rec is table of emp_rec;
    Now I need to define a variable temp_rec which will host data returned of emp_rec structure.
    please advise how to define a variable to have data structure similar to that of emp_rec
    declare
    temp_rec emp_rec(null, null);
    or
    temp_rec data_emp_rec;
    Thx

    Hello
    It's all about casting data types and supplying the right data type to the bulk collect clause:
    SQL> SELECT
      2     usr.nm,
      3     perm.id,
      4     perm.descr
      5  FROM
      6     dt_test_user usr,
      7     dt_test_permission perm,
      8     dt_test_user_permission usr_perm
      9  WHERE
    10     usr.id = usr_perm.user_id
    11  AND
    12     perm.id = usr_perm.permission_id
    13  ORDER BY
    14     usr.nm
    15  /
    NM                                     ID DESCR
    Barry Bethel                            4 Be very enthusiastic about everything
    Barry Bethel                            2 Advertise slimming products
    Dr. Evil                                1 Take over the world
    Rolf Harris                             4 Be very enthusiastic about everything
    Rolf Harris                             3 Sing very strange songs
    SQL> select
      2     usr.id,
      3     usr.nm,
      4     CURSOR(select
      5                             p.user_id
      6                     from
      7                             dt_test_user_permission p
      8                     where
      9                             p.user_id = usr.id
    10                     ) pos_cursor
    11  from
    12     dt_test_user usr
    13  /
            ID NM                             POS_CURSOR
             1 Rolf Harris                    CURSOR STATEMENT : 3
    CURSOR STATEMENT : 3
       USER_ID
             1
             1
             2 Barry Bethel                   CURSOR STATEMENT : 3
    CURSOR STATEMENT : 3
       USER_ID
             2
             2
             3 Dr. Evil                       CURSOR STATEMENT : 3
    CURSOR STATEMENT : 3
       USER_ID
             3
    SQL> select
      2     usr.id,
      3     usr.nm,
      4     CAST(MULTISET(  select
      5                                                             p.user_id
      6                                                     from
      7                                                             dt_test_user_permission p
      8                                                     where
      9                                                             p.user_id = usr.id
    10                                             ) AS permissionList
    11                             ) pos_ntt
    12  from
    13     dt_test_user usr
    14  /
            ID NM                             POS_NTT(ID)
             1 Rolf Harris                    PERMISSIONLIST(PERMISSION_TYPE(1), PERMISSION_TYPE
                                              (1))
             2 Barry Bethel                   PERMISSIONLIST(PERMISSION_TYPE(2), PERMISSION_TYPE
                                              (2))
             3 Dr. Evil                       PERMISSIONLIST(PERMISSION_TYPE(3))
    SQL> declare
      2     ul userList;
      3  begin
      4     select
      5             usr.id,
      6             usr.nm,
      7             CAST(MULTISET(  select
      8                                                     p.user_id
      9                                             from
    10                                                     dt_test_user_permission p
    11                                             where
    12                                                     p.user_id = usr.id
    13                                     ) AS permissionList
    14                     ) pos_ntt
    15     bulk collect into
    16             ul
    17     from dt_test_user
    18             usr;
    19  end;
    20  /
            from dt_test_user
    ERROR at line 17:
    ORA-06550: line 17, column 2:
    PL/SQL: ORA-00947: not enough values
    ORA-06550: line 4, column 2:
    PL/SQL: SQL Statement ignored
    SQL> declare
      2     ul userList;
      3  begin
      4     select
      5             user_type(      usr.id,
      6                                     usr.nm,
      7                                     CAST(MULTISET(  select
      8                                                                             p.user_id
      9                                                                     from
    10                                                                             dt_test_user_permission p
    11                                                                     where
    12                                                                             p.user_id = usr.id
    13                                                             ) AS permissionList
    14                                             )
    15                             )
    16     bulk collect into
    17             ul
    18     from dt_test_user
    19             usr;
    20
    21  end;
    22  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2     ul userList;
      3  begin
      4     select
      5             user_type(      usr.id,
      6                                     usr.nm,
      7                                     CAST(MULTISET(  select
      8                                                                             p.user_id
      9                                                                     from
    10                                                                             dt_test_user_permission p
    11                                                                     where
    12                                                                             p.user_id = usr.id
    13                                                             ) AS permissionList
    14                                             )
    15                             )
    16     bulk collect into
    17             ul
    18     from dt_test_user
    19             usr;
    20
    21     FOR li_Idx IN ul.FIRST..ul.LAST LOOP
    22
    23             dbms_output.put_line(ul(li_Idx).name);
    24
    25             FOR li_NttIdx IN ul(li_Idx).permissions.FIRST..ul(li_Idx).permissions.LAST LOOP
    26
    27                     dbms_output.put_line(ul(li_Idx).permissions(li_NttIdx).id);
    28
    29             END LOOP;
    30
    31     END LOOP;
    32
    33  end;
    34  /
    Rolf Harris
    1
    1
    Barry Bethel
    2
    2
    Dr. Evil
    3
    PL/SQL procedure successfully completed.HTH
    David

  • Creating table type

    Hi,
    I am new to ABAP, can any one tell me how to create Table type for a database table in se11.
    Example, I created a table ZEMP in se11, now I want to create a table type for this table. How can I do this?
    Thanks,
    Satish

    In SE11,  on initial screen, select Data Type radiobutton, enter your table type name, click create, select Table Type radiobutton, enter the attributes, click save.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Installing Adobe Photoshop - disk full when it isn't?

    Here it is, I am running windows 7 ultimate from a 40gb ssd card (which is almost full) however I save all of my programs, files, pictures etc. onto my secondary 3TB drive which is almost empty. Trying to install adobe photoshop elements 12 - says th

  • Merging Files in to one File

    Hi Frnds, I am working on one scenario i have to read files from file directory and merge in to one file and place into another file directory. this is my scenario i written one java map it reads files from File directory and merge it into one file.

  • Apple TV - Homeshare not visible

    My parents have an iMac which shares it's internet connection with an Apple Tv however home sharing does dot appear on the Apple TV. The AppleTv is accessing the interest and I can buy and download programs but the Homesharing is not appearing I also

  • New Apple I Mac won't download adobe reader.  Apple says it is adobe's problem

    Does anyone know how i can download Adobe Reader on my new I Mac computer?  I get Step 1 and Step 2 done and then Step 3 takes me somewhere else.  I then close the Safari browser and try to download the pdf.  I get a message saying that I need to agr

  • Compatibilité Labview 6.1 &.8.2

    Bonjour, j'ai réalisé une application sur Labview 6.1 et je suis passé a la version 8.2. Par contre, je rencontre quelques problemes lorsque je suis passé a la version 8.2 de Labview. Il s'agit sans doute d'un problème de compatibilité mais que je n'