Query SQL Report with condition (multiple settings) at the point of the apex?

Hi all

I have a small problem and cannot find a solution.

I need to create reports based on a query, SQL or I.R. Nothing hard here.
I need to add the WHERE clause dynamically with javascript to an element of the Apex.
Even once is not very difficult. I set the agenda of the Summit, put my query like this "SELECT * FROM MYTAB WHERE COL1 =: P1_SEARCH" then I call the page by setting the P1_SEARCH value. For example, COL1 is rowid. It works very well.

But here's my problem. Consider that P1_SEARCH contains several ROWID, and I don't know the number of these values,
(no I don't create a large number of items and create a query with so much GOLD!), I would sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (: P1_SEARCH) with something like: ROWID1, ROWID2 in P1_SEARCH."

I also tried: 'ROWID1, ROWID2' and 'ROWID1', 'ROWID2 '.
but I can't get anything else than the mistake of filter. It works with a value, but as soon as there are two values or more, it seems that the Apex is unable to read the string.


How can I do it please?

Thanks for your help.

Max

mnoscars wrote:

But here's my problem. Consider that P1_SEARCH contains several ROWID, and I don't know the number of these values,
(no I don't create a large number of items and create a query with so much GOLD!), I would sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (: P1_SEARCH) with something like: ROWID1, ROWID2 in P1_SEARCH."

I also tried: 'ROWID1, ROWID2' and 'ROWID1', 'ROWID2 '.
but I can't get anything else than the mistake of filter. It works with a value, but as soon as there are two values or more, it seems that the Apex is unable to read the string.

For a standard report, see + {message identifier: = 9609120} +.

For an IR - and improve safety by avoiding the risk of SQL Injection, use a collection containing the values in a column instead of a CSV list:
{code}
SELECT * FROM MYTAB WHERE ROWID IN (SELECT c001 FROM apex_collections WHERE collection_name = "P1_SEARCH")
{code}
(Please close duplicate threads spawned by your original question.)

Tags: Database

Similar Questions

  • How can I create an updateable query sql report

    The impression that after the upgrade of our APEX version I have more option to create an updated report. Some of my former updateable reports seem to work very well, but some will not update when I click on my "submit" button. AT first, they just refreshed the page and ignored my changes of data in the text field. After tinkering with the non-functional region, now I get an ORA-20001 current version of the data in the database has changed etc.

    Help!

    Hello

    OK - first of all, you can always create an update report. When you create a new report, select the report wizard and follow the instructions. When the report has been created you can then move on to be updated. I don't know why it was done this way, but that works.

    Second, on reports that return this error, you have all the columns put a column of Standard report? I found that you must include all columns in the data submitted, even if this means that you must create a second instance of a column in your SQL statement, and then do one of the hidden columns. For example, if you created a tabular presentation the wizard on the EMP table, you get EMPNO and EMPNO_DISPLAY, with hidden EMPNO. You will need to do the same for any column are not changed by the user. Something similar can also occur if you performed any of the items INPUT readonly or disabled because they have not passed by the browser.

    Andy

  • Body of function from PL/SQL query SQL - problem with where Cluase return

    Hi all
    I have problem with sub PL/SQL. Where clause does not filter the values even when I change the value: P7_INVESTIGATOR. I have marked with an asterisk for where clause where I want the values to filtered.


    DECLARE
    v_sql varchar2 (5000);
    v_inv VARCHAR2 (100);

    Start
    v_inv: = UPPER(:P7_INVESTIGATOR);

    v_sql: = ' select TBLCASES. INVESTIGATOR as an INVESTIGATOR,';
    v_sql: = v_sql | "TBLCASES. CASENUMBER as CASENUMBER,';
    v_sql: = v_sql | "TBLCASES. OPENDATE as OPENDATE,';
    v_sql: = v_sql | "TBLCASES. ESTCOMPLETE as DATE_CIBLE,';
    v_sql: = v_sql | "TBLCASES. STATUS of STATUS ';
    v_sql: = v_sql | "TBLCASES. Case CODE case CODE as,';
    v_sql: = V_sql | "TBLCASES. FAIR_HOTLINE as FAIRHotline,';
    v_sql: = v_sql | "TBLCASES. NYSIG as NYSIGCase,';
    v_sql: = v_sql | "TBLCASES. The REGION';
    v_sql: = v_sql | "TBLCASES. PROGAREA as PROGArea ';
    v_sql: = v_sql | ' from TBLCASES where 1 = 1';
    **************************************************************
    If v_inv <>null then
    v_sql
    : = v_sql | "and UPPER (trim (tblcases.investigator)) = UPPER (trim (v_inv))';
    END IF;
    ***************************************************************
    v_sql: = v_sql | "order by tblcases.investigator";
    Return v_sql;
    end;


    Thank you

    wrote:
    Or it is possible to write it this way:

    if v_inv is not null then
    v_sql := v_sql ||'  and UPPER(trim(tblcases.investigator)) = UPPER(trim(:P7_INVESTIGATOR))';
    END IF ;
    

    In this case we will use bind variables and we all know that it is very important.

    Lev

    Of cause, it is the best option. and I strongly suggest the OP to use.
    But it depends on how the sql is used later.
    Without knowing that, we cannot be sure if the item is available here.

  • Query/report asked for entry? in the Apex

    Hello everyone, my name is John and I am asking for help with the following.
    I am new to Apex, Oracle, PL/SQL, and SQL (as you can tell from my query below).
    I have the basics of the Apex (to present reports, forms etc.).
    I created this query on a view in SQL Developer, where it is asked for the start and end dates filter the report. which is what I want it to and returns the results I want.
    Now, I want to create a report in the Apex where it asks him between the dates as it does in the request sent, when it's done I want to spend bipublisher to print pdf report.



    I run this query as a report of totals already (without the line with WHERE clause query asking course.) in an apex application, gross is it.

    I have it as interactive reports and can be filtered in this way dates of couse, but I want to learn how to create the report/query of type of user input in the Apex.
    I read that I would need to use a "Block anonymous pl/sql with a" declare "and a process page?." " (confused gettting in variables "declare" and execute sections)

    I looked at many samples and still haven't quite come down the blocks.
    If you could point me in the right direction of where to go, or better still, if someone could show me coding on how to make this work in apex query/report (s)?
    Learn slowly I suppose
    I use APEX 3.1.2 on database 11g.
    Thanks in advance for the help on this.
    ++++++++++++++++++++++++++++++++++++
    -the truck view totals query-
    Select
    trucktotals.truck_number "truck number."
    trucktotals. truck_type as "Type truck."
    sum (trucktotals.end_miles - trucktotals.begin_miles) as "Total number of miles,"
    sum (trucktotals.reg_hours + trucktotals.ot_hours) as 'Total hours. "
    sum (trucktotals.total_net_tons) as 'Total tonnes. "
    AVG (trucktotals.equip_rent) as "EQR P_HR' to 'trucktotals '.
    where < strong > trucktotals.wage_date between to_date(:Start_date) and to_date(:end_date) < facilities >

    Trucktotals.truck_number group, trucktotals.truck_type

    order of trucktotals. Truck_Number - query end to view truck totals-+++

    Published by: [email protected] on October 31, 2008 12:49

    Published by: [email protected] on October 31, 2008 12:53

    Published by: [email protected] on October 31, 2008 12:54

    Hi John,.

    I am pleased that the information has helped.

    About the pop up, you should try to avoid them if possible. You should really try to avoid if possible because most browsers have pop-up blockers. (I can ramble on about this topic for hours, but I'll leave it as one).

    So how to avoid pop-ups in this situation? APEX can return conditionally regions. If you have a region "indicates the parameter" which has your in/thru date. which is always is evidence. Then put a condition on the report so that he sees only when the from and through date are entered (I think that I put an example above).

    I would like to know how this happens.

    M

  • Modal calling report that calls another Page to the APEX 5

    I have an interesting question here for the community...

    Using APEX, theme 42 5.  I have a report with a button that will call a modal form.  on the form modal is a LOV which will set a value to the calling page.  If the value returned to the calling page, I then need to redirect to another page in the application by assigning a page element on the new page with the value that I have just received from the modal page.

    I have everything up to the second rec = direct working in a test environment and I have problems with redirection...

    All those who want to watch here is the information:

    URL: https://glassfish1.revion.com/apex/f?p=4550:1:23425296545047:

    workspace: homeworld

    user name: demo

    password: demo

    application name: emp demo test (143)

    I have built dynamic actions to get the value of the page where I need but when try to redirect to the page and set the page item, that I don't get the redirection to work...

    Thank you

    Tony Miller
    Los Alamos, NM

    Hi Tony,.

    I'm just curious... If it worked for you?

    Thank you

    Pavel

  • Multiple instances of the APEX version share the same House of Oracle?

    Hello

    I'm working on the database oracle 11.2.0.2

    I have 2 instances DEV and PROD sharing the same oracle home.

    For the moment, the apex version is identical to 2 instances (4.2.1.00.08) and installed together with the embedded PL/SQL gateway.

    is there a potential problem for upgrade only version apex for the dev to 4.2.6 instance?

    concerning

    JM

    jmniard wrote:

    I'm working on the database oracle 11.2.0.2

    I have 2 instances DEV and PROD sharing the same oracle home.

    For the moment, the apex version is identical to 2 instances (4.2.1.00.08) and installed together with the embedded PL/SQL gateway.

    is there a potential problem for upgrade only version apex for the dev to 4.2.6 instance?

    An instance of the APEX using EPG exists entirely within the database once it is installed. External dependencies only would be on the scripts of utility provided with the installation media. Extract the installation files to the version files in a subfolder of the APEX of the ORACLE_HOME (apex/4.2.1, apex/4.2.6 etc.), to ensure you have access to the 4.2.1 and 4.2.6 install files so that should need you to execute a utility script (apxchpwd.sql for example) that you are running the correct for the involved database version.

  • Using a single server for Multiple Instances of the APEX HTTP

    Our company DBA asked if it would be possible to outsource the server part of HTTP of APEX from DB servers. In other words, it would be highly preferable as DB servers * only * start the Oracle database software.

    We know that we can install the HTTP server on another box, but in thinking how to that, we were wondering if it's really necessary to create a separate HTTP Server installation for each instance of the APEX. What we would really like to do, is have a HTTP server for all our our boxes of Dev and several (but not one) for each of our superior environments; implementation stage, qa, prod, etc..

    Right now, each instance has a file single dads.conf on every box of DB. So, if we we to try to consolidate, we need some way to incorporate several dads files and associate each correct instance.

    Someone has already done this or (preferably) to have some examples?

    Thank you

    -Joe

    The second page on the link provided José begins immediately with the "Configuration of several databases".

    Yes, you can consolidate permanently. It is a common practice that was also available with Apache/mod_plsql, OSH and now with APEX earphone 2.

    Thank you

    Jorge

  • Run the query in accordance with condition

    Oracle 10g version

    Hi gurus

    I have the following data

    Examples of data

    SELECT DeptNo FROM scott.emp

    UNION ALL

    SELECT EmpNo FROM scott.emp

    ;

    Now what I want is I want to execute conditionally of those surveyed, something like below:

    If list_item = 'I', then run below

    SELECT DeptNo FROM scott.emp

    otherwise run below

    SELECT EmpNo FROM scott.emp

    End if;

    ------

    I want to keep the union all and run the query under the terms...

    Set a long tank (max 4000)

    L_WHERE_CLAUSE

    Use it in your application as a substitution variable by prefixing with &

    WHERE & L_WHERE_CLAUSE

    Assign the value into a pl/sql block (trigger, formula column)

    IF condition THEN

    L_WHERE_CLAUSE: = '1 = 1';

    ON THE OTHER

    L_WHERE_CLAUSE: = '1 = 2';

    END IF;

    Now, among the options that have been suggested to you and the information you provided, I think the solution of Solomon should be easier. Just refer to the column list_item has a link within your query variable (assuming that this and the query where list_item belongs are related, for example, there is a join between them)

    SELECT DeptNo FROM scott.emp, t

    WHERE: list_item = 'l '.

    UNION ALL

    SELECT EmpNo FROM scott.emp, t

    WHERE nvl(:list_item,'x')! = « l »

  • Query SQL report filtered RDI

    Hi guys,.

    There are simple IRR "select * from emp" on my page.

    End-user put filters on the report on the Actions menu. I can somehow (on click of a button, etc.) get the new SQL which is registered by the user now?

    Thank you

    Sunil Bhatia

    See this:

    http://www.deneskubicek.blogspot.de/2013/05/getting-interactive-report-query.html

    Denes Kubicek

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

    http://deneskubicek.blogspot.com/

    http://www.Apress.com/9781430235125

    https://Apex.Oracle.com/pls/Apex/f?p=31517:1

    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494

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

  • Help with master / multiple details from the collections

    Hello

    I am trying to create multiple details for my master report using collections by the method of Blarman on https://community.oracle.com/thread/1091458. This is my first shot of dagger to collections and I seem to be missing something, but for the life of me, I don't know what. I managed to get the display of collection for the captain, but when this inserts / updates, only the first collection seq_id is already updated or inserted the user entry. I suspect that I'm doing something stupid on BCM_POPULATE_TICKET_REF_COL to avoid updates to all items in the collection, but after much research and trying, I do not know what. Any suggestions would be much appreciated.

    Thank you!
    Michelle

    1. structure of the table

    CREATE THE TABLE DBSCH1. BCM_FINDINGS
    (
    NUMBER OF FINDINGS_ID
    VARCHAR2 (200 BYTE) WORKING GROUP,
    VARCHAR2 (200 BYTE) TEAM.
    DIVISION VARCHAR2 (200 BYTE),
    RAISED_BY VARCHAR2 (200 BYTE),
    ...
    )

    CREATE THE TABLE DBSCH1. BCM_COMMENTS
    (
    NUMBER OF COMMENTS_ID
    COMMENTS VARCHAR2 (4000 BYTE),
    FINDINGS_ID NUMBER NOT NULL
    )

    CREATE THE TABLE DBSCH1. BCM_TICKET_REF
    (
    NUMBER OF TICKET_REF_ID
    TOOL VARCHAR2 (4000 BYTE),
    TICKET_REF VARCHAR2 (4000 BYTE),
    LINK VARCHAR2 (4000 BYTE),
    FINDINGS_ID NUMBER NOT NULL
    )


    2 created master / detail report on BCM_FINDINGS & BCM_COMMENTS.

    3. create the BCM_TICKET_REF collection:

    CREATE or REPLACE PROCEDURE BCM_CREATE_TICKET_REF_COL (full bcm_findings_id)
    as
    I have pls_integer;
    CNTR pls_integer: = 5;
    Start
    apex_collection.create_or_truncate_collection ('POPULATE_TICKET_REF_COL');
    for Rec in)
    Select the tool, ticket_ref, link, ticket_ref_id, findings_id
    of bcm_ticket_ref
    where FINDINGS_ID = bcm_findings_id

    )
    loop
    () apex_collection.add_member
    p_collection_name = > 'POPULATE_TICKET_REF_COL ',.
    p_c030 = > Rec.ticket_ref_id,--primary key
    p_c031 = > Rec.tool, - placeholder text
    p_c032 = > Rec.ticket_ref, - placeholder text
    p_c033 = > Rec.link, - placeholder text
    p_c034 = > Rec.findings_id fk - space
    );
    end loop;
    because me in 1.cntr
    loop
    () apex_collection.add_member
    p_collection_name = > 'POPULATE_TICKET_REF_COL ',.
    p_c030 = > 0, - designates this as a new registration
    p_c031 = > NULL,-placeholder text
    p_c032 = > NULL,-placeholder text
    p_c033 = > NULL,-placeholder text
    p_c034 = > bcm_findings_id - number placeholder
    );
    end loop;
    end BCM_CREATE_TICKET_REF_COL;

    Support - before the header:

    BEGIN
    BCM_CREATE_TICKET_REF_COL (bcm_findings_id = >: P2_FINDINGS_ID);
    END;


    4. definition of standard report for BCM_TICKET_REF region:
    SELECT rownum,
    apex_item. Hidden (30, c030), - ticket_ref_id
    apex_item. Text (31, c031, 20, 20) tool.
    apex_item. Text (32, c032, 15, 15) ticket_ref,.
    apex_item. Text (33, c033, 15, 15) link.
    apex_item. Hidden (34, c034) findings_id
    OF APEX_COLLECTIONS
    WHERE COLLECTION_NAME = "POPULATE_TICKET_REF_COL."

    5. get user input for the update of the collection BCM_TICKET_REF
    CREATE OR REPLACE PROCEDURE BCM_POPULATE_TICKET_REF_COL
    AS
    j pls_integer: = 0;
    Start
    for j1 in)
    Select seq_id apex_collections
    where collection_name = "POPULATE_TICKET_REF_COL."
    the order of seq_id loop)
    j: = j + 1;
    -(number) ticket_ref_id
    apex_collection.update_member_attribute (p_collection_name = > 'POPULATE_TICKET_REF_COL',)
    p_seq = > j1.seq_id, p_attr_number = 30, p_attr_value = > wwv_flow.g_f30 (j));
    -tool (text)
    apex_collection.update_member_attribute (p_collection_name = > 'POPULATE_TICKET_REF_COL',)
    p_seq = > j1.seq_id p_attr_number = > 31, p_attr_value = > wwv_flow.g_f31 (j));
    -ticket_ref (text)
    apex_collection.update_member_attribute (p_collection_name = > 'POPULATE_TICKET_REF_COL',)
    p_seq = > j1.seq_id p_attr_number = > 32, p_attr_value = > wwv_flow.g_f32 (j));
    -link (text)
    apex_collection.update_member_attribute (p_collection_name = > 'POPULATE_TICKET_REF_COL',)
    p_seq = > j1.seq_id p_attr_number = > 33, p_attr_value = > wwv_flow.g_f33 (j));
    -(number) findings_id
    apex_collection.update_member_attribute (p_collection_name = > 'POPULATE_TICKET_REF_COL',)
    p_seq = > j1.seq_id p_attr_number = > 34, p_attr_value = > wwv_flow.g_f34 (j));
    apex_application.g_print_success_message: = "loop COUNTER" | j;
    end loop;
    end;

    On present - before the calculations and validations

    BEGIN
    BCM_POPULATE_TICKET_REF_COL;
    END;


    6 update DB with the data in the collection BCM_TICKET_REF
    CREATE OR REPLACE PROCEDURE DBSCH1. BCM_UPDATE_TICKET_REF
    AS
    j pls_integer: = 0;
    Start
    -Obtaining records from Collection
    for y in (select TO_NUMBER (c030) ticket_ref_id,
    C031 tool,
    C032 ticket_ref,
    C033 link,
    TO_NUMBER (c034) findings_id
    OF APEX_COLLECTIONS
    WHERE collection_name = "POPULATE_TICKET_REF_COL") loop
    j: = j + 1;
    If y.ticket_ref_id = 0 then - new record
    insert into BCM_TICKET_REF (ticket_ref_id, tool, ticket_ref, link, findings_id)
    values (BCM_TICKET_REF_SEQ.nextval, y.tool, y.ticket_ref, y.link, y.findings_id);
    APEX_DEBUG. MESSAGE (p_message = > 'INSERT the LOOP COUNTER': j);
    "exit";
    elsif y.ticket_ref_id > 0 then - existing record
    Update BCM_TICKET_REF
    adjustment tool = y.tool,
    ticket_ref = y.ticket_ref,
    link = y.link,
    findings_id = y.findings_id
    where ticket_ref_id = y.ticket_ref_id;
    APEX_DEBUG. MESSAGE (p_message = > 'UPDATE the LOOP COUNTER': j);
    "exit";
    on the other
    APEX_DEBUG. MESSAGE (p_message = > "NUTHIN'");
    "exit";
    end if;
    end loop;
    end;

    Present on - after calculations and validations

    BEGIN
    BCM_UPDATE_TICKET_REF;
    END;

    HA! Well it took me several tries, but I finally saw him, you have a 'out' right after insertion (and updated).  That could leave the loop and record #2 would never happen.

    Just remove it. In your case you are inserting/updating all your lines.

    -Jorge

  • HTML report with numbering from 1 plug the last record that comes out.

    Hi can someone help me on how to put an ethe lines/Records numbering. for example
    where colnumbering is an extra cel that list numbering for records.

    is there are 350 reviews on the html report then it will contain 1 to 350 in this column.
    is this possible, if so where do I put it in my code?

    Thanks again


    colnumbering Column1 Column2
    1 nancy wood
    2
    3
    4
    5
    6



    Thanks in advance



    < name cfquery = "replace".
    DataSource = "#request. MainDSN #">"
    SELECT
    CompanyID,
    CompanyName,
    Address,
    City,
    State,
    Zip code
    Comments
    Of
    Company
    ORDER BY
    CompanyName ASC
    < / cfquery >

    < html >
    < head >
    ColdFusion MX Bible < /title > < title >
    < link rel = "stylesheet" href = "styles.css" >
    < / head >

    < body >

    List of companies < h1 > < / h1 >

    < TABLE width = 100% align = "left" border = '4' rules = "all" >
    < b >

    < td > < b > ID < /b > < table >
    < td > < b > name < /b > < table >
    < Td > < b > < /b > < table > address
    City of < td > < b > < /b > < table >
    < td > < b > status < /b > < table >
    < td > < b > ZIP Code < /b > < table >
    < td > < table >
    < /tr >
    < cfoutput query = "replace" >
    < b >

    < td > #CompanyID # < table >
    < td > #CompanyName # < table >
    < td > #Address # < table >
    < td > #City # < table >
    < td > #State # < table >
    < td > #ZipCode # < table >
    < td >
    < a href = "EmployeeList.cfm? CompanyID = #CompanyID #"> employees < /a >"
    < a href = "CompanyAddForm.cfm" > add < /a >
    < a href = "CompanyEditForm.cfm? CompanyID = #CompanyID #"> edit < /a >"
    < a href = "CompanyDeleteForm.cfm? CompanyID = #CompanyID #"> delete < /a >"
    < table >
    < /tr >
    < / cfoutput >
    < /table >

    < / body >
    < / html >

    just before
    #CompanyID #.

  • Tile of handle with two different names in the Apex 4.2

    Hi all

    We designed the application based on regions HTML as shown below

    1. when the page loads designed using the IR report, in which we are displaying create button & edit icons.

    2. When you click on create button us will be re - direct to new page where I had mentioned tile as 'Creating new product', in which all the elements on this page are new.

    3. When you click on edit the icons that we will be redirected to the same page, but in what we are displaying existing values based on the source.

    Now in this scenario, when the user clicks on the icon title should be "Existing product Editing" and when click on create the button title should be "creating new product."

    Kind regards

    Sruthitamiri

    Sruthi Tamiri wrote:

    We designed the application based on regions HTML as shown below

    1. when the page loads designed using the IR report, in which we are displaying create button & edit icons.

    2. When you click on create button us will be re - direct to new page where I had mentioned tile as 'Creating new product', in which all the elements on this page are new.

    3. When you click on edit the icons that we will be redirected to the same page, but in what we are displaying existing values based on the source.

    Now in this scenario, when the user clicks on the icon title should be "Existing product Editing" and when click on create the button title should be "creating new product."

    It is very simple and has been repeated several times in previous discussions.

    1 create a display only element to hold the dynamic title. Save Session State Yesvalue and the Type of Condition Never so that it is not rendered on the page.

    2. Add a calculation by pressing the point before the header with the Expression PL/SQL type to set the title based on the existence of a primary key value. No PK value will be existing for a request to create, but is present when an existing line is selected for editing.

    case
      when :p6_product_id is null
      then
        'Creating New Product'
      else
        'Editing Existing Product'
    end
    

    3 change the attribute title of page to be a reference to static substitution to the element of the title page:&P6_TITLE.

  • Problem when working with lists of shuttle at the APEX 3.2

    Hi all

    My requirement is to fill a table DDL SQL is:

    CREATE TABLE 'C_BIA_MOD_PROD_LINE_VER_REL '.
    ("PRODUCT_LINE_VERSION" VARCHAR2 (100) NOT NULL ACTIVATE,)
    ACTIVATE THE "MODULE_CODE" VARCHAR2 (100) NOT NULL,
    ACTIVATE A ("PRODUCT_LINE_VERSION", "MODULE_CODE") PRIMARY KEY CONSTRAINT 'C_BIA_MOD_PROD_LINE_VER_R_PK '.
    )
    ;
    ALTER TABLE 'C_BIA_MOD_PROD_LINE_VER_REL' ADD 'C_BIA_MOD_PROD_LINE_VER_R_FK1' ("MODULE_CODE") FOREIGN KEY CONSTRAINT
    ACTIVATE THE "C_BIA_MODULE" ("MODULE_CODE") REFERENCES;

    ALTER TABLE 'C_BIA_MOD_PROD_LINE_VER_REL' ADD 'C_BIA_MOD_PROD_LINE_VER_R_FK2' ('PRODUCT_LINE_VERSION') FOREIGN KEY CONSTRAINT
    ACTIVATE REFERENCES "C_PRODUCT_LINE_VERSION" ("PRODUCT_LINE_VERSION");
    --------------------------------------------------------
    Now in the form of CREATION of C_BIA_MODULE, I added a region and an element of 'The shuttle list Type' for PRODUCT_LINE_VERSION. For the button CREATE, I prepared the PL/SQL like:

    DECLARE
    prodlinever_selected APEX_APPLICATION_GLOBAL. VC_ARR2;
    BEGIN

    prodlinever_selected: = APEX_UTIL. STRING_TO_TABLE(:P4_PRODUCT_LINE_VERSION);
    BECAUSE me IN 1.prodlinever_selected.count
    LOOP
    INSERT INTO C_BIA_MOD_PROD_LINE_VER_REL (MODULE_CODE, PRODUCT_LINE_VERSION)
    VALUES (: P4_MODULE_CODE, prodlinever_selected (i));
    END LOOP;
    Returns true;
    END;
    ----------------------------------------------------------

    The question is where to use this PL/SQL? The column 'Conditions' under 'Edit Page buttons' does not have this. In addition, the 'action of database' options are not enough to fill a selection in an array of other (C_BIA_MOD_PROD_LINE_VER_REL) as the current page of the table (C_BIA_MODULE). Any other approach? Help, please. Not enough info in the user guide.

    Thank you
    -Marie

    Published by: Mary Agarwal, July 14, 2009 12:26 AM

    Published by: calling Marie on July 22, 2009 22:08

    Mary:

    You can write a pl/sql loop to generate the ':' separated string.
    Something similar to

    str varchar2(2000);
    begin
    for x in (select deptno from emp where not deptno is null) loop
     str:=str || x.deptno || ':';
    end loop;
    
    str := substr(str,1,length(str)-1 );
    end;
    

    CITY

  • Dynamic SQL report on Oracle apex4.0

    Hello world

    I have two reports on a single page. One is the Interactive and another report. Sql based on the selection of the line (using the check box) in the interactive report, sql report should display the selected columns.

    Note: the report must be loaded every time that a line is selected and without subjecting it to a button

    Can someone please suggest?

    I'm using oracle Apex4.0

    Concerning
    REDA

    I think that you are storing the values in the boxes. For example, your interactive report query looks like:

    SELECT '"AS CHECKBOX, T.*.
    OF UNE_TABLE T

    and in 'Attributes of report', the CHECKBOX is displayed under "Standard report column.

    * 1 a control list hidden input champ.*
    It will store a selected values of list of checkboxes. If it is long enough, for example. 1000.
    Let's say that the entry name is: P000_X_CHECK_LIST

    * 2. Create a dynamic Action *.
    This dynamic action is supposed to fill the P000_X_CHECK_LIST with a list of values, separated by ': ' character.
    These values will be an entry for the SQL report.

    Name: updated checklist
    Event: change
    Selection type: jQuery Selector
    jQuery Selector: input: checkbox

    Action: Set

    Set type: Expression JavaScript

    function check_list() {}
    var n = "";
    $(":checked").each (function () {}
    n = n + (n === « » ? ("': ': ') + $(this) .val ();
    })
    return n;
    }
    check_list();

    Selection type: item (s) - P000_X_CHECK_LIST

    * 3. Set the query "SQL report" with this magic formula *.

    AND SEARCHED_ITEM IN)
    SELECT the item
    FROM (SELECT REGEXP_SUBSTR (str, ' [^:] +', 1, LEVEL) point)
    FROM (SELECT: P000_X_CHECK_LIST str)
    THE DOUBLE)
    CONNECT BY LEVEL<= length="" (regexp_replace="" (str,="" '[^:]+'))="" +="">
    )

    for example:

    SELECT O.*
    OF SOME_OTHER_TABLE O
    WHERE SEARCHED_ITEM IN)
    SELECT the item
    FROM (SELECT REGEXP_SUBSTR (str, ' [^:] +', 1, LEVEL) point)
    FROM (SELECT *: P000_X_CHECK_LIST * str)
    THE DOUBLE)
    CONNECT BY LEVEL<= length="" (regexp_replace="" (str,="" '[^:]+'))="" +="">
    )

    * 4. Adjust the dynamic Action: *.

    Advanced: Event scope: 'live '.

    * 5. Add real action more dynamic Action: *.
    Action: update
    Selection type: region
    Region: The region of the "SQL report.

    Volia!

    Best regards
    Krzysztof

  • XLS-models with BI Publisher using and download the reports with APEX

    Hello

    I already create PDF reports with RTF Templates. In the APEX, I create a button and a process of "Download" to get the PDF-reports the BI Publisher. ". We use version 11.1.7.

    Now I try the same thing with XLS-Templates. I create the XLS model in the editor of BI and where it works very well. Now I need also an APEX-"Download" - Process to download the XLS reports to the client. The method already used doesn't work for RTF models.

    Kind regards

    Mark

    Hello

    I found here, the format has value "excel", not "xls"!

    http://docs.Oracle.com/CD/E28280_01/doc.1111/e26693/ibr_config.htm#WCCAA2062

    Now it works like a charm!

    Kind regards

    Mark

Maybe you are looking for

  • HP Officejet Pro 8500 has more full-full Reset

    I have this same problem:http://h30434.www3.HP.com/T5/other-printing-questions/HP-8500A-premium-A910-the-touch-screen-will-re...I tried a partial reset and reset semi complete but does not work for me, I hope that someone knows a way to do a full-fu

  • Update BIOS A60

    I extracted the file for BIOS uograde WIN. The performance of the file get "Free Extractor Error" "unable to write to a temporary file. The system does not have the specified path. Any ideas, please?

  • Someone at-s\u0026 Crash issues in Creative Suite of Adobe Illustrator using El Capitan?

    Have graphics problems when using Creative Suite. Accidents of continuous... Any help is appreciated...

  • Not able to enable the web server in exe

    Hello I have a problem with starting a web server. I Vi which allow the address of the directory to be published and after that it makes the stream server. And there are a few jpg files and some html files in the directory. And jpg files are attached

  • Monthly automatic name change

    Hi guys, I worked on a VI that has done a number of things and one of them is that he writes to a file, a number of variables, my question is if anyone out there has tried an "automatic file name change"? For example, whenever changes in months the V