APEX 5 - update collection member number or date type fails

Hi Experts,

I use the pl/sql process onDemand (AJAX call). In this block, there is a procedure of apex_collection.update_member_attribute.

If I call the procedure as below:

In this example, I've used directly number 50 in NUMBER! to say the apex_collection to set the numeric field only.

apex_collection.update_member_attribute
                                     (p_collection_name      => 'FUFI_MANAGER_BATCH_PARAMS',
                                      p_seq                  => APEX_APPLICATION.g_x01,
                                      p_attr_number          => to_number(APEX_APPLICATION.g_x02),
                                      p_attr_value           => 50
                                     );

Here is 'Post' AJAX call settings (in my standard call): x 01-seq_id, x 02 - attr_number, x 03 - attr_value, x 04-value_type (n - number just for my info)

He C001 ALWAYS updated instead of N001! attribute. In the documentation it is if I use the numeric value (I tried to_number too...) in p_attr_value, it updates attribute number.

To_number example:

updated in the character column.

I'm doing something wrong?

If I use a few collections with columns C001... C00N - update works. If I use the types of number and the date I can't update correct attribute members.

Concerning

J

Jozef Demovic SVK wrote:

I use the pl/sql process onDemand (AJAX call). In this block, there is a procedure of apex_collection.update_member_attribute.

If I call the procedure as below:

In this example, I've used directly number 50 in NUMBER! to say the apex_collection to set the numeric field only.

  1. apex_collection.update_member_attribute
  2. (p_collection_name-online 'FUFI_MANAGER_BATCH_PARAMS',
  3. p_seq => APEX_APPLICATION.g_x01,
  4. p_attr_number-online to_number (APEX_APPLICATION.g_x02),
  5. p_attr_value-online 50
  6. );

I'm doing something wrong?

If I use a few collections with columns C001... C00N - update works. If I use the types of number and the date I can't update correct attribute members.

The apex_collection.update_member_attribute method is overloaded to handle different attributes and types of attributes. Note that PL/SQL documentation says Overload:

PL/SQL allows you to overload the nested subprograms, subprograms in package and type methods. You can use the same name for several different subprograms if their formal parameters differ by name, number, order, or data type family... If formal parameters differ only in name, you must use named notation to specify the corresponding actual parameters.

In this case you use notation named, but the parameter name p_attr_value means the call corresponds to the signature 1 method, which updates a character attribute.

5 signature with the name of the parameter p_number_value is used to set a number attribute:

apex_collection.update_member_attribute(
    p_collection_name => 'FUFI_MANAGER_BATCH_PARAMS'
  , p_seq            => APEX_APPLICATION.g_x01
  , p_attr_number    => APEX_APPLICATION.g_x02)
  , p_number_value    => 50);

Also note that (a little bit counter-intuitive) p_seq is always a VARCHAR2 string.

Tags: Database

Similar Questions

  • Cannot save the types of collection with the correct data type (structure type)

    Hi all!

    I am beginner in using the Data Modeler (SQL Develeoper Version 3.0.04 build HAND - 04.34)

    I tried to define types of structured data type type collection.

    for example
    Types of structure: StruA (for example, Integer, Float) and StruB (e. g. whole, Timestamp, Double, Double)
    Types of collections: TabA should collect the types of StruA and TabB should collect the types of StruB.

    create or replace TYPE TabA IS TABLE OF StruA;
    create or replace TYPE TabB IS TABLE OF StruB;

    It is possible to select the correct data type in the 'Collection Type properties' dialog box.

    The data type is installed to unknown after the registration and the reopening of the design. I see that the correct type has been entered in the xml file associated with the type of collection:
    < dataTypeDescr class = "oracle.dbtools.crest.model.design.datatypes.CollectionType$ DataTypeWrapper" >
    65677BBB-FB68-963C-552D-3F98E528520B < type > < / type >
    false < isreference > < / isreference >
    < / dataTypeDescr >

    File name of the structured type is 65677BBB-FB68-963C-552D-3F98E528520B.xml

    On the display of the design or generation DDL lose again this information.
    Is - this poor handling or a bug in the Data Modeler?
    Can anyone help? THX
    Gabor

    Edited by: user9529349 the 26.09.2011 07:49

    Hey Gabor,

    I'm afraid that this is a bug. This problem was reported earlier in this forum, loss of definition of type of data from one type of collection

    Thank you
    David

  • Largest number of digits for the NUMBER data type?

    What length more of a NUMBER that Oracle will "support"?

    The documentation says the following:

    Limitations of the data type says:

    «Can be represented in a comprehensive precision 38 digits»

    NUMBER of Data Types says:

    "Oracle guarantees portability of numbers with precision of up to 20 digits of base-100, which equals 39 or 40 decimal digits according to the position of the decimal point."

    I realize account that if I define a column as simply NUMBER, I can insert numbers with a size up to 126 characters.  However, Oracle seems to maintain only the first 40 digits in MOST cases.  The largest number of digits, it seems to allow is 40 before it begins to be replaced by 0.

    With numbers that have more than 40 figures, Oracle will sometimes replace all numbers according to the 38th numbers with a 0 and sometimes replace 0 after the digit 39th or 40th.

    Therefore, what is the largest number of digits, can be trusted to safely store Oracle?

    This is the code I used for this testing process.

    create the table max_num (num number);

    declare

    number of l_x;

    Start

    for x in 1.200

    loop

    l_x: = x;

    insert into max_num values (rpad (1, x, 1));

    end loop;

    exception

    while others then

    dbms_output.put_line ('STOP: ' | l_x);

    dbms_output.put_line (SQLERRM);

    end;

    /

    Select num, length (replace (num, 0)) of max_num;

    What length more of a NUMBER that Oracle will "support"?

    You have already given your own answer. If 'length': the maximum number of digits is written the doc gives you the answer:

    999... (38 9's) x 10 value maximum125

    The 38/39/40, hereinafter referred to as the doc means "significant digits". This is why rounding or truncation occurs if you provide more significant digits of 38/39/40.

    Oracle stores the numbers internally in a binary format 21 bytes using a documented structure in the doc of the OIC in the section 'NUMBER'.

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e10646/oci03typ.htm#i423684

    Oracle database stores the values of the NUMBER data type in a variable length format. The first byte is the exponent and is followed by 1 to 20 mantissa bytes. The high bit of the exponent byte is the sign bit; It is defined for positive numbers, and it is cleared for negative numbers. The lower 7 bits represent the exponent, which is a number of base-100 with an offset of 65.

    This article from doc continues to show you how to convert the internal format to the real value.

    An additional byte of 1 is used for all types of data to store the length; That's why you often see docs saying numbers can take 22 bytes.

  • should I turn off my IKM for faster migration update if I have static data?

    I have no much experience with ODI and I know that sounds like a very long explanation, but if you have experience using ODI respondent should not be that difficult, please bear with me on this one...

    I move data between Postgres, Oracle 12 c. Use my interfases: incremental update for IKM Oracle and IKM Oracle incremental update PL SQL (using long data types). The tables are in the order of several hundred million of 100 million more 500 million lines from wherever we have to run the interfases as soon as possible. Because of my inexperience with ODI, I'm not sure if I select the right options to run the interfaces:

    1 as soon as possible

    2 - with the possible minimum measures

    The aim is only to move static data to Postgres to Oracle, that's all. (there is very few transformations, for most of the castings to force data to a certain type of data)

    With my current selections, the IKM Oracle incremental update (PL SQL) ODI does the following:

    -working table, create work table C$ _0 < TABLE TARGET - >

    -working table charges <-this step loads the postgres data in the oracle table... <-that's ALL I NEED! .. .load of Postgres to Oracle...

    -creates the flow table: I have$ _ < TABLE TARGET - >

    -then using a cursor selects all data from the TABLE of WORK C$ _0, load: I have$ _ < TABLE-TARGET > <-is there a way to avoid all these additional tables?

    -create indexes and statistics on I$ _ < TABLE TARGET - >

    -flags of lines for the realization of the update if the lines already exist in the < TARGET > TABLE

    -Using a cursor selects all I$ __ where IND_UPDATE = 'I' and inserts data into the TABLE < TARGET > < TABLE TARGET >

    My data source are static and its integrity is verified by FK in Postgres, so I'm not worried about the quality of the db of the source, to the IKM my options are:

    Insert is: TRUE

    Update: TRUE <-would it be wrong? (I think this one can be false for me because my source table is static and my target doesn't support only once for the first time is always empty table)

    flow control is FALSE

    static control is FALSE

    Has. are all of the options to reduce the steps performed during the interface? (it seems I need to UPDATE set to false on the revenge for each interface)

    I load a table with 110 millions of rows, work began in 24 hours. To load the table of Postgres to Oracle took 4 hours and 10 minutes, but to load the flow table (PLSQL cursor) took more than 20 hours for barely half of labour (52 million lines)

    All the data I need is on the work table, I can stop the interface and rename the columns but I wonder... B. what is the right action to take here? how to change the settings of the ODI, so they just move the data from the source to the target only and avoid any other measure reducing the total execution time.

    C. the server has 32 processors, but ODI seems to use one. How can I take advantage of the CPU?

    Thanks for your help.

    P.S. I have read all the documentation there, but it is difficult to get concrete responses with no experience using the product and no other indication. I'm learning to use the tool by using the documentation only.

    Hello

    I would check this vlog by Craig Stewart first to see if can do you need:

    http://odiexperts.com/direct-load-by-interface-with-no-work-tables/

    Otherwise, there are a few points I would make:

    You use the bad IKM with a cursor, if you load Oracle and you want to insert / update, then I always would start by merging first.

    Second, feel free to hack the km to get what you want (always duplicate an existing and start from there, he avoids you to come once upgrade). If you look at the LKM, the insert in $ CAN use a different API call to get table name of $ CAN, you can always get the name of the target table (see the appropriate step of revenge for syntax) and to use it in the same place (perhaps to tweak the getColList in the same way) I've done it before - I created a LKM to write directly in the target table , I need an IKM has nothing so used a dummy not (interface complains with no set IKM), not to the customer more, don't have it to hand, but I'm willing to help if you want to PM me.

    For Question C - seems you want o use parallelism, see the Oracle documentation first to get on the same page. You need optimizer parameters set correctly and your tables must be created with parallel hint in the DDL (maybe need to change any ODI create table steps accordingly).

    Try to get the optimizer to get correct PX parameters before you use to alter session strength parallel etc etc.

    Rgrds

    Alastair

  • change the data type of column in a view

    Hi gurus,

    Please suggest.


    I have been created as below in the region of production.

    CREATE OR REPLACE TYPE PROD. (OBJECT) ACE FEATURE_CUSTOM_LIST_OBJ
    TERMINAL_FEATURE_ID NUMBER (8).
    DATA_VALUE NUMBER (8)
    );
    /


    And the view is created below the base have the PROD. FEATURE_CUSTOM_LIST_OBJ

    CREATE OR REPLACE FORCE VIEW PROD. TERMINAL_FEATURE_TYPE
    (
    TERMINAL_FEATURE_ID,
    DATA_VALUE
    )
    AS
    SELECT
    TERMINAL_FEATURE_ID,
    DATA_VALUE
    TABLE)
    CAST)
    PROD. TERM_RELATED_REF_DATA. GET_TERMINAL_FEATURE_TYPE AS PROD. FEATURE_CUSTOM_LIST_TAB));

    Examples of data must be inserted into the display

    TERMINAL_FEATURE_IDDATA_VALUE
    120
    121
    123
    11THERE
    11N

    If iam thinking is possible that we can change the data type of number of varchar2 data type column in a view?

    Or should I follow create or replace type as whenevr the nonnumeric data tries to bring into view
    sound by giving the number plsql for digital character conversion error since it is a number of data type here.

    I have been created as below in the region of production.

    CREATE OR REPLACE TYPE PROD. (OBJECT) ACE FEATURE_CUSTOM_LIST_OBJ

    OK - but it is a SCALAR - not a collection object

    And the view is created below the base have the PROD. FEATURE_CUSTOM_LIST_OBJ

    CREATE OR REPLACE FORCE VIEW PROD. TERMINAL_FEATURE_TYPE

    No - it isn't. Your type of object is a SCALAR - not a collection. You need create a view on a table or a collection that is treated as a table.

    DDL perspective you posted doesn't even mention your FEATURE_CUSTOM_LIST_OBJ.

    If iam thinking is possible that we can change the data type of number of varchar2 data type column in a view?

    Have you tried using TO_CHAR to format the number as a string?

  • Members with Data Type "text".

    I have a member with the Data Type "text".

    Can I use this member in If statement for the conditional statement

    asserting Member == 'Yes' calculate 10% of the Total sales
    OTHERWISE if the Member == "" calculate 5% of the Total sales... Can you please provide the syntax for the string instead of number in if statement.

    Thank you

    The example you provided show that you must use the smart list instead of the text data type.
    Text is not stored in Essbase so impossible to refer to a text values in the calculation.
    Pls also consider support you design if users type something with errors.
    To use Active lists Yes etc. values, see thread as below
    Re: Smart List index and Values (content) - Essbase - Hyperion Planning

  • partition interval on the data type TIMESTAMP PrimaryKey

    question:
    Need example of Oracle Interval partitioning on the TIMESTAMP data type of primary key, including the LOCAL INDEX generated by partitioned interval key functional

    Published by: oracletune on April 17, 2013 07:51

    >
    * It seems that interval of time STAMP partitioning is not supported:
    >
    This is not correct.
    >
    Partitioning interval is limited to a partition key unique to a numeric or date range.
    >
    The above is YOUR text and is NOT what the doc.

    The VLDB and partitioning Guide
    http://docs.Oracle.com/CD/E18283_01/server.112/e16541/part_admin001.htm#BAJHFFBE
    >
    For the partitioning of the interval, the partitioning key can be a single column of the table name, and it must be the number or DATE type.
    >
    Which must be read carefully. It is said should be "NUMBER or DATE type. Note that 'DATE type' does NOT mean 'Type of DATE data. A TIMESTAMP (but not TIMESTAMP WITH TIMEZONE) are a type of DATE. It's confusing and the doc must could be formulated differently.

    This code is very well:

    drop table test_part_timestamp
    
    CREATE TABLE TEST_PART_TIMESTAMP
    (
    PRODUCT_ID NUMBER,
    DESCRIPTION VARCHAR2(20 BYTE),
    CREATE_DATE TIMESTAMP(6)
    )
    PARTITION BY RANGE (CREATE_DATE)
    INTERVAL(NUMTOYMINTERVAL(1, 'MONTH'))
    (
    PARTITION OLD_DATA VALUES LESS THAN (TIMESTAMP' 2013-01-01 00:00:00'),
    PARTITION P_2013_JAN VALUES LESS THAN (TIMESTAMP' 2013-02-01 00:00:00')
    )
    
  • Oracle data type

    In the DDL scripts, I found the NUMBER(*,0) data type. Can someone tell me exactly what that means?

    >
    In the DDL scripts, I found the NUMBER(*,0) data type. Can someone tell me exactly what that means?
    >
    Of course - Oracle can.

    When you have a question like this, always start with the Oracle documentation.

    See "Overview of the numeric data types" in the Concepts Doc
    http://docs.Oracle.com/CD/B28359_01/server.111/b28318/datatype.htm#i16209
    >
    Oracle guarantees portability of numbers whose precision is equal to or less than 38 digits. You can specify no precision and a scale:

    column_name NUMBER (*, scale)

    In this case, the precision is 38, and the specified scale is maintained.
    >
    In the future when you post always ensure your Oracle version 4-digit (result of SELECT * FROM V$ VERSION).

  • Collections - member update attributes

    APEX 4.2.2

    Suppose I have a collection of APEX allows to store additional data specific to a session for some elements. N001 stores the primary key of the database record. CXXV attributes store session-specific data.

    How can I do to update the specific values in the collection based on the primary key? All the API update in the package APEX_COLLECTION with the p_seq not work with our own data. Basically I want something equivalent to
    update collection set c001=<value>, c002=<value> where n001=<pk>; if (sql%rowcount=0) then create the n001,c001,c002,... collection member
    Any ideas? Thank you

    Hello Elizabeth,.

    I guess you can write something like this:

    declare
      l_seq_id number := null;
    
    begin
      select seq_id
      into l_seq_id
      from apex_collections
      where collection_name = 'YOUR_COLLECTION_NAME'
      and n001 = ;
    
      if l_seq_id is null then -- new
        apex_collection.add_member(
          p_collection_name => 'YOUR_COLLECTION_NAME',
          p_c001            =>
          ...
        );
    
      else -- update
        apex_collection.update_member(
          p_collection_name => 'YOUR_COLLECTION_NAME',
          p_seq             => l_seq_id,
          p_c001            =>
          ...
        );
    end;
    

    Thank you

    Erick

  • APEX tabular 4 Collection

    Hi all
    I have a tabular presentation on Collection (APEX 4). I want to only update the records that are checked, but it valid and updated all regarless of documents in the saved files. How do I get this (page collection) to update only the selected records. Any help is greatly appreciated.

    ***********************
    It comes to my table to the collection:

    DECLARE
    l_collection_name VARCHAR2 (50);
    l_query VARCHAR2 (32767).

    BEGIN
    l_collection_name: = 'WORK_TABLE ';

    IF (l_collection_name) apex_collection.collection_exists
    THEN
    () apex_collection.delete_collection
    p_collection_name = > l_collection_name);
    END IF;

    l_query: = 'select seq_no', - c001 = > f01
    || 'fk_paygrade,' - c002 = > f02
    || 'annual_hour,' - c003 = > f03
    || 'A1,' - c004 = > f04
    || "A2," - c005 = > f05
    || "A3," - c006 = > f06
    || "A4," - c007 = > f07
    || "A5," - c008 = > f08
    || "A6," - c009 = > f09
    || "A7," - c010 = > f10
    || "A8," - c011 = > f11
    || "A9,' - c012 = > f12
    || 'A10,"- c013 = > f13
    || "A11," - c014 = > f14
    || 'A12,"- c015 = > f15
    || "A13," - c016 = > f16
    || "A14,' - c017 = > f17
    || "H1,"-= c018 > f18
    || "H2," - c019 = > f19
    || "H3," - c020 = > f20
    || "H4," - c021 = > f21
    || "H5," - c022 = > f22
    || "H6,' - c023 = > f23
    || "H7," - c024 = > f24
    || "H8," - see c025 = > f25
    || 'H9,"- c026 = > f26
    || "H10,' - c027 = > f27
    || "H11," - c028 = > f28
    || "H12,' - c029 = > f29
    || "H13,' - c030 = > f30
    || 'H14,' - c031 = > f31
    || 'NULL' - c032 = > f32
    || 'NULL' - c033 = > f33
    || 'NULL' - c034 = > f34
    || 'NULL' - c035 = > f-35
    || 'NULL' - c036 = > f36
    || 'NULL' - c037 = > f37
    || 'NULL' - c038 = > f38
    || 'NULL' - c039 = > f39
    || 'NULL' - c040 = > f40
    || 'NULL' - c041 = > f41
    || 'NULL' - c042 = > f42
    || 'NULL' - c043 = > f43
    || 'NULL' - c044 = > f44
    || 'NULL' - c045 = > f45
    || 'NULL' - c046 = > f46
    || '' O',' - c047 = > f47
    || ' wwv_flow_item.md5 (seq_no, fk_paygrade, annual_hour, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, H1, H2, H3, H4, H5, H6, H7, H8, H9, H10, H11, H12, H13, H14) '-c048
    || "of paygrade_increase."

    () apex_collection.create_collection_from_query_b
    p_collection_name = > l_collection_name,
    p_query = > l_query);

    IF: REQUEST = 'ADD '.
    THEN
    () apex_collection.add_member
    p_collection_name = > l_collection_name
    );
    END IF;
    END;

    ******************************
    The collection to tabular report in the form of:

    SELECT APEX_ITEM. HIDDEN (47, c047, NULL, 'f47_' |) ("#ROWNUM #")
    || APEX_ITEM. HIDDEN (48, c048, NULL, 'f48_' |) ("#ROWNUM #")
    || APEX_ITEM. HIDDEN (49, seq_id, NULL, 'f49_' |) ("#ROWNUM #")
    || APEX_ITEM. HIDDEN (1, c001, NULL, 'f01_' |) ("#ROWNUM #")
    || APEX_ITEM. (CHECKBOX
    50,
    seq_id,
    NULL,
    CASE
    WHEN c047 = 'U' THEN seq_id
    END,
    ':',
    "f50_" | "#ROWNUM #
    ) AS update_checkbox,
    APEX_ITEM. (TEXT)
    2,
    C002,
    20,
    50,
    NULL,
    "f02_" | "#ROWNUM #
    ) as fk_paygrade,
    APEX_ITEM. (TEXT)
    3,
    C003,
    20,
    50,
    NULL,
    "f03_" | "#ROWNUM #
    ) AS annual_hour,
    APEX_ITEM. (TEXT)
    4,
    C004,
    20,
    50,
    NULL,
    "f04_" | "#ROWNUM #
    ) AS A1,.
    APEX_ITEM. (TEXT)
    5,
    C005,
    20,
    50,
    NULL,
    "f05_" | "#ROWNUM #
    ) AS A2.
    APEX_ITEM. (TEXT)
    6,
    C006,
    20,
    50,
    NULL,
    "f06_" | "#ROWNUM #
    ), A3,.
    APEX_ITEM. (TEXT)
    7,
    C007,
    20,
    50,
    NULL,
    "f07_" | "#ROWNUM #
    ), A4,.
    APEX_ITEM. (TEXT)
    8,
    C008,
    20,
    50,
    NULL,
    "f08_" | "#ROWNUM #
    ), A5,
    APEX_ITEM. (TEXT)
    9,
    C009,
    20,
    50,
    NULL,
    "f09_" | "#ROWNUM #
    ), A6,.
    APEX_ITEM. (TEXT)
    40I
    C010,
    20,
    50,
    NULL,
    "f10_" | "#ROWNUM #
    ), A7,.
    APEX_ITEM. (TEXT)
    11,
    C011,
    20,
    50,
    NULL,
    "f11_" | "#ROWNUM #
    ), A8,.
    (apex_item). Text
    42(I))
    C012,
    20,
    50,
    NULL,
    "f12_" | "#ROWNUM #
    ), A9,
    (apex_item). Text
    13,
    C013,
    20,
    50,
    NULL,
    "f13_" | "#ROWNUM #
    ), A10.
    (apex_item). Text
    44I
    C014,
    20,
    50,
    NULL,
    "f14_" | "#ROWNUM #
    ), A11.
    (apex_item). Text
    15,
    C015,
    20,
    50,
    NULL,
    "f15_" | "#ROWNUM #
    ), A12,.
    (apex_item). Text
    46I
    C016,
    20,
    50,
    NULL,
    "f16_" | "#ROWNUM #
    ), A13,
    (apex_item). Text
    17,
    c017,
    20,
    50,
    NULL,
    "f17_" | "#ROWNUM #
    ), A14,
    APEX_ITEM. (TEXT)
    48I
    C018,
    20,
    50,
    NULL,
    "f18_" | "#ROWNUM #
    ) as H1.
    APEX_ITEM. (TEXT)
    19,
    C019,
    20,
    50,
    NULL,
    "f19_" | "#ROWNUM #
    ) as H2.
    APEX_ITEM. (TEXT)
    20,
    C020,
    20,
    50,
    NULL,
    "f20_" | "#ROWNUM #
    ) as H3,.
    APEX_ITEM. (TEXT)
    21,
    C021,
    20,
    50,
    NULL,
    "f21_" | "#ROWNUM #
    ) as H4,.
    APEX_ITEM. (TEXT)
    22,
    C022,
    20,
    50,
    NULL,
    "f22_" | "#ROWNUM #
    ) as H5.
    APEX_ITEM. (TEXT)
    23,
    c023,
    20,
    50,
    NULL,
    "f23_" | "#ROWNUM #
    ) as H6.
    APEX_ITEM. (TEXT)
    24,
    C024,
    20,
    50,
    NULL,
    "f24_" | "#ROWNUM #
    ) as H7.
    APEX_ITEM. (TEXT)
    25,
    see C025,
    20,
    50,
    NULL,
    "f25_" | "#ROWNUM #
    ) as H8.
    APEX_ITEM. (TEXT)
    26,
    C026,
    20,
    50,
    NULL,
    "f26_" | "#ROWNUM #
    ) as H9.
    APEX_ITEM. (TEXT)
    27,
    c027,
    20,
    50,
    NULL,
    "f27_" | "#ROWNUM #
    ) as the H10.
    APEX_ITEM. (TEXT)
    28,
    c028,
    20,
    50,
    NULL,
    "f28_" | "#ROWNUM #
    ) as H11.
    APEX_ITEM. (TEXT)
    29,
    c029,
    20,
    50,
    NULL,
    "f29_" | "#ROWNUM #
    ) as H12.
    APEX_ITEM. (TEXT)
    60I
    C030,
    20,
    50,
    NULL,
    "f30_" | "#ROWNUM #
    ) as H13.
    APEX_ITEM. (TEXT)
    31,
    C031,
    20,
    50,
    NULL,
    "f31_" | "#ROWNUM #
    ) as H14

    Of apex_collections
    WHERE collection_name = "WORK_TABLE."

    ***********************************
    Page to the collection:

    DECLARE

    l_collection_name APEX_COLLECTIONS. COLLECTION_NAME % TYPE;
    l_original_md5 VARCHAR2 (3000);
    l_latest_md5 VARCHAR2 (3000);

    BEGIN

    l_collection_name: = 'WORK_TABLE ';

    FOR x IN 1... apex_application.g_f49. Count
    LOOP
    IF apex_application.g_f01 (x) IS NOT NULL - ID exists, check to see if the record has been updated
    THEN
    SELECT C048
    IN l_original_md5
    Of apex_collections
    WHERE collection_name = l_collection_name
    AND seq_id = apex_application.g_f49 (x);

    l_latest_md5: = wwv_flow_item.md5)
    apex_application.g_f01 (x),
    apex_application.g_f02 (x),
    apex_application.g_f03 (x),
    apex_application.g_f04 (x),
    apex_application.g_f05 (x),
    apex_application.g_f06 (x),
    apex_application.g_f07 (x),
    apex_application.g_f08 (x),
    apex_application.g_f09 (x),
    apex_application.g_f10 (x),
    apex_application.g_f11 (x),
    apex_application.g_f12 (x),
    apex_application.g_f13 (x),
    apex_application.g_f14 (x),
    apex_application.g_f15 (x),
    apex_application.g_f16 (x),
    apex_application.g_f17 (x),
    apex_application.g_f18 (x),
    apex_application.g_f19 (x),
    apex_application.g_f20 (x),
    apex_application.g_f21 (x),
    apex_application.g_f22 (x),
    apex_application.g_f23 (x),
    apex_application.g_f24 (x),
    apex_application.g_f25 (x),
    apex_application.g_f26 (x),
    apex_application.g_f27 (x),
    apex_application.g_f28 (x),
    apex_application.g_f29 (x),
    apex_application.g_f30 (x),
    apex_application.g_f31 (x)
    );

    IF l_original_md5! = l_latest_md5
    THEN
    () apex_collection.update_member
    p_collection_name = > l_collection_name,
    p_seq = > apex_application.g_f49 (x),
    p_c001 = > apex_application.g_f01 (x),
    p_c002 = > apex_application.g_f02 (x),
    p_c003 = > apex_application.g_f03 (x),
    p_c004 = > apex_application.g_f04 (x),
    p_c005 = > apex_application.g_f05 (x),
    p_c006 = > apex_application.g_f06 (x),
    p_c007 = > apex_application.g_f07 (x),
    p_c008 = > apex_application.g_f08 (x),
    p_c009 = > apex_application.g_f09 (x),
    p_c010 = > apex_application.g_f10 (x),
    p_c011 = > apex_application.g_f11 (x),
    p_c012 = > apex_application.g_f12 (x),
    p_c013 = > apex_application.g_f13 (x),
    p_c014 = > apex_application.g_f14 (x),
    p_c015 = > apex_application.g_f15 (x),
    p_c016 = > apex_application.g_f16 (x),
    p_c017 = > apex_application.g_f17 (x),
    p_c018 = > apex_application.g_f18 (x),
    p_c019 = > apex_application.g_f19 (x),
    p_c020 = > apex_application.g_f20 (x),
    p_c021 = > apex_application.g_f21 (x),
    p_c022 = > apex_application.g_f22 (x),
    p_c023 = > apex_application.g_f23 (x),
    p_c024 = > apex_application.g_f24 (x),
    p_c025 = > apex_application.g_f25 (x),
    p_c026 = > apex_application.g_f26 (x),
    p_c027 = > apex_application.g_f27 (x),
    p_c028 = > apex_application.g_f28 (x),
    p_c029 = > apex_application.g_f29 (x),
    p_c030 = > apex_application.g_f30 (x),
    p_c031 = > apex_application.g_f31 (x),
    p_c047 = > 'U,'
    p_c048 = > apex_application.g_f48 (x)
    );
    END IF;
    Else - ID does not exist, it must be new record
    () apex_collection.update_member
    p_collection_name = > l_collection_name,
    p_seq = > apex_application.g_f49 (x),
    p_c001 = > apex_application.g_f01 (x),
    p_c002 = > apex_application.g_f02 (x),
    p_c003 = > apex_application.g_f03 (x),
    p_c004 = > apex_application.g_f04 (x),
    p_c005 = > apex_application.g_f05 (x),
    p_c006 = > apex_application.g_f06 (x),
    p_c007 = > apex_application.g_f07 (x),
    p_c008 = > apex_application.g_f08 (x),
    p_c009 = > apex_application.g_f09 (x),
    p_c010 = > apex_application.g_f10 (x),
    p_c011 = > apex_application.g_f11 (x),
    p_c012 = > apex_application.g_f12 (x),
    p_c013 = > apex_application.g_f13 (x),
    p_c014 = > apex_application.g_f14 (x),
    p_c015 = > apex_application.g_f15 (x),
    p_c016 = > apex_application.g_f16 (x),
    p_c017 = > apex_application.g_f17 (x),
    p_c018 = > apex_application.g_f18 (x),
    p_c019 = > apex_application.g_f19 (x),
    p_c020 = > apex_application.g_f20 (x),
    p_c021 = > apex_application.g_f21 (x),
    p_c022 = > apex_application.g_f22 (x),
    p_c023 = > apex_application.g_f23 (x),
    p_c024 = > apex_application.g_f24 (x),
    p_c025 = > apex_application.g_f25 (x),
    p_c026 = > apex_application.g_f26 (x),
    p_c027 = > apex_application.g_f27 (x),
    p_c028 = > apex_application.g_f28 (x),
    p_c029 = > apex_application.g_f29 (x),
    p_c030 = > apex_application.g_f30 (x),
    p_c031 = > apex_application.g_f31 (x),
    p_c047 = > 'n',.
    p_c048 = > apex_application.g_f48 (x)
    );
    END IF;
    END LOOP;

    IF: REQUEST = 'DELETE '.
    THEN
    FOR x IN 1... apex_application.g_f50. Count
    LOOP
    () apex_collection.update_member_attribute
    p_collection_name = > l_collection_name,
    p_seq = > apex_application.g_f50 (x),
    p_attr_number = > '47',.
    p_attr_value = > has '
    );
    END LOOP;
    END IF;

    END;


    ****************************
    The table collection

    DECLARE

    l_table_md5 VARCHAR2 (32);
    l_collection_name APEX_COLLECTIONS. COLLECTION_NAME % TYPE;
    l_del_count PLS_INTEGER: = 0;
    l_upd_count PLS_INTEGER: = 0;
    l_ins_count PLS_INTEGER: = 0;
    l_success_message VARCHAR2 (32767).

    CURSOR op_lock_check_cur (p_id in NUMBER)
    IS
    SELECT wwv_flow_item.md5 (seq_no, fk_paygrade, annual_hour, a1, a2, a3, a4, a5, a6, a7, a8,
    A9, a10, a11, a12, a13, a14, h1, h2, h3, h4, h5, h6, h7, h8, h9,
    H10, h11, h12, h13, h14)
    OF paygrade_increase
    WHERE seq_no = op_lock_check_cur.p_id
    UPDATE;

    BEGIN

    l_collection_name: = 'WORK_TABLE ';

    FOR x IN)
    SELECT *.
    Of apex_collections
    WHERE collection_name = l_collection_name
    AND IN c047 (', 'U' ' d ' ")
    )
    LOOP
    IF x.c047 = ' don't
    THEN
    INSERT INTO PAYGRADE_INCREASE)
    seq_no,
    fk_paygrade,
    annual_hour,
    A1,
    A2,
    A3,
    A4,
    A5,
    A6,
    A7,
    A8,
    A9,
    A10,
    A11,
    A12,
    A13,
    A14,
    H1,
    H2,
    H3,
    H4,
    H5,
    H6,
    H7,
    H8,
    H9,
    H10,
    H11,
    H12,
    H13,
    H14
    ) (VALUES
    users_seq.nextval,
    x.C002,
    x.C003,
    x.C004,
    x.C005,
    x.C006,
    x.C007,
    x.C008,
    x.C009,
    x.C010,
    x.C011,
    x.C012,
    x.C013,
    x.C014,
    x.C015,
    x.C016,
    x.c017,
    x.C018,
    x.C019,
    x.C020,
    x.C021,
    x.C022,
    x.c023,
    x.C024,
    x.C025,
    x.C026,
    x.c027,
    x.c028,
    x.c029,
    x.C030,
    x.C031
    );

    l_ins_count: = l_ins_count + 1;
    ELSIF x.c047 = "U".
    THEN
    -Control of optimistic locking
    -MD5 should be identical to the collection of initialization proc
    OPEN op_lock_check_cur (x.c001);
    SEEK op_lock_check_cur INTO l_table_md5;

    -Compare checksum values and if they are different, trigger an error.
    IF l_table_md5! = x.c048
    THEN
    raise_application_error)
    -20001,
    "Current version of the data in the database has changed."
    || "since the process of update initiated by the user."
    );
    END IF;

    UPDATE paygrade_increase
    SET fk_paygrade = x.c002,
    annual_hour = x.c003,
    A1 = x.c004,
    A2 = x.c005,
    A3 = x.c006,
    A4 = x.c007,
    A5 = x.c008,
    A6 = x.c009,
    A7 = x.c010,
    A8 = x.c011,
    A9 = x.c012,
    A10 = x.c013,
    A11 = x.c014,
    A12 = x.c015,
    A13 = x.c016,
    A14 = x.c017,
    H1 = x.c018,
    H2 = x.c019,
    H3 = x.c020,
    H4 = x.c021,
    H5 = x.c022,
    H6 = x.c023,
    H7 = x.c024,
    H8 = x.c025,
    H9 = x.c026,
    H10 = x.c027,
    H11 = x.c028,
    H12 = x.c029,
    H13 = x.c030,
    H14 = x.c031

    WHERE CURRENT OF op_lock_check_cur;

    CLOSE Op_lock_check_cur;

    l_upd_count: = l_upd_count + 1;
    ELSIF x.c047 = '
    THEN
    DELETE FROM paygrade_increase
    WHERE seq_no = x.c001;

    l_del_count: = l_del_count + 1;
    END IF;
    END LOOP;

    apex_collection.delete_collection (p_collection_name = > l_collection_name);

    l_success_message: =.
    l_ins_count | "rows inserted." |
    l_upd_count | "the lines updated." |
    l_del_count | "deleted rows";

    : PX_SUCCESS_MESSAGE: = l_success_message;

    END;

    Thank you very much
    MT

    Hello

    You need to change your "Page-to-collection: 'code so that you mark the collection member c047 as update (U) only if the checkbox of that particular line has been activated." Given that the global checkbox APEX_APPLICATION variable contains only values checked, you need to perform a loop on the variable in the box for each line determine if the box has been activated.

    Here's the pseudocode:

    -- Your "Page-to-collection:" code
    -- continues until this below line...
    IF l_original_md5 != l_latest_md5
    THEN
       --
       -- additional check: mark collection member
       -- as updated only if checkbox is checked
       --
       -- Loop through checked values array
       -- to see if the current row checkbox was checked
       --
       FOR y IN 1 .. apex_application.g_f50.count
       LOOP
          --
          -- compare SEQ_ID stored in hidden item (f49)
          -- against SEQ_ID stored in checkbox (f50)
          --
           IF apex_application.g_f49(x) = apex_application.g_f50(y)
           THEN
             apex_collection.update_member(
             p_collection_name => l_collection_name,
             p_seq => apex_application.g_f49(x),
             p_c001 => apex_application.g_f01(x),
             p_c002 => apex_application.g_f02(x),
             p_c003 => apex_application.g_f03(x),
             p_c004 => apex_application.g_f04(x),
             p_c005 => apex_application.g_f05(x),
             p_c006 => apex_application.g_f06(x),
             p_c007 => apex_application.g_f07(x),
             p_c008 => apex_application.g_f08(x),
             p_c009 => apex_application.g_f09(x),
             p_c010 => apex_application.g_f10(x),
             p_c011 => apex_application.g_f11(x),
             p_c012 => apex_application.g_f12(x),
             p_c013 => apex_application.g_f13(x),
             p_c014 => apex_application.g_f14(x),
             p_c015 => apex_application.g_f15(x),
             p_c016 => apex_application.g_f16(x),
             p_c017 => apex_application.g_f17(x),
             p_c018 => apex_application.g_f18(x),
             p_c019 => apex_application.g_f19(x),
             p_c020 => apex_application.g_f20(x),
             p_c021 => apex_application.g_f21(x),
             p_c022 => apex_application.g_f22(x),
             p_c023 => apex_application.g_f23(x),
             p_c024 => apex_application.g_f24(x),
             p_c025 => apex_application.g_f25(x),
             p_c026 => apex_application.g_f26(x),
             p_c027 => apex_application.g_f27(x),
             p_c028 => apex_application.g_f28(x),
             p_c029 => apex_application.g_f29(x),
             p_c030 => apex_application.g_f30(x),
             p_c031 => apex_application.g_f31(x),
             p_c047 => 'U',
             p_c048 => apex_application.g_f48(x)
             );
           END IF;
       END LOOP; -- end checkbox loop
    END IF; -- end UPDATE check
    ELSE --ID does not exist, must be new record
    --
    -- rest of the code for "Page-to-collection:"
    --
    

    Thank you!

    JMcG

  • Change the number in Varchar2 Data Type

    Hello

    We have a running production applications. There is a column called home_number which is a type of data number, now called the new requirement to change of varchar2.

    I tried to edit the table get the below error.


    -Edit the "TECH_SOURCING_EMPLOYEE_DETAILS" table change
    -("HOME_PH_NUMBER" VARCHAR2 (1000))
    -- /

    -ORA-01439: column to change must be empty to change data type

    Please suggest me how to change the data type of column without affecting the data.

    Thank you
    Sudhir

    Try below, I tested in my database.

    create table tmp
    (ID NUMBER,
     HOME_NUMBER NUMBER(8));
    
    insert into tmp values(1, 9122222);
    
    alter table tmp add MY_HOME_NUMBER VARCHAR2(1000);
    
    update tmp
      set my_home_number = home_number;
    
    update tmp
       set home_number = NULL; 
    
    alter table tmp drop column home_number;   
    
    alter table tmp rename column my_home_number to home_number; 
    
  • APEX 4.01 collections rendering problem

    I'm creating a collection using apex 4.01.

    I created an application with a blank page.
    I then added a region on the page.
    I've created a report in the region with a source of the sql query. I then placed the query in the source section.

    I created a load on before the header process which loads the EMP table collection.

    When I run instead of getting my output display as intended in the collection, it displays the data in the html tags. Its as if the HTML is not be stripped.
    I see where in the attributes report there is an option to strip HTML. I set to Yes. Its in the section layout and pagination of the attributes of the rpt.

    Here is an example of what the report is rendered:

    < input type = "hidden" name = "f01" value = "7934" / > < span > </span > 7934 < input type = "text" name = "f02" size = "10" maxlength = value "2000" = "MILLER" / >

    Make sure the column attribute display as for the report column is column of Standard report.

  • I want to update the verson using celluler data how is possible

    I want to update the verson using celluler data how is possible

    WiFi or iTunes > update the iOS on your iPhone, iPad or iPod touch - Apple Support software

  • I show two updates of security with a date of 1969 is that right

    I show two updates of security with a date of 1969 are those just my Fox fire beginning very slow very very slow

    This has happened

    Each time Firefox opened

    Is a month ago

    Firefox must have had a problem getting the time to update your system clock, and so the timing of this update is zero. Time (beginning of time) for Unix is 01/01/1970 midnight GMT, less your GMT offset - what makes 12/31/1969 and 2 to 6 pm on North America.

  • Why the last OS update cost me gigabytes of data when you are connected directly to my computer and ISP via Itunes February 29, 2016

    Why the last OS update cost me gigabytes of data when you are connected directly to my computer and ISP via Itunes.  29 February 2016

    While it is connected to ITunes via my Dell system, I was informed of the latest OS update for my IPhone 6.  I decided that the direct connection to the internet would be the fastest way to download and install the software.  During the process I started to have some warning of our AT & T account that I approach the limit of our data plan, then in quick succession, only warnings, said I've reached the limit and then passed in the data, limit charges.  At the time it was done, I had accumulated more than 2 gigabytes of additional data charges.

    Until that point, I was very pleased with the device and confident in the ability to use Wifi and data.  Due to this incident, I became very suspicious of the camera and the huge potential for data overcharges. It is extremely disconcerting as it happened while it is directly connected to the internet using my computer at home.

    Please note that, in the episode my ISP and the computer is remained connected to the WEB with no sign of connectivity issues.

    Someone at - he had a similar experience and understand what went wrong?

    Thanks for your support,

    Jerry

    JerrolK wrote:

    Why the last OS update cost me gigabytes of data when you are connected directly to my computer and ISP via Itunes.  29 February 2016

    While it is connected to ITunes via my Dell system, I was informed of the latest OS update for my IPhone 6.  I decided that the direct connection to the internet would be the fastest way to download and install the software.

    You have chosen the option of direct download, you have received a message of warning from AT & T about it yet.

    He did what you asked it to do.

Maybe you are looking for