Table data type

I have
TYPE LinQty IS RECORD (
LqLin VARCHAR2(50),
LqQTY NUMBER := 0
TYPE LinQty_table IS TABLE OF LinQty INDEX BY BINARY_INTEGER;
QtyTablecount BINARY_INTEGER := 1;
QtyTable LinQty_table;
I like to loop thru and assign value to the fields
FOR i IN 1..QtyTablecount
LOOP
QtyTable(i).LqLin = 'aaaa';
END LOOP;
DOES QtyTable(1).LqLin HAVE BE INITIALIZED??? IF SO WHO
I CAN NOT ASSIGN 'aaaa' to it right now.
PLEASE HELP.

Is your posting an exact copy of your code - there is a colon missing off your assignment statement !

Similar Messages

  • Problem with pl/sql table data type

    hai friends,
    i have one procedure it has some in parameters and one out parameter which fetches values to front end.
    But the out parameter will be pl/sql table data type.
    if it is ref cursor
    then i declared as
    var x refcursor;
    exec procedure_name(1,:x);
    it is ok.
    but for pl/sql table data type is out parameter then what i will do in the prompt .
    give me syntax and clarify my doubt.
    advanced thanks...
    madhava

    The SQL*Plus VARIABLE statement does not support user-defined types, hence it cannot support nested tables. It can support cursors because they can be weakly typed (so we can use the one SQL*Plus VAR to hold any shape of resultset). Nested tables are strongly typed; SQL*Plus is a relatively stupid interface and cannot be expected to understand UDT.
    So, it you want to use nested tables as output you'll need to code a wrapping procedure that can understand your nested table type and handle it accordingly.
    Sorry.
    Cheers, APC

  • Package with table data type as out parameter.

    Hi there, I managed to compile the package without error but when I am trying to test this package and
    I am keep facing this error message. 
    Am I using correctly for the table data type as out parameter.  I have no idea what is wrong with the package to fix. 
    Pls. help and advise me.  Thanks.
    Error starting at line 1 in command:
    DECLARE
    p_stmodel VARCHAR2(40):=null;
    p_item_number VARCHAR(40):='9BX158-300';
    p_item_id NUMBER:=0;
    l_attribute_out test_common_api.l_item_attr_tab:=test_common_api.l_item_attr_tab();
    BEGIN
    test_common_api.test_attribute(p_stmodel,p_item_number,p_item_id,l_attribute_out);
    END;
    Error report:
    ORA-06550: line 8, column 18:
    PLS-00302: component 'TEST_ATTRIBUTE' must be declared
    ORA-06550: line 8, column 2:
    PL/SQL: Statement ignored
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    ---------Package.
    CREATE OR REPLACE PACKAGE test_common_api
    AS
    TYPE item_attr_rec IS RECORD (CONFIGURATION VARCHAR2(20),
                                   PRODUCTTYPE VARCHAR2(30),
                                   INTERNALPRODUCTNAME VARCHAR2(20),
                                   NUMBEROFHEADS VARCHAR2(2),
                                   NUMBEROFDISCS VARCHAR2(2),
                                   GENERATION  VARCHAR2(10),
                                   FACTORYAPPLICATION VARCHAR2(150),
                                   PRODUCTFAMILY  VARCHAR2(60),
                                   FORMFACTOR VARCHAR2(10),
                                   FORMATTEDCAPACITY NUMBER,
                                   FORMATTEDCAPACITY_UOM VARCHAR2(20),
                                   INTERFACE  VARCHAR2(30),
                                   SPINDLESPEEDRPM  NUMBER,
                                   PRODUCTCACHE VARCHAR2(10),
                                   WARRANTYMONTHS   VARCHAR2(2),
                                   PHYSICAL_SECTOR_SIZE  NUMBER,
                                   MODELHEIGHT  VARCHAR2(10),
                                   ENCRYPTION_TYPE VARCHAR2(40));
    TYPE l_item_attr_tab IS TABLE OF item_attr_rec;
    END test_common_api;
    show errors
    create or replace package body test_common_api
    AS
    PROCEDURE test_attribute (p_stmodel IN VARCHAR2,
                               p_item_number IN VARCHAR2,
                               p_item_id IN NUMBER,
                               l_item_attr_list OUT l_item_attr_tab)
    IS
    l_stmodel st.stmodelnumber%TYPE;
    l_market_segment VARCHAR2(10) ;
    l_sub_market_segment VARCHAR2(10) ;
    l_app_segment VARCHAR2(10);
    l_market_name VARCHAR2(40) ;
    l_ccitem seaeng_ccitemnumber.ccitemnumber%TYPE;
    l_query_item  VARCHAR2(1000);
    l_query_model VARCHAR2(1000);
    l_where VARCHAR2(1000);
    l_bind_var1      VARCHAR2(40);
    l_bind_var2      VARCHAR2(40);
    l_sql            NUMBER:=0;
    l_config VARCHAR2(40):=null;
    BEGIN
       IF p_stmodel is not null THEN
           l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber
                      AND sc.pricingdescriptor=''MODEL''
                      AND sc.ccdashnumber =''000''
                      AND sp.detailedproductname=''GENERIC''
                      AND st.stmodelnumber= :1';
                  IF p_item_number is null AND p_item_id is null THEN
                      l_config :='null';
                  ELSE
                      l_config :='sc.configuration';
                  END IF;
            l_bind_var1 :=p_stmodel;
            l_sql :=1;
        ELSE
            IF p_item_id is null and p_item_number is not null THEN
                l_where := 'WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber = :1';  
                l_bind_var1 :=p_item_number;
                l_sql:=2;
            ELSIF p_item_id is NOT null and p_item_number is null THEN
                l_where := 'WHERE sc.ccmodel= sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in ( select msi.segment1
                            from mtl_system_items msi
                            where msi.inventory_item_id = :1)';
                l_bind_var1 := p_item_id;
                l_sql:=2;
            ELSIF p_item_id is not null and p_item_number is not null THEN
                l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in (select msi.segment1
                           from mtl_system_items msi
                           where msi.inventory_item_id = :1
                           AND msi.segment1=:2)';
                l_sql:=3;
                l_bind_var1 := p_item_id ;
                l_bind_var2 :=p_item_number;
            END IF;
        END IF;
    l_query_item :='SELECT sc.configuration,st.producttype, sp.internalproductname, sp.numberofheads , sp.numberofdiscs,
      sp.generation,sp.factoryapplication, st.productfamily,st.formfactor , st.formattedcapacity , st.formattedcapacity_uom,
      st.interface,st.spindlespeedrpm,st.productcache,st.warrantymonths, st.physical_sector_size, st.modelheight, st.encryption_type
       FROM  pm sp , st st, seaeng_ccitemnumber sc ';
    l_query_model :='SELECT '|| l_config|| ' , st.producttype, null,null , null, null, sp.factoryapplication, null,st.formfactor, st.formattedcapacity,
      st.formattedcapacity_uom,st.interface , st.spindlespeedrpm, st.productcache, st.warrantymonths,st.physical_sector_size, st.modelheight,
      st.encryption_type
      FROM  pm sp , st st, seaeng_ccitemnumber sc ';
       IF l_sql = 1 THEN
          EXECUTE IMMEDIATE  l_query_model ||l_where
                             BULK COLLECT INTO l_item_attr_list
                             USING l_bind_var1 ;
                               dbms_output.put_line(l_query_model||l_where);
        ELSIF
             l_sql =2 THEN
               EXECUTE IMMEDIATE l_query_item || l_where
                                 BULK COLLECT INTO l_item_attr_list
                                 using l_bind_var1;
                                 dbms_output.put_line(l_query_item||l_where);
        ELSE
           EXECUTE IMMEDIATE  l_query_item ||l_where
                             BULK COLLECT INTO l_item_attr_list
                             USING l_bind_var1, l_bind_var2 ; 
                               dbms_output.put_line(l_query_item||l_where);
        END IF;
    END test_attribute;
    END test_common_api;
    show errors

    I think you forget to declare "PROCEDURE test_attribute" procedure in your package definition. like:
    CREATE OR REPLACE PACKAGE test_common_api
    AS
    TYPE item_attr_rec IS RECORD (CONFIGURATION VARCHAR2(20),
                                   PRODUCTTYPE VARCHAR2(30),
                                   INTERNALPRODUCTNAME VARCHAR2(20),
                                   NUMBEROFHEADS VARCHAR2(2),
                                   NUMBEROFDISCS VARCHAR2(2),
                                   GENERATION  VARCHAR2(10),
                                   FACTORYAPPLICATION VARCHAR2(150),
                                   PRODUCTFAMILY  VARCHAR2(60),
                                   FORMFACTOR VARCHAR2(10),
                                   FORMATTEDCAPACITY NUMBER,
                                   FORMATTEDCAPACITY_UOM VARCHAR2(20),
                                   INTERFACE  VARCHAR2(30),
                                   SPINDLESPEEDRPM  NUMBER,
                                   PRODUCTCACHE VARCHAR2(10),
                                   WARRANTYMONTHS   VARCHAR2(2),
                                   PHYSICAL_SECTOR_SIZE  NUMBER,
                                   MODELHEIGHT  VARCHAR2(10),
                                   ENCRYPTION_TYPE VARCHAR2(40));
    PROCEDURE test_attribute (p_stmodel IN VARCHAR2,
                               p_item_number IN VARCHAR2,
                               p_item_id IN NUMBER,
                               l_item_attr_list OUT l_item_attr_tab);
    TYPE l_item_attr_tab IS TABLE OF item_attr_rec;
    END test_common_api;
    show errors
    create or replace package body test_common_api
    AS
    PROCEDURE test_attribute (p_stmodel IN VARCHAR2,
                               p_item_number IN VARCHAR2,
                               p_item_id IN NUMBER,
                               l_item_attr_list OUT l_item_attr_tab)
    IS
    l_stmodel st.stmodelnumber%TYPE;
    l_market_segment VARCHAR2(10) ;
    l_sub_market_segment VARCHAR2(10) ;
    l_app_segment VARCHAR2(10);
    l_market_name VARCHAR2(40) ;
    l_ccitem seaeng_ccitemnumber.ccitemnumber%TYPE;
    l_query_item  VARCHAR2(1000);
    l_query_model VARCHAR2(1000);
    l_where VARCHAR2(1000);
    l_bind_var1      VARCHAR2(40);
    l_bind_var2      VARCHAR2(40);
    l_sql            NUMBER:=0;
    l_config VARCHAR2(40):=null;
    BEGIN
       IF p_stmodel is not null THEN
           l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber
                      AND sc.pricingdescriptor=''MODEL''
                      AND sc.ccdashnumber =''000''
                      AND sp.detailedproductname=''GENERIC''
                      AND st.stmodelnumber= :1';
                  IF p_item_number is null AND p_item_id is null THEN
                      l_config :='null';
                  ELSE
                      l_config :='sc.configuration';
                  END IF;
            l_bind_var1 :=p_stmodel;
            l_sql :=1;
        ELSE
            IF p_item_id is null and p_item_number is not null THEN
                l_where := 'WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber = :1';  
                l_bind_var1 :=p_item_number;
                l_sql:=2;
            ELSIF p_item_id is NOT null and p_item_number is null THEN
                l_where := 'WHERE sc.ccmodel= sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in ( select msi.segment1
                            from mtl_system_items msi
                            where msi.inventory_item_id = :1)';
                l_bind_var1 := p_item_id;
                l_sql:=2;
            ELSIF p_item_id is not null and p_item_number is not null THEN
                l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in (select msi.segment1
                           from mtl_system_items msi
                           where msi.inventory_item_id = :1
                           AND msi.segment1=:2)';
                l_sql:=3;
                l_bind_var1 := p_item_id ;
                l_bind_var2 :=p_item_number;
            END IF;
        END IF;
    l_query_item :='SELECT sc.configuration,st.producttype, sp.internalproductname, sp.numberofheads , sp.numberofdiscs,
      sp.generation,sp.factoryapplication, st.productfamily,st.formfactor , st.formattedcapacity , st.formattedcapacity_uom,
      st.interface,st.spindlespeedrpm,st.productcache,st.warrantymonths, st.physical_sector_size, st.modelheight, st.encryption_type
       FROM  pm sp , st st, seaeng_ccitemnumber sc ';
    l_query_model :='SELECT '|| l_config|| ' , st.producttype, null,null , null, null, sp.factoryapplication, null,st.formfactor, st.formattedcapacity,
      st.formattedcapacity_uom,st.interface , st.spindlespeedrpm, st.productcache, st.warrantymonths,st.physical_sector_size, st.modelheight,
      st.encryption_type
      FROM  pm sp , st st, seaeng_ccitemnumber sc ';
       IF l_sql = 1 THEN
          EXECUTE IMMEDIATE  l_query_model ||l_where
                             BULK COLLECT INTO l_item_attr_list
                             USING l_bind_var1 ;
                               dbms_output.put_line(l_query_model||l_where);
        ELSIF
             l_sql =2 THEN
               EXECUTE IMMEDIATE l_query_item || l_where
                                 BULK COLLECT INTO l_item_attr_list
                                 using l_bind_var1;
                                 dbms_output.put_line(l_query_item||l_where);
        ELSE
           EXECUTE IMMEDIATE  l_query_item ||l_where
                             BULK COLLECT INTO l_item_attr_list
                             USING l_bind_var1, l_bind_var2 ; 
                               dbms_output.put_line(l_query_item||l_where);
        END IF;
    END test_attribute;
    END test_common_api;
    show errors

  • How to migrate 'table' data type into oracle solution?

    Say, I have following sample code in Sql Server:
    Declare @v1 table(old_value int, new_value int)
    insert into @v1 select old_value, new_value from aTable where....
    declare cur cursor for
    select new_value from @v1 where old_value=...
    what should I use in oracle to convert above code? I was thinking about nested table, but it seems not very suitable here. Any better solutions out there?

    It's been a while since I've done any SQL Server development, but if I recall correctly, a table data type in Transact SQL is used for storing temporary result sets.
    In your example, you seem to be temporaily storing the results of a query in a Transact SQL table, and then opening a cursor to iterate over the results.
    In Oracle PL/SQL, there is usually no need to do this, just open a cursor:
    create or replace procedure test_proc as
    begin
    for curs_rec in (select old_value, new_value from myTable) loop
    ... process each row ...
    end loop;
    end test_proc;
    If you really want your results in an array which your code can iterate over, look into the BULK COLLECT clause of the SELECT statement:
    create or replace procedure test_proc as
    TYPE array_type IS TABLE of myTable%ROWTYPE INDEX BY BINARY_INTEGER;
    my_array array_type;
    begin
    SELECT * BULK COLLECT INTO my_array FROM myTable;
    for idx in my_array.FIRST..my_array.LAST loop
    dbms_output.put_line(my_array(idx).col1);
    end loop;
    end test_proc;
    Note that I have not actually compiled the above code, so there may be syntax errors :)
    Also, prior to 9i you can not BULK COLLECT into a table based on a rowtype (you need to created an array for each attribute).
    SQL Server also allows function which return table types. This is similar to PL/SQL pipelined table functions (available in 9i and higher - see the PL/SQL guide), which can be used to materialize rows which can be processed like any other result set.
    SQL Server also has a concept of temporary tables which is totally different than Oracle's temporary tables. SQL Server developers must often resort to using temporary tables in their stored procedures; in Oracle, this is rarely necessary.

  • Dynamic Internal Table - data type changed automatically

    Dear All,
    I have a requirement of craetion of dynamic inetrnal table which I have created referring to a custom table .
    In that custom table there is field ZDC002 of type DEC(16,7) which is converted to data type P(9,7) .
    Now it works fine if 2 digit and 7 decimals  value passed like 12.1234567 but it gives overflow error when passing more than 2 digit value .
    Please help me as I have no control to SAP standard functinality while creation of data-type . My piece of code :
    ref_table_des ?=
          cl_abap_typedescr=>describe_by_name( 'ZBW_EE_DCONTR' ).
          idetails[] = ref_table_des->components[].
    In this idetails[] table filedname data type changed from DEC16,7 to data type P(9,7). => Total Length of Packed Data Type is 9 which allows to contain only 2 numericdigits and 7 decimals => puts overflow error if more than 2 numeric data passed.
    Any suggestions will be appreciated.
    Thanks,
    Sachin

    Did you try to view the code on the Data Source view and cube that it is reflecting the correct data type on both places? if not you can change there and save it.
    prajwal kumar potula

  • Fact table data type changed from int to nvarchar -- rebuild on cube fails

     I change one of my data types in the Fact table from INT to Nvarchar... When I look at the properties it appears
    correct but when I try to Process it fails still thinking it's data type INT.
     How can the DSV be refreshed( I did try REFRESH  and it noticied the change to field) to reflect new nvarchar data type without
    having to rebuild entire Cube.
    SSAS 2005
     Thanks.

    Did you try to view the code on the Data Source view and cube that it is reflecting the correct data type on both places? if not you can change there and save it.
    prajwal kumar potula

  • How to refer a particular filed of a Table data type

    DECLARE
              CURSOR C1 IS SELECT
                                       GLUSR_USR.GLUSR_USR_ID BYER_ID,
                                       GLUSR_USR.GLUSR_USR_ADD1 BUYER_ADD
              FROM
                   GLUSR_USR
              WHERE
                   ROWNUM<=5;
    TYPE TBL_TYPE IS TABLE OF C1%ROWTYPE;
    TBL TBL_TYPE;
    BEGIN
         OPEN C1;
         FETCH C1 BULK COLLECT INTO TBL;
         CLOSE C1;
         FORALL I IN 1..TBL.COUNT
         INSERT INTO SATYA_TEMP VALUES(TBL.BYER_ID,TBL.BUYER_ADD);(How to use a particular field of TBL in this case).
         --INSERT INTO SATYA_TEMP VALUES TBL(I); (I know this)
    END;
    My question is how to refer a particular field of table type..?
    Please suggest.

    Then you have to create a record type and give all the columns inside it as given below.
    Then you can create a variable for this type and use it
    Type IS RECORD OF
    columnname1 table_name.column_name1%type,
    columnname2 table_name.column_name2%type,
    columnname3 table_name.column_name3%type,
    OR Use
    rec table%ROWTYPE;
    Edited by: Geek vishal on Aug 4, 2011 12:54 PM

  • Table Data Type Help

    Hi,
    Just a quick question....
    I have a variable in my table phone_number it holds customer phone numbers, i currently have it set as a number(7) however when inputting data into the table it always omitts the leading zero??
    Do i need to use varchar2 instead of number?
    Thanks

    SQL> create table samp (num varchar2(4));
    Table created.
    SQL> insert into samp values ('0123');
    1 row created.
    SQL> select * from samp;
    NUM
    0123
    But, in general, for number values the number datatype is used.
    Regards,
    Sabdar Syed.

  • ALTER TYPE MODIFY ATTRIBUTE cascade including table data

    Hi,
    does anybody know, why I get "ORA-00932: inconsistent datatypes: expected REF TYPE1_T got REF TYPE1_T"
    after ALTER TYPE MODIFY ATTRIBUTE cascade including table data when the altered type contains a nested table of type REFs.
    according to the documentation this should work? This works when the type contains a nested table of types!
    ORACLE Version: 9i EE 9.2.0.3.0 64 bit
    OS: HP-UX 11
    -- create type1
    CREATE OR REPLACE
    TYPE TYPE1_T AS OBJECT
    T1COL1 NUMBER,
    T1COL2 VARCHAR2(35),
    TYPE2REF REF TYPE2_T
    -- create coll of type1 refs
    CREATE OR REPLACE
    type TYPE1COLL_T IS TABLE OF REF TYPE1_T
    -- create type2
    CREATE OR REPLACE
    TYPE TYPE2_T AS OBJECT
    T2COL1 NUMBER,
    TYPE1COLL TYPE1COLL_T
    -- create table of type1_t
    CREATE TABLE TYPE1_OTB OF TYPE1_T
    -- create table of type2_t
    CREATE TABLE TYPE2_OTB OF TYPE2_T
    nested table type1coll store as type1coll_ntb
    -- populate type1_otb
    INSERT INTO type1_otb
    VALUES(1, 'ABCDEF',NULL);
    -- populate type2_otb
    INSERT INTO type2_otb
    VALUES(1,TYPE1COLL_T());
    select * from type1_otb;
    T1COL1 T1COL2
    TYPE2REF
    1 ABCDEF
    select * from type2_otb;
    T2COL1
    TYPE1COLL
    1
    TYPE1COLL_T()
    ALTER TYPE type1_t MODIFY ATTRIBUTE t1col2 varchar2(50) cascade including table data;
    Type altered.
    select * from type1_otb;
    T1COL1 T1COL2
    TYPE2REF
    1 ABCDEF
    select * from type2_otb;
    select * from type2_otb
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected REF TYPE1_T got REF TYPE1_T

    Hi John,
    I am also facing the same problem after executing the command
    SQL> alter type product_object modify attribute (NAME VARCHAR2(80)) cascade;
    with the following error
    ORA-00932: inconsistent datatypes: expected REF WOLFOBJECTS.EMPLOYEE_OBJECT got
    WOLFOBJECTS.EMPLOYEE_OBJECT
    Could you please suggest any alternate or workaround for this issue?
    Thanks
    Sara

  • Data Type issue in XMLA

    Hi
    In XMLA, I am getting problem in Source datatype for Measures.
    Measuregroup getting data from 3 different partition,this 3 partition populating data from 3 different view.One view populating data from base table,remaining 2 we gave default value with cast
    ex: Cast (0 as Bigint) as MeasureName.
    In DSV for all 3 table data type is System.Int64, but while I am generating deployment script. I am getting Integer as Source datatype for Measure in XMLA.So what might be the problem.
    pls guide me,

    Can you post exact error you're getting?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Display data type

    hi,
    how to display oralce's data type from system table is there any system table to fetch the data types for that version i'm using Oracle 11g.
    in sql server we fetch the details by using
    select * from sys.types
    this will return what the data types supported by that version
    Thanks!

    There is a package called STANDARD in the SYS schema that defines many of the standard datatypes and functions.
    e.g.
    CREATE OR REPLACE package SYS.STANDARD AUTHID CURRENT_USER is              -- careful on this line; SED edit occurs!
      /********** Types and subtypes, do not reorder **********/
      type BOOLEAN is (FALSE, TRUE);
      type DATE is DATE_BASE;
      type NUMBER is NUMBER_BASE;
      subtype FLOAT is NUMBER; -- NUMBER(126)
      subtype REAL is FLOAT; -- FLOAT(63)
      subtype "DOUBLE PRECISION" is FLOAT;
      subtype INTEGER is NUMBER(38,0);
      subtype INT is INTEGER;
      subtype SMALLINT is NUMBER(38,0);
      subtype DECIMAL is NUMBER(38,0);
      subtype NUMERIC is DECIMAL;
      subtype DEC is DECIMAL;
      subtype BINARY_INTEGER is INTEGER range '-2147483647'..2147483647;
      subtype NATURAL is BINARY_INTEGER range 0..2147483647;
      subtype NATURALN is NATURAL not null;
      subtype POSITIVE is BINARY_INTEGER range 1..2147483647;
      subtype POSITIVEN is POSITIVE not null;
      subtype SIGNTYPE is BINARY_INTEGER range '-1'..1;  -- for SIGN functions
      type VARCHAR2 is NEW CHAR_BASE;
      subtype VARCHAR is VARCHAR2;
      subtype STRING is VARCHAR2;
      subtype LONG is VARCHAR2(32760);
      subtype RAW is VARCHAR2;
      subtype "LONG RAW" is RAW(32760);
      subtype ROWID is VARCHAR2(256);
      -- Ansi fixed-length char
      -- Define synonyms for CHAR and CHARN.
      subtype CHAR is VARCHAR2;
      subtype CHARACTER is CHAR;
      type MLSLABEL is new CHAR_BASE;
      -- Large object data types.
      --  binary, character, binary file.
      type  BLOB is BLOB_BASE;
      type  CLOB is CLOB_BASE;
      type  BFILE is BFILE_BASE;
      -- Verbose and NCHAR type names
      subtype "CHARACTER VARYING" is VARCHAR;
      subtype "CHAR VARYING" is VARCHAR;
      subtype "NATIONAL CHARACTER" is CHAR CHARACTER SET NCHAR_CS;
      subtype "NATIONAL CHAR" is CHAR CHARACTER SET NCHAR_CS;
      subtype "NCHAR" is CHAR CHARACTER SET NCHAR_CS;
      subtype "NATIONAL CHARACTER VARYING" is VARCHAR CHARACTER SET NCHAR_CS;
      subtype "NATIONAL CHAR VARYING" is VARCHAR CHARACTER SET NCHAR_CS;
      subtype "NCHAR VARYING" is VARCHAR CHARACTER SET NCHAR_CS;
      subtype "NVARCHAR2" is VARCHAR2 CHARACTER SET NCHAR_CS;
      subtype "CHARACTER LARGE OBJECT" is CLOB;
      subtype "CHAR LARGE OBJECT" is CLOB;
      subtype "NATIONAL CHARACTER LARGE OBJEC" is CLOB CHARACTER SET NCHAR_CS;
      subtype "NCHAR LARGE OBJECT" is CLOB CHARACTER SET NCHAR_CS;
      subtype "NCLOB" is CLOB CHARACTER SET NCHAR_CS;
      subtype "BINARY LARGE OBJECT" is BLOB;
      subtype pls_integer is binary_integer;
      type TIME is new DATE_BASE;
      type TIMESTAMP is new DATE_BASE;
      type "TIME WITH TIME ZONE" is new DATE_BASE;
      type "TIMESTAMP WITH TIME ZONE" is new DATE_BASE;
      type "INTERVAL YEAR TO MONTH" is new DATE_BASE;
      type "INTERVAL DAY TO SECOND" is new DATE_BASE;
      SUBTYPE TIME_UNCONSTRAINED IS TIME(9);
      SUBTYPE TIME_TZ_UNCONSTRAINED IS TIME(9) WITH TIME ZONE;
      SUBTYPE TIMESTAMP_UNCONSTRAINED IS TIMESTAMP(9);
      SUBTYPE TIMESTAMP_TZ_UNCONSTRAINED IS TIMESTAMP(9) WITH TIME ZONE;
      SUBTYPE YMINTERVAL_UNCONSTRAINED IS INTERVAL YEAR(9) TO MONTH;
      SUBTYPE DSINTERVAL_UNCONSTRAINED IS INTERVAL DAY(9) TO SECOND (9);
      TYPE UROWID IS NEW CHAR_BASE;
      type "TIMESTAMP WITH LOCAL TIME ZONE" is new DATE_BASE;
      subtype timestamp_ltz_unconstrained is timestamp(9) with local time zone;
      subtype BINARY_FLOAT is NUMBER;
      subtype BINARY_DOUBLE is NUMBER;
      -- The following data types are generics, used specially within package
      -- STANDARD and some other Oracle packages.  They are protected against
      -- other use; sorry.  True generic types are not yet part of the language.
      type "<ADT_1>" as object (dummy char(1));
      type "<RECORD_1>" is record (dummy char(1));
      type "<TUPLE_1>" as object (dummy char(1));
      type "<VARRAY_1>" is varray (1) of char(1);
      type "<V2_TABLE_1>" is table of char(1) index by binary_integer;
      type "<TABLE_1>" is table of char(1);
      type "<COLLECTION_1>" is table of char(1);
      type "<REF_CURSOR_1>" is ref cursor;
      -- This will actually match against a Q_TABLE
      type "<TYPED_TABLE>" is table of  "<ADT_1>";
      subtype "<ADT_WITH_OID>" is "<TYPED_TABLE>";
      -- The following generic index table data types are used by the PL/SQL
      -- compiler to materialize an array attribute at the runtime (for more
      -- details about the array attributes, please see Bulk Binds document).
      type " SYS$INT_V2TABLE" is table of pls_integer index by binary_integer;
      -- The following record type and the corresponding generic index table
      -- data types are used by the PL/SQL compiler to materialize a table
      -- at the runtime in order to record the exceptions raised during the
      -- execution of FORALL bulk bind statement (for more details, please
      -- see bulk binds extensions document in 8.2).
      type " SYS$BULK_ERROR_RECORD" is
              record (error_index pls_integer, error_code pls_integer);
      type " SYS$REC_V2TABLE" is table of " SYS$BULK_ERROR_RECORD"
                                   index by binary_integer;
      /* Adding a generic weak ref cursor type */
      type sys_refcursor is ref cursor;
      /* the following data type is a generic for all opaque types */
      type "<OPAQUE_1>" as opaque FIXED(1) USING LIBRARY dummy_lib
        (static function dummy return number);
      type "<ASSOC_ARRAY_1>" is table of char(1) index by varchar2(1);
      /********** Add new types or subtypes here **********/
      /********** Predefined constants **********/
      BINARY_FLOAT_NAN constant BINARY_FLOAT;
      BINARY_FLOAT_INFINITY constant BINARY_FLOAT;
      BINARY_FLOAT_MAX_NORMAL constant BINARY_FLOAT;
      BINARY_FLOAT_MIN_NORMAL constant BINARY_FLOAT;
      BINARY_FLOAT_MAX_SUBNORMAL constant BINARY_FLOAT;
      BINARY_FLOAT_MIN_SUBNORMAL constant BINARY_FLOAT;
      BINARY_DOUBLE_NAN constant BINARY_DOUBLE;
      BINARY_DOUBLE_INFINITY constant BINARY_DOUBLE;
      BINARY_DOUBLE_MAX_NORMAL constant BINARY_DOUBLE;
      BINARY_DOUBLE_MIN_NORMAL constant BINARY_DOUBLE;
      BINARY_DOUBLE_MAX_SUBNORMAL constant BINARY_DOUBLE;
      BINARY_DOUBLE_MIN_SUBNORMAL constant BINARY_DOUBLE;
      /********** Add new constants here **********/
      /********** Predefined exceptions **********/
      CURSOR_ALREADY_OPEN exception;
        pragma EXCEPTION_INIT(CURSOR_ALREADY_OPEN, '-6511');
      DUP_VAL_ON_INDEX exception;
        pragma EXCEPTION_INIT(DUP_VAL_ON_INDEX, '-0001');
    ..and so it goes on... take a look yourself
    Edited by: BluShadow on 18-Dec-2012 09:32

  • Data type difference of char and varchar will affect the searching result?

    Hi,
    My issue is tht i have created an item in db as char(20) while creating EO for tht particular table, data type for tht item attribute is by default coming as string. wen i search from table based on tht item, no rows are returned.So can anyone help me to solve this?
    Thanks
    Harsha

    Hi,
    My requirement is having a page with search region and result region. Search region shud be done programmatically. In the search region im having a lov item, radion group item, date and poplist. poplist is having, for eg., list of countries which is fetched from lookupcode. i have to buttons "go" and "clear". wen i select any of the items and click go btn results shud be displayed in a multiselect table which is updatable. Since im using updatable table im using EO which is linked to tht search region. So my issue is tht wen i select a value from poplist and click "go" btn no rows are returned, even if rows based on tht selected values are present in the table. Wht i did is tht wen i click go btn, im taking the value from tht poplist im callin VOImpl to implement the search. The value which i fetched from the poplist is available in tht method to search also. Also when i activated tht console o/p it is showing the query as country_id = :1. But it is not selecting any rows. I think im clear now, like y EO is used and all. Please help me.
    Thanks
    Harsha.

  • Table for dates in date-type in transaction

    Hi,
    Can anybody tell me the table inwhich the dates saved in the different date-types  ( which are part of date-profile) are stored for the transaction type.
    This date profile is assigned to transaction type( LEAD).
    thanks and regards,
    PD

    Hi Prashant,
    Use Table: BAD_APPOINTMENT
    Field: ORDERADM_H_GUID contains guid of Lead transaction obtained from table CRMD_ORDERADM_H.
    Field: APPT_TYPE contains information for Data Types.
    Best Regards,
    Pratik Patel
    <b>Reward with Points!</b>

  • How to change the data  type of a field in an internal table dynamically ?

    I have an internal table :
    Data: Begin of itab_data occurs 0,
    field1 type i,
    field2 type p decimals 2,
    end of itab_data.
    My requirement is to decide the number of decimals of "field2" dynamically .
    ie. based on the input in selection-screen , the declaration has to change .How can this be done ?
    Hope the question is clear..
    Its urgent. Please help me.
    Thanks in advance .
    Shankar

    I dont think you can change it dynamically...but as per your requirement ...why dont you define the variable with maximum decimal length and depending on the parameter(from your selection-screen) use the WRITE command to populate it with the specified decimals.
    Example
    begin of itab
    field2 type p decimals 5.
    end of itab.
    write itab-field2 to lfield decimals p_dec.
    Message was edited by: Anurag Bankley

  • How to retrieve the data type of a column of a table?

    Hi,
    I want to retrieve the data type of a column of a table. At the moment I am querying "OCI_ATTR_DATA_TYPE" attribute but it is returning SQLT_CHR for both varchar2 and nvarchar2 data type columns. I need to distinguish between these two data types columns separately. Is there any API through which I could get the exact data type of a column i.e. "nvarchar2"?
    Thanks in advance.
    Hashim

    Hi,
    This is the Oracle C++ Call Interface (OCCI) forum - I'm not sure if you are using OCCI or OCI (Oracle Call Interface - the C interface) since you reference "OCI_ATTR_DATA_TYPE" which is more of an OCI focus than OCCI.
    In any case, you might take a look at "OCI_ATTR_CHARSET_FORM" which takes the following values:
    #define SQLCS_IMPLICIT 1     /* for CHAR, VARCHAR2, CLOB w/o a specified set */
    #define SQLCS_NCHAR    2                  /* for NCHAR, NCHAR VARYING, NCLOB */So, if you have a datatype of SQLT_CHR and OCI_ATTR_CHARSET_FORM is SQLCS_IMPLICIT then you have a varchar2 if it is SQLCS_NCHAR then you have an nvarchar2.
    If you are using OCCI and not OCI then take a look at MetaData::ATTR_DATA_TYPE and MetaData::ATTR_CHARSET_FORM which expose OCI_ATTR_DATA_TYPE and OCI_ATTR_CHARSET_FORM respectively.
    Perhaps that will get you what you want.
    Regards,
    Mark

Maybe you are looking for

  • PDF ERROR! ICC Based color space contains/ alternate key

    Can somebody help me? When I put in Rip (Agfa Apogee X) a pdf I receive the follow error: ICC Based color space contains/ alternate key. I don t know where is the problem? There Is a problem with pdf? or it is a problem in my Rip? how can I solve thi

  • Creating variable to count or group child subrecords-webi6.5

    Post Author: Tom_S CA Forum: WebIntelligence Reporting Hello, I am using webi 6.5. I have data the has parent records and child records where the parent may have many children.  I am trying to identify/count/group the parents into those that have one

  • Passing select-options values using call transaction method

    Hi Experts, I have a scenario in which i have three fields BUKRS,WERKS and MATKL in an internal table i_tab and I have MATNR as a selection-option. After this I have to use call transaction <tcode> for all the line items in the internal table and the

  • NullpointerException in java.util.Hashtable.access$100 ???

    Hi folks. I am trying to reconstruct a Hashtable using my own way of serialization/deserialization via Java Reflection. It works fine with most classes, but a reconstructed hashtable is seriously screwed up. After reconstruction, it is passed as an a

  • Double submission problem in J2EE application under Weblogic 8.1 SP2 server

    Hi, We are facing double submission problem in our J2EE application which is running under Weblogic 8.1 SP2 and for the same we already implemented or added the below preventive solutions. 1. We disable the SUBMIT button once the user clicks it. 2. W