The analysis through the Multi selection of values in a PL/SQL procedure

Greetings,

This should be an easy one for either of you, experts of PL/SQL. I'm not, so I'm not sure how to code this upward.

I have a Multi selection page element and am passing the value of it to a routine of PL/SQL as a parameter. I am able to use the value if I spend only a value of my procedure, so I work. But not with multiple values, I need the code in the procedure to loop through the values. How do I code that a period? The procedure is relatively short and is included below. p_cell is multivalued parameter.

Oh Yes... Probably, you need to know this. The values are coming like this - 1-3:2-3:3 - 3:5:6

In addition, values are the coordinates XY of a grid I have a picture on the page. The routine removes certain cells (1-3, etc.) of the grid. The grid is created using HTML, so I have to remove lines of HTML to remove a cell in the grid. Just in case this is useful.

THX, Tony

= = = = = = =

create or replace
procedure qcis_remove_grid_cell (p_id in NUMBERS, p_cell IN VARCHAR2) as
number of V_POSITION;
number of v_position_from_end;
number of v_line_start;
number of v_line_end;
number of V_LENGTH;
CLOB v_html;

BEGIN

BEGIN
Select imagemap_html in the v_html of qcis_im_template_draft
where header_id = p_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_html: = NULL;
END;

V_LENGTH: = length (v_html);
V_POSITION: = INSTR (v_html, "alt =" "|") p_cell |' « ') ;
v_position_from_end: = (v_length - v_position) *-1;
v_line_start: = INSTR (v_html,' < area shape ', v_position_from_end)-1;
v_line_end: = INSTR (v_html,'/ > ', v_position) + 2;
v_html: = substr(v_html,1,v_line_start) | substr (v_html, v_line_end);

UPDATE qcis_im_template_draft SET imagemap_html is WHERE header_id p_id = v_html;.

END qcis_remove_grid_cell;

Published by: hidden November 1, 2011 08:01

Not sure, I understand your need, but it sounded like you must decrypt a string in a set of rows. If so, I will give you 2 ideas:
1 function STRING_TO_TABLE: http://www.sloug.org/i/doc/api073.htm
2. other resources (regular expression or XML): http://apex-at-work.blogspot.com/2011/05/two-ways-using-string-to-table-in-apex.html

Tags: Database

Similar Questions

  • Failed to retrieve the multi selection of values using the child form

    Hi all

    I'm a newbie on OIM 11 g. Need a small suggestion.

    I have a requirement that I need to display a list of all services and the user can select more than one Department. Based on the need of some departments to pick up employees of the departments.

    I created the child form and added an attribute to retrieve the departments of Looups.
    Added the child form to your Parent process.


    Can someone help me by providing the next steps to achieve this functionality.


    Thank you
    SG

    Do not know if I understood your request correctly or not, but here are my understanding:

    You have users associated with different users. You want to set up users in some RO and why you created a few model numbers for select users.

    I hope that you have some kind of relationship between departments and users
    Have a single Dataset Parent
    Create a child Dataset and have two search boxes - a Department and second for the user
    Use search queries to select user based on the selected service in Field1
    Field2 be required i.e. user

    In the same way, create two processes form Parent and child. Child form will have two fields. You can create text fields.
    After approval, the data selected on dataset will come to your child process
    Create corresponding task of the trigger for INSERTION in the definition of the process that will read data from child to process the form and arrangement of these users. (Research Forum or go through Oracle Docs to learn more about these triggers to child form)

  • By the way Select list value to another page via report link

    Hello

    I have a page 1001 with an item from the selection list (SLI), a button (BTN) and a report (EPR).

    After selecting a value of the element of selection it s possible to click on the button.

    After clicking the report button will display the data. Report structure: ID, COL1, COL2, COL3, COD values in COL1 is the links to the page 1011.

    I managed to pass the value of a column in the report, but how to pass the value of SLI this link?

    I tried: SLI, SLI, #SLI # and & SLI... but nothing has worked.

    You have an idea?

    1013248 wrote:

    Please update your forum profile with a real handle instead of '1013248 '.

    I have a page 1001 with an item from the selection list (SLI), a button (BTN) and a report (EPR).

    After selecting a value of the element of selection it s possible to click on the button.

    After clicking the report button will display the data. Report structure: ID, COL1, COL2, COL3, COD values in COL1 is the links to the page 1011.

    I managed to pass the value of a column in the report, but how to pass the value of SLI this link?

    I tried: SLI, SLI, #SLI # and & SLI... but nothing has worked.

    You have an idea?

    Use the exact static text substitution method to reference the value of the element. This requires an end point ('.) ») :

    &SLI.
    
  • How to use the multiple selection list values in sql query

    Hi all
    In the search form, I have a multiselect llist tell (P3_STATUS) and I want to have a query using this element and fetch documents
    How to do a sql query based on the selection of the value of this element.
    SELECT "W"."START_DT" "Start Date",
           "W"."CAMPAIGN_CODE" "Campaign Name",  
           "W"."MKT_CHANNEL" "Channel",
           "W"."MKT_SUB_CHANNEL" "Sub Channel", 
           "W"."PROMO_CODE" "Promo Code",
           "W"."TRACKING_CODE" "Tracking Code",
           "W"."TFN" "TFN",
           "W"."STATUS" "Status",
           "W"."CAMPAIGN_CODE" "Edit"
           FROM 
             "WC_MKT_CAMPAIGN_DS" "W"
      
           WHERE 
         (MKT_CHANNEL = decode(:P1_CHANNEL,'%null%',MKT_CHANNEL,NULL,MKT_CHANNEL,:P1_CHANNEL))
       AND
    (MKT_SUB_CHANNEL= decode(:P1_SUB_CHANNEL,'%null%',MKT_SUB_CHANNEL,NULL,MKT_SUB_CHANNEL,:P1_SUB_CHANNEL))
    AND *STATUS = decode(.................*
    Please could someone help me on this?

    Thanks in advance
    Robert L

    Try to change your selection of status to

    AND INSTR(':'||:P3_STATUS||':',':'||STATUS||':') > 0
    
  • How to use the record type as a parameter IN PL/SQL procedure or package

    Hi people,

    I need help on the record as the OUT parameter type. I am able to get out a single line as a parameter, but not getting do not idea how to get a multi ranks as output parameter.

    I have the code that works very well for a single line. Please see CODE1.

    But when I try to get several lines, I'm failing to do. Please see the CODE2. I get the error of compilation as


    Error report:

    ORA-06550: line 11, column 35:

    PLS-00487: Invalid reference to the variable "P_NAME.

    ORA-06550: line 11, column 1:

    PL/SQL: Statement ignored

    06550 00000 - "line %s, column % s:\n%s".

    * Cause: Usually a PL/SQL compilation error.

    Any help or a sample execution of script would be really useful.

    Thanks in advance.

    YZ

    --------------------------CODE1------------------------------------------

    -------------------------Package Spec-------------------------------

    CREATE OR REPLACE

    PACKAGE xx_sample_pkg as

    --

    Xx_sample_table_rectype RECORD TYPE IS

    (p_name varchar2 (40))

    number of p_emp_id

    );

    PROCEDURE xx_sample_prc (xx_sample_rec1, OUT xx_sample_table_rectype);

    END xx_sample_pkg;

    ------------------------------Package Body------------------------

    create or replace

    PACKAGE xx_sample_pkg AS BODY

    --

    PROCEDURE xx_sample_prc (xx_sample_rec1 OUT xx_sample_table_rectype) IS

    BEGIN

    SELECT ename, empno

    IN xx_sample_rec1

    FROM scott.emp

    WHERE ename = 'SMITH ';.

    END xx_sample_prc;

    END xx_sample_pkg;

    -------------------------------------------Execute----------------------

    DECLARE

    l_rec_type xx_sample_pkg.xx_sample_table_rectype;

    BEGIN

    dbms_output.put_line ('xx_sample_prc appeal');

    xx_sample_pkg.xx_sample_prc (l_rec_type);

    dbms_output.put_line ('YZ' | l_rec_type.p_name |') '|| l_rec_type.p_emp_id);

    END;

    ---------------------------------------------------------------

    -------------------------CODE2-------------------------------------------

    -------------------------Package Spec-------------------------------

    CREATE OR REPLACE

    PACKAGE xx_sample_pkg as

    --

    Xx_sample_table_rectype RECORD TYPE IS

    (p_name varchar2 (40))

    number of p_emp_id

    );

    PROCEDURE xx_sample_prc (xx_sample_rec1, OUT xx_sample_table_rectype);

    END xx_sample_pkg;

    ------------------------------Package Body------------------------

    create or replace

    PACKAGE xx_sample_pkg AS BODY

    --

    PROCEDURE xx_sample_prc (xx_sample_rec1 OUT xx_sample_table_rectype) IS

    BEGIN

    SELECT ename, empno

    IN xx_sample_rec1

    FROM scott.emp;

    END xx_sample_prc;

    END xx_sample_pkg;

    -------------------------------------------Execute----------------------

    DECLARE

    l_rec_type xx_sample_pkg.xx_sample_table_rectype;

    BEGIN

    dbms_output.put_line ('xx_sample_prc appeal');

    xx_sample_pkg.xx_sample_prc (l_rec_type);

    for l_rec in 1.l_rec_type.p_name.count

    loop

    dbms_output.put_line ('YZ' | l_rec_type.p_name (l_rec) |) » '|| l_rec_type.p_emp_id (l_rec));

    end loop;

    end;

    ---------------------------------------------------------------

    bb8c573a-6ca3-4d7c-90ed-e55c2df67201 wrote:

    But now, my question would be why the record type could not be used? My understanding is missing some concept between use of type type array collection record vs. Please specify.

    Do not confuse the folder with the collection.

    SY.

  • VALUES in a PL/SQL procedure

    Hi Experts,

    Please can someone help me with this procedure? I'm writing this procedure I can use to grant privileges dynamically to roles based on the argument.
    I get errors when creating it because it does not affect the values in the CASE statement based on the IN arguments.



    CREATE OR REPLACE PROCEDURE GENERATE_GRANTS (OWNNAME IN VARCHAR2, ROLENAME IN VARCHAR2, OP_TYPE VARCHAR2) 
    AS
    SQL_STATEMENT      VARCHAR2 (200);
    err_code      number(10);
    err_msg      VARCHAR2(200);
    OBJTYPES      VARCHAR2(200);
    BEGIN
    
    CASE OP_TYPE
    WHEN 'READ'           THEN OBJTYPES := ( 'TABLE', 'VIEW');
    WHEN 'READWRITE'      THEN OBJTYPES := ( 'TABLE', 'VIEW', 'SEQUENCE', 'PROCEDURE', 'PACKAGE','FUNCTION' );
    END CASE;
    
    
    FOR ITEM IN (SELECT (
         decode(
         object_type,
         'TABLE','GRANT SELECT, INSERT, UPDATE, DELETE ON '|| OWNNAME ||'.',
         'VIEW','GRANT SELECT ON '||  OWNNAME ||'.',
         'SEQUENCE','GRANT SELECT ON '|| OWNNAME ||'.',
         'PROCEDURE','GRANT EXECUTE ON '|| OWNNAME ||'.',
         'PACKAGE','GRANT EXECUTE ON '|| OWNNAME ||'.',
         'FUNCTION','GRANT EXECUTE ON'|| OWNNAME ||'.' )||object_name||' TO '||ROLENAME
         ) as GRANT_SQL
         FROM dba_objects 
         WHERE OWNER = OWNNAME
         AND OBJECT_TYPE IN OBJTYPES     
         ORDER BY OBJECT_TYPE)
    LOOP
    SQL_STATEMENT := ITEM.GRANT_SQL;
    BEGIN
    EXECUTE IMMEDIATE SQL_STATEMENT;
    EXCEPTION
    WHEN OTHERS
    THEN -- handles all other errors
    
    err_code := SQLCODE;
    err_msg := substr(SQLERRM, 1, 200);
    
    DBMS_OUTPUT.PUT_LINE (SQL_STATEMENT);
    DBMS_OUTPUT.PUT_LINE (err_code || ' ' || err_msg);
    
    END;
    
    END LOOP;
    END;
    /

    (a) your CASE statement has an erroneous syntax.
    (b) in order to be able to use OBJECTTYPES as you would require dynamic SQL.

    Use it instead:

    CREATE OR REPLACE
      PROCEDURE GENERATE_GRANTS(
                                OWNNAME IN VARCHAR2,
                                ROLENAME IN VARCHAR2,
                                OP_TYPE VARCHAR2
                               )
        AS
        BEGIN
            FOR ITEM IN (
                         SELECT  decode(
                                        object_type,
                                        'TABLE','GRANT SELECT, INSERT, UPDATE, DELETE ON '|| OWNNAME ||'.',
                                        'VIEW','GRANT SELECT ON '||  OWNNAME ||'.',
                                        'SEQUENCE','GRANT SELECT ON '|| OWNNAME ||'.',
                                        'PROCEDURE','GRANT EXECUTE ON '|| OWNNAME ||'.',
                                        'PACKAGE','GRANT EXECUTE ON '|| OWNNAME ||'.',
                                        'FUNCTION','GRANT EXECUTE ON'|| OWNNAME ||'.'
                                       ) || object_name || ' TO '||ROLENAME AS GRANT_SQL
                           FROM  dba_objects
                           WHERE OWNER = OWNNAME
                           AND 1 = CASE
                                     WHEN OP_TYPE = 'READ' AND OBJECT_TYPE IN ('TABLE','VIEW') THEN 1
                                     WHEN OP_TYPE = 'READWRITE' AND OBJECT_TYPE IN ('TABLE','VIEW','SEQUENCE','PROCEDURE','PACKAGE','FUNCTION') THEN 1
                                   END
                           ORDER BY OBJECT_TYPE
                        )
              LOOP
                BEGIN
                    EXECUTE IMMEDIATE ITEM.GRANT_SQL;
                  EXCEPTION
                    WHEN OTHERS
                      THEN -- handles all other errors
                        DBMS_OUTPUT.PUT_LINE (ITEM.GRANT_SQL);
                        DBMS_OUTPUT.PUT_LINE (SQLCODE || ' ' || substr(SQLERRM, 1, 200));
                END;
            END LOOP;
    END;
    /
    

    SY.

  • multi select sql problem - ORA-01722: invalid number

    Hello

    I have a multi select list and when I select only one item it works perfectly, but if I select several items, it gives an error. The sql statement is as below:

    SELECT * VIEW WHERE INSTR (': ' |: P1_ID |': ',' :'||) ID: ': ') > 0

    and I get the following error:

    ORA-01722: invalid number


    Here is some information on the display:
    Name of the column
    Data Type (NUMBER)
    Nullable (No.)

    Hello

    I just try this in my own sandbox application to sand...

    Create report area with

    SELECT t_id, t_code
    FROM t_table
    WHERE INSTR(':'||TO_CHAR(:P1_ID)||':', ':'||TO_CHAR(t_id)||':') > 0
    

    as the source.

    Create multiple selection list

    SELECT t_code, t_id
    FROM t_table
    

    as the source.

    Create a button with application of GO, subordinate the region report on request = GB.

    Now, I run the page, select a value in the list, click on go - region displays with the correct result.

    Now I run the page, select several values in the list, click on go - region displays with good results.

    What is your scenario? If so, it works for me...

    See you soon

    Ben
    http://www.munkyben.WordPress.com
    Don't forget to mark the answers useful or correct ;)

  • 10.1.3.4.2 - Multi Select guest - research shows too many results

    Hello

    Someone sees a situation...

    When you use a multiple selection of dash prompt, the prompt has the following clause to return only the code with the status of N = select ID from table where status in (' ' n ') and it works fine

    but in the guest even if we use the code names of search for example Contains "XXX", it will return all codes regardless of status, though even she must return only status = N codes,.

    any ideas...

    Thank you

    Hello

    I assume you are using the available inside the Multi selection prompt search filter?

    If this is the case, then this is how OBIEE multi select work. When you apply the search condition in mutiselect, it generates a new query with the condition provided in exculdes and the search filter no matter what external sql filter.

    If you want to keep the filter at the prompt, use condition you be the guest (fx). It will be useful.

    See you soon

    HN

  • How to call a method defined in AM when I select a value in LOV

    Lets say there is a LOV. The scenario is as soon as I select a value in LOV, a method should be called I wrote in the AM. And the output of the method in an output text area.

    I am not able to understand how to call a method when the user selects a value from the LOV.


    This is wht I did. I had created the connection for the method. One replaced the property autosubmit to the LOV for real and in the properties of the output area, in partial submission trigger property, the ID of the LOV. But I don't have any place where I need to call the method. I'm also not able to remove a listener for action on the LOV
  • Insertion of 2 items in the PL/SQL procedure

    Hello

    I am writing a database to a control system which is as follows:

    Drop table Orders cascade constraints;
    Drop type item_type;
    Type of projection Item_nested;

    Create or replace Type item_type () AS Object
    Cat_code Varchar2 (6).
    Amount_ord Number (3).
    Cost Number (5.2));
    /

    Create or replace Type item_nested as the item_type table;
    /

    Create Table orders)
    Key primary forced pkorder of Order_no Varchar2 (8).
    Client_name Varchar2 (30),
    AddressLine1 Varchar2 (20).
    AddressLine2 Varchar2 (20).
    City Varchar2 (20).
    Code postal Varchar2 (10),
    Country Varchar2 (20).
    Order_items item_nested,
    Order_date Date)
    The nested Table Order_items
    Store nested_items return in the form of index;

    I wrote a PL/SQL procedure to enter all the necessary information including 1 item ordered (which is Order_items as a nested table). It's as follows:

    CREATE OR REPLACE PROCEDURE add_1order (ordno IN VARCHAR2, Cust_name IN VARCHAR2, add1 IN VARCHAR2,
    Add2 IN VARCHAR2, Addtown IN VARCHAR2, Pstcde IN VARCHAR2, addcountry IN VARCHAR2,
    cat_cde IN VARCHAR2, Amnt_ord in NUMBERS, itemcost in NUMBER, ord_date IN DATE)
    AS
    BEGIN

    DBMS_OUTPUT. Put_line ('Insert attempted");

    INSERT INTO Orders (Order_no, client_name, AddressLine1, AddressLine2, city, postal code, country, order_items, Order_Date)
    VALUES (ordno, Cust_name, add1, add2, Addtown, Pstcde, addcountry, item_nested (item_type (cat_cde, Amnt_ord, itemcost))
    ord_date);

    DBMS_OUTPUT. Put_line ('Insert successful");

    EXCEPTION
    WHILE OTHER THEN DBMS_OUTPUT. PUT_LINE ('ERROR');
    DBMS_OUTPUT. Put_line ('procedure failed");
    END;
    /

    I need to write another procedure that will allow me to insert elements of order 2, but I can't handle

    Can anyone help please?

    See you soon

    SG200407 wrote:

    Just another question - is possible in this PL/SQL statement for only 2 articles are updated and not more?

    Ensure that:

    CREATE OR REPLACE
      PROCEDURE add_order(
                          ordno      IN VARCHAR2,
                          Cust_name  IN VARCHAR2,
                          add1       IN VARCHAR2,
                          add2       IN VARCHAR2,
                          Addtown    IN VARCHAR2,
                          Pstcde     IN VARCHAR2,
                          addcountry IN VARCHAR2,
                          item_list  IN item_nested,
                          ord_date   IN DATE
                         )
        AS
        BEGIN
            IF item_list.count > 2
              THEN
                DBMS_OUTPUT.PUT_LINE ('Too many (' || item_list.count ||
                                        ') order items. Maximum number of items per order is 2.'
                                     );
                RAISE_APPLICATION_ERROR(
                                        -20900,
                                        'Too many (' || item_list.count ||
                                        ') order items. Maximum number of items per order is 2.'
                                       );
            END IF;
    
            DBMS_OUTPUT.PUT_LINE ('Insert attempted');
    
            INSERT
              INTO Orders
              VALUES(
                     ordno,
                     Cust_name,
                     add1,
                     add2,
                     Addtown,
                     Pstcde,
                     addcountry,
                     item_list,
                     ord_date
                    );
    
            DBMS_OUTPUT.PUT_LINE ('Insert successful');
    
          EXCEPTION
            WHEN OTHERS
              THEN
                DBMS_OUTPUT.PUT_LINE ('ERROR');
                DBMS_OUTPUT.PUT_LINE ('Procedure failed');
    END;
    /
    BEGIN
        add_order(
                  1,
                  'Customer1',
                  '100 Main Street',
                  NULL,
                  'New York',
                  '12345',
                  'USA',
                  item_nested(
                              item_type('book',1,45),
                              item_type('dvd',1,15)
                             ),
                  sysdate
                 );
    END;
    /
    BEGIN
        add_order(
                  1,
                  'Customer1',
                  '100 Main Street',
                  NULL,
                  'New York',
                  '12345',
                  'USA',
                  item_nested(
                              item_type('book',1,45),
                              item_type('dvd',1,15),
                              item_type('cd',1,10)
                             ),
                  sysdate
                 );
    END;
    /
    select * from Orders
    /
    
    SQL> CREATE OR REPLACE
      2    PROCEDURE add_order(
      3                        ordno      IN VARCHAR2,
      4                        Cust_name  IN VARCHAR2,
      5                        add1       IN VARCHAR2,
      6                        add2       IN VARCHAR2,
      7                        Addtown    IN VARCHAR2,
      8                        Pstcde     IN VARCHAR2,
      9                        addcountry IN VARCHAR2,
     10                        item_list  IN item_nested,
     11                        ord_date   IN DATE
     12                       )
     13      AS
     14      BEGIN
     15          IF item_list.count > 2
     16            THEN
     17              DBMS_OUTPUT.PUT_LINE ('Too many (' || item_list.count ||
     18                                      ') order items. Maximum number of items per order is 2.'
     19                                   );
     20              RAISE_APPLICATION_ERROR(
     21                                      -20900,
     22                                      'Too many (' || item_list.count ||
     23                                      ') order items. Maximum number of items per order is 2.'
     24                                     );
     25          END IF;
     26
     27          DBMS_OUTPUT.PUT_LINE ('Insert attempted');
     28
     29          INSERT
     30            INTO Orders
     31            VALUES(
     32                   ordno,
     33                   Cust_name,
     34                   add1,
     35                   add2,
     36                   Addtown,
     37                   Pstcde,
     38                   addcountry,
     39                   item_list,
     40                   ord_date
     41                  );
     42
     43          DBMS_OUTPUT.PUT_LINE ('Insert successful');
     44
     45        EXCEPTION
     46          WHEN OTHERS
     47            THEN
     48              DBMS_OUTPUT.PUT_LINE ('ERROR');
     49              DBMS_OUTPUT.PUT_LINE ('Procedure failed');
     50  END;
     51  /
    
    Procedure created.
    
    SQL> BEGIN
      2      add_order(
      3                1,
      4                'Customer1',
      5                '100 Main Street',
      6                NULL,
      7                'New York',
      8                '12345',
      9                'USA',
     10                item_nested(
     11                            item_type('book',1,45),
     12                            item_type('dvd',1,15)
     13                           ),
     14                sysdate
     15               );
     16  END;
     17  /
    Insert attempted
    Insert successful
    
    PL/SQL procedure successfully completed.
    
    SQL> BEGIN
      2      add_order(
      3                1,
      4                'Customer1',
      5                '100 Main Street',
      6                NULL,
      7                'New York',
      8                '12345',
      9                'USA',
     10                item_nested(
     11                            item_type('book',1,45),
     12                            item_type('dvd',1,15),
     13                            item_type('cd',1,10)
     14                           ),
     15                sysdate
     16               );
     17  END;
     18  /
    Too many (3) order items. Maximum number of items per order is 2.
    ERROR
    Procedure failed
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from Orders
      2  /
    
    ORDER_NO CUSTOMER_NAME                  ADDRESSLINE1
    -------- ------------------------------ --------------------
    ADDRESSLINE2         TOWN                 POSTCODE   COUNTRY
    -------------------- -------------------- ---------- --------------------
    ORDER_ITEMS(CAT_CODE, AMOUNT_ORD, COST)
    --------------------------------------------------------------------------------
    ORDER_DAT
    ---------
    1        Customer1                      100 Main Street
                         New York             12345      USA
    ITEM_NESTED(ITEM_TYPE('book', 1, 45), ITEM_TYPE('dvd', 1, 15))
    24-JAN-09
    
    SQL> 
    

    SY.

  • Help! multi select values in the table

    Hi gurus,

    Can anyone help me please with this.

    Scenario:
    I need to select several values based on a LOV list that is predefined.
    For selections multiple values, I tried shuttle as list manager. It is placed in a form region. After that I asked changes it redirects me to the report page.
    The column of the table displays the values selected as: person 1: No 2: 3 person

    Question:
    How can I get rid of these: and replace it with commas (,)?
    So that it looks more presentable in the table report.


    Thank you for your help.

    Hello

    If you want that he report only: just use function replace SQL ': 'to','
    example: Select Replace (column, ': ',',') table colonne_1;

    I hope this helps :D

    J :D

  • Prevention of ListView, select the element for multi select

    How do you keep a user to select specific items during a statement select multi. You can use the MultiSelectHandler to do?

    I have essentially two types of elements. Setting caching and QUERIES.  When the user performs a Multi Select on a cached item... I want only their selection to other cached items.  Even if the user is running a Multi Select statement on an item not cached... I want only their selection of other items not cached.

    Is anyway to do this?  Been Googling for half an hour and can't find that everything about this use case.

    Since I use an element of custom list, I went to this subject a little differently. My CustomListItem implements a ListItemListener. I've implemented the select method as such.

    void CustomStandardListItem::select(bool select) {
        bb::cascades::ListItemListener* lil = static_cast(m_sli);
        bb::cascades::ListView * view = qobject_cast(this->parent());
    
        if (view->multiSelectHandler()->isActive()) {
            bool isCached = view->property("isMultiSelectTypeCached").toBool();
    
            if (m_cachedImageView->isVisible() && isCached) { // is cached.. allow selection of other cached objects only
                lil->select(select);
            }
            else if (!m_cachedImageView->isVisible() && !isCached) { // is not cached.. allow selection other cached objects only
                lil->select(select);
            }
        }
        else {
            lil->select(select);
        }
    }
    

    The dynamic property 'isMultiSelectTypeCached' is just a bool on ListView value that gets defined the type of ListItemComponent. It could have just as well been the type of ListItemComponent.

  • Table multi-selection disabled the check boxes in ADF 10 g

    I think I met an obstacle when you work with a multi-selection table in 10 ADF.

    The selection itself works very well. However, my problem is to try to disable some of these boxes several selections. These boxes are disabled using the expression language. Once disabled, I can always choose these rows in the table using the button 'Select all' created by multiple selection facet. On the page sent, the disabled lines are not recognized as being selected, which is good. However, they always seem to be selected on the front-end server, which would be confusing for users.

    <af:table emptyText="No roles were found"
              binding="#{backing_userRoles.tableRoles}"
              id="tableRoles"
              value="#{backing_userRoles.userRoleList}"
              var="userRole">
                            <f:facet name="actions">
                              <af:commandButton text="Copy Roles"
                                                binding="#{backing_userRoles.cmdCopy}"
                                                id="cmdCopy"
                                                action="#{backing_userRoles.cmdCopy_action}"/>
                            </f:facet>
                            <f:facet name="selection">
                              <af:tableSelectMany text="Select items and ..."
                                                  binding="#{backing_userRoles.tableSelectMany1}"
                                                  id="tableSelectMany1"
                                                  rendered="#{backing_userRoles.managerFlag}"
                                                  disabled="#{userRole.role.autoGrantedFlag eq 'Y'}"/>
                            </f:facet>
    

    multiselecttable.PNG

    So as you can see, the disabled check box has been selected even when disabled. Any ideas on how to change this behavior? Or maybe just get rid of the default generated 'select all ' | 'Select none' orders?

    Thank you

    Cody

    Or, remove selection facet and make sure you have a selection logic - that is to say, some transient Boolean attribute of VO enabled/disabled state, and you have Select All/Select none

  • using the function - how to use the values of the input variables on the table select statement names

    Hello community, I have a problem when creating a function. The purpose of this function is to check the table of weather gave yesterday or not. We must check this on different tables on different sachems. We are creating a function with input variables.

    CREATE OR REPLACE FUNCTION IN_SCHEMA.IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    )

    RETURNS INTEGER

    AS

    -Declaring variables

    v_is_true INTEGER.

    BEGIN

    SELECT

    CASE

    WHEN MAX (in_datefield) = TRUNC(SYSDATE-1)

    THEN 1

    ON THE OTHER

    0

    END

    IN

    v_is_true

    Of

    in_schema.in_tablename

    ;

    RETURN v_is_true;

    END;

    /

    When creating, I got error: [error] ORA-00942 (44:19): PL/SQL: ORA-00942: table or view does not exist

    How to use the values of the input variables on the table select statement names?

    Hello

    Here's a way you can use dynamic SQL statements for this task:

    CREATE OR REPLACE FUNCTION IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    in_first_date DATE DEFAULT SYSDATE - 1,.

    in_last_date DATE by DEFAULT NULL

    )

    RETURNS INTEGER

    AS

    -IS_YDAYDATA_TO_TABLE returns 1 if in_schema.in_tablename.in_datefield

    -contains all the dates in the in_first_date of the range through included in_last_date

    - and it returns 0 if there is no such lines.

    -If in_last_date is omitted, the search only the data on in_first_date.

    -If in_first_date is omitted, it defaults to yesterday.

    -Time parts of the in_first_date and in_last_date are ignored.

    -Declaring variables

    sql_txt VARCHAR2 (1000);

    v_is_true INTEGER.

    BEGIN

    sql_txt: = 'SELECT COUNT (*).

    || 'FROM ' | in_schema | '.' || in_tablename

    || 'WHERE ' | in_datefield | ' > =: d1'

    || «AND» | in_datefield | '< >

    || 'AND ROWNUM = 1';

    dbms_output.put_line (sql_txt |) '= sql_txt in IS_YDAYDATA_TO_TABLE");  -For debugging

    Sql_txt EXECUTE IMMEDIATE

    IN v_is_true

    With the HELP of TRUNC (in_first_date) - d1

    TRUNC (NVL (in_last_date

    in_first_date

    )

    ) + 1                -- d2

    ;

    RETURN v_is_true;

    END is_ydaydata_to_table;

    /

    DISPLAY ERRORS

    If you must use dynamic SQL statements, put all the SQL statement in a single string variable, such as sql_txt in the example above.  In this way, you can easily see exactly what will be executed.  Comment out the call to dbms_output under test is completed.

    Try to write functions that will address not only the question that you have now, but similar questions that you may have in the future.  For example, now that interest you only to the verification of the data of yesterday, but later, you might want to check another day or range of days.  The above function combines the convenience of a function simple (looks like yesterday data if you don't tell him otherwise) with the power of a more complex function (you can use the same function to check any day or range of days).

  • Select the list with the list of dynamic values with more than 4000 tank of query

    Hello

    I have no application where users can store SQL queries in a CLOB column. This query is then used to populate the list, select a dynamic element through LOV. Following the code returns the query for dynamic LOV used to populate the select list. It works fine except when the length of the lv_sqlStatement becomes more than 4000 characters. Then application crashes with "ORA-06502: PL/SQL: digital or value error: character string buffer too small" when Select the list item rendering.

    Any ideas how to get around this problem? Any help is appreciated. Do not say to them to write shorter than 4000 queries because I can't (it's operational requirements).

    DECLARE
    lv_sqlStatement end_user_set.sql_statement%type;
    BEGIN
    lv_sqlStatement: =: P2_SQL_STATEMENT;
    return ' select the label, value of (' | lv_sql_statement | t ')
    To_char (t.value) if not in (select value from end_user_set_member eusm)
    where eusm. EUSRSET_ID = ' | : P2_EUSRSET_ID | ')';
    END;

    I just blogged about this problem and posted a solution. See this announcement:

    http://www.deneskubicek.blogspot.de/2013/03/select-list-with-dynamic-lov-and-Ora.html

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

Maybe you are looking for