How to pass multiple values to a data model parameter

I have a data model, where I put a setting like this.

Select col1, col2, col3 from table1 where col1 =: param1

This works very well for a single value that I pass the param1 parameter.

How can I get this to work when I want to send multiple values for param1. I already checked the box "Multiple values" and tried to change the sql for this code.

Select col1, col2, col3 from table1 where col1 in: param1

Looks like I'm missing something here.



Thanks in advance!
Kris

you need to write it as:

Select col1, col2, col3 from table1 where col1 in (: param1)

It works for me.

Klaus

Tags: Business Intelligence

Similar Questions

  • How to pass multiple values of payload through the contextual event - jdev 11.1.2.3

    Hello:

    How to configure contextual events publish several values of payload?

    On click of a button, I'm declaritively publish a contextual event, which works very well when a single value is passed to the event handler.

    My event handler method has the signature of:
    eventHandler (String)

    But now I also have an oracle.jbo.domain.Number, so my new eventHandler looks like this:
    eventHandler (Number, String)

    How to pass two values during editing of the event and how to place the payload with multiple values for the new eventHandler?

    All article or code would be greatly appreciated.

    Thanks for the help.

    You define a bean holding your values and pass an instance of the bean as a payload...

    Timo

  • How to pass multiple values in a single parameter

    Hi all

    I have a setting in my report called dept, this setting takes values in a list. I am using a sql query to populate the list. then the values available for dept are HR, FINANCE, MARKETING.

    In the setting column, I checked the option "MULTIPLE SÉLECTION" AND "CAN SELECT ALL" and I select "all THE VALUES PASSED.

    Now my data model sql looks like

    Select * from emp where Department: dept

    When I try to view the report and select ALL the list of values I don't get any results out of it. In short, I want to run my query for all values of the Department and I want that this query to run when I select ALL from the list.

    Select * from emp where Department ('HR', 'FINANCE', 'MARKETING')

    But I don't get all the data, is it passing null? How to solve this?

    Any help will be really appreciated

    Thank you
    Ronny

    You can change the code to sql data model looks like

    select * from emp where department in (:dept )
    
  • I want to pass multiple values method AM controller

    Hi all

    Can someone tell me please how to pass multiple values of AM method to the controller.

    Thank you

    You can make use of the ArrayList

    In CO

    OAApplicationModlue am = pageContext.getApplicationModule(webBean);
    ArrayList values = (ArrayList) am.invokeMethod("PassArray");
    

    In AM

    public ArrayList PassArray
    {
    ArrayList values = new ArrayList();
    values.add("value")
    values.trimToSize();
    return values;
    }
    

    Thank you
    AJ

  • How to pass the value?

    Hello.. I'm creating an application of streaming, in which I have a list field in a screen like this...

    1

    --------

    2

    --------

    3

    --------

    and when the item 1 is selected means a url must be passed to the video player...

    I created the list field screen in a package and a video player in other package... but I do not know how to pass the value of the field from the list to the player... Help, please... its URGENT...

    You can get the index selected by the listname.getSelectedIndex () method and compare that value with Vector data (data store URL) .that you will give a correct value from the URL and pass it.

  • How to pass the value of the run-time file .sh by Oracle procedure

    I have a file test.sh that contain

    #1/bin/bash

    exp test/test@orcl file=/home/oracle/dump/test.dmp log=/home/oracle/dump/test.dmp grants = Y = index constraints Y = Y = (test) owner statistics = none

    Exit 0

    I craete a work called Create_job_proc in this work, I want to pass the value of job_action is the location of the file test.sh to

    /U01/home/Oracle/dump/test.sh and want to spend the test/test@orcl as a variable...

    Please suggest me... how to pass the value of Job_Action which will replace the .sh file content test/test@orcl to the value of the time of execution as scott/tiger@hr

    Thank you much Parth... It works perfectly...

    Thank you all for your help...

  • How to pass the value of the element from one form to another form?

    Hi all

    I need your help to complete this task.
    I have a form page named reserve form.i have some five fields selection list in the form of reserve, after I chose the first value from the selection list, I create a button in the form of reserve, when I click on the button create, it will open another form page named set form in this form page , I have a field selected, the list of values in configure the form depends on the values selected as a reserve, it means that I have to change the value of page of a form to another form.

    Please suggest a solution, how to pass the value?

    Thank you
    Robette.

    Check out the button create on Page 8.

    In the Action when the button is clicked, the configuration is

    The value of these P35_IT_PRODUCT
    With these values & P8_IT_PRODUCT.

    Kind regards

  • a problem in passing multiple values in the loop settings for

    Hi all

    I am facing a problem in passing multiple values in the loop settings for.


    EX:

    CREATE or REPLACE PROCEDURE (pr_id OUT NUMBER) HAVE


    tab type is table of NUMBER;

    TEMP_TAB TAB;

    BEGIN

    Select the COLLECT LOOSE pr temp_tab pr_id;

    I'm in 1.TEMP_TAB. loop of COUNTING

    PR_ID: = temp_tab (i);

    end loop;

    END TEST;

    OUTPUT:-

    pr_id = 234578


    in the example above, I'm only a value as an out parameter. but I send you PR_ID of the loop.
    why I don't get all the values that the parameters.please offer a solution for me.

    Thank you my friend.

    More clarification, let's look at your code...

    -- create a procedure and have a single numeric out variable
    CREATE OR REPLACE PROCEDURE TEST ( pr_id OUT NUMBER ) AS
      -- declare a type as an array of numbers
      type tab is table of NUMBER;
      -- declare a varianble of that array type
      TEMP_TAB TAB;
    BEGIN
      -- query all the values from the table into the array
      select pr_id BULK COLLECT INTO temp_tab from pr;
      -- loop through each value in the array
      for i in 1..TEMP_TAB.COUNT loop
        -- set the value of the single OUT parameter, OVERWRITING any previous value it has
        PR_ID := temp_tab(i);
        -- loop around to the next value
      end loop;
      -- end the procedure with the final value of PR_ID
    END TEST;
    
  • How to pass the value of the variable record type in the procedure

    Hai All

    My Question is

    I have a table named Emp and the structure

    ID Varchar2 (25)

    Name varchar2 (25)

    Number of salary


    And now, I created a folder named Rec_Emp

    Like this

    Type Rec_emp is made
    (Rec_Id varchar2 (25),)
    rec_name varchar2 (25).
    Number of Rec_salary);
    rec_emp emp_record;


    I created a SQL type

    Now how to pass the value type in the procedure


    Thanks and greetings
    SrikkanthM

    You are looking for something like this

    create table my_emp (id integer, name varchar2(100), sal number)
    /
    create type my_emp_obj as object(id integer, name varchar2(100), sal number)
    /
    create or replace procedure insert_into_my_emp(pEmp_Obj in my_emp_obj)
    as
    begin
      insert into my_emp (id, name, sal) values(pEmp_obj.id, pEmp_Obj.name, pEmp_obj.sal);
    end;
    /
    begin
      insert_into_my_emp(my_emp_obj(1,'karthick',1000));
    end;
    /
    select * from my_emp
    /
    
  • How to pass the value of the item Application Javascript function.

    Hello

    I have the JavaScript in the properties attribute of the HTML Form element

    I'm on page 1 and passing the value of the item page P1_DEPT_NO. It is perferctly working very well and I am able to get the exact value of the element on the page
    onchange="javascript:function1($x('P1_DEPT_NO').value);"
    I'm on page 1 and passing the value G_DEPT_NO of the Application element .
    The problem here is, I don't get the point of Application inside the javascript function value.
    I tried to use alert(); and it gives me the undefined value
    onchange="javascript:function1($x('G_DEPT_NO').value);"
    I just want to know, How to pass the value of the Application in Javascript element.

    Thank you
    Deepak

    Deepak,

    I'm not a Javascript expert, but the suggestin I did was because the javascript is a case-sensitive... language and thats why onChange is not the same thing as onchange.
    Not sure if this is causing the problem.

    Application elements not associated with a page and have therefore no properties user interface.
    So, as mentioned in another post, the rendering would not work for the elements of the application.
    If it is for a single item, used only on this page, you might create a hidden page element and use it fo your goal

    If you want to keep watching objects application and AJAX, this page contains examples of using AJAX to solve problems like the one you mentioned.
    http://www.Oracle.com/technology/OBE/hol08/apexweb20/ajax_otn.htm#T1B

    Thank you
    Rajesh.

  • Please show or ask how to create the value of arrayOfValues of setValuesAtTimes parameter?

    Hello AEScriptComm,

    I have a few small scripts that use the method setValueAtTime successfully placing a keyframe on the existing layers of maskPath, but as you can see in the scripts below, results of setValueSatTimeS errors using IE: "Array is not of the correct type", "value is not an array" or "Null is not an object", depending on ,...

    (A) what variable is used as the value of parameter IE:

    .maskPath;

    . maskPath.value;

    . maskPath.value.vertices

    (B) what kind of table is used as the parameter value as in:

    var addTheseKeys = new Array ((1,2,3,4);    (as a parameter of the time)...

    (with either)

    var keyValues = new Array([10,10],[100,100],[15,50],[100,120]);             ...." ]) "

    (GOLD)

    var keyValues = [[10.10], [100 100], [15.50], [100 120]];                               ... (Array of arrays? RE: " ]] " )

    I just read a 'push' of the values in a table may be necessary?, but I was hoping someone who knew setValuesAtTimes could show it please...

    1) .. How to create the value of arrayOfValues of setValuesAtTimes parameter?

    1 (a): WORK setValueAtTime script...

    App.Project.Item (1) .layer (1).property("Masks").property ("mask 1");

    var app.project.item = myProperty (1) .layer (1) .mask (1) .maskPath;

    myShape = app.project.item (1) .layer (1) .mask (1).maskPath.value;

    myProperty.setValueAtTime(1.0,myShape);

    1 (b): If there is no script setValuesAtTimes...

    prop1 = app.project.item var (1) .layer (1).property("ADBE_Transform_Group").property ("ADBE Position");

    var fourKeys = 4;

    var addTheseKeys = new Array (1,2,3,4),

    var keyValues = new Array (10, [10], [100 100], [15.50], [100 120]);

    var app.project.item = myProperty (1) .layer (1) .mask (1) .maskPath;

    myShape = app.project.item (1) .layer (1) .mask (1).maskPath.value;

    var myVertices = app.project.item (1) .layer (1) .mask (1).maskPath.vertices;

    myProperty.setValuesAtTimes (keyValues, addTheseKeys);

    app.beginUndoGroup ("Keys");

    ~ for (var k = 0; k < fourKeys; k ++)

    //~ {

    ~ prop1.setValueAtTime (keyValues [k], addTheseKeys [k]);

    //~ }

    myProperty.setValuesAtTimes (keyValues, addTheseKeys);

    app.endUndoGroup ();

    .. Thanks for any advise\suggestions,

    J

    (A). maskPath.value; It's always a Shape(). (maskPath is a property, not of a shape on its own, and maskPath.value.vertices is only a part of the shape data).

    (B) nothing of what you propose... that is why your failed script fails.

    var keyValues = new Array([10,10],[100,100],[15,50],[100,120]); and

    var keyValues = [[10.10], [100 100], [15.50], [100 120]]; are just as good as arrays of points, the only thing is that keyValues are arrays of objects Shape().

    Read the guide and script for how to report a form of this post (just wrote it...): http://forums.adobe.com/thread/1419866?tstart=0

    Your keyValues array should look like this: [keyValues0, keyValues1, keyValues2, keyValues3], where each entry is a Shape().

    Xavier.

  • How to pass the value of an element in a function called by a procedure

    Hello

    I have a procedure named PROCEDURE AFFICHAGE_PLUVIO_VEILLE (sorry I don't know how to get in shape for the code):

    {code: sql}create or replace PROCEDURE AFFICHAGE_PLUVIO_VEILLE AS

    CURSOR curs1 is

    Select the site, name, site_pluviometre clef_var

    where EN_SERVICE = 'YES ';

    number of stmt;

    BEGIN

    DELETE FROM PLUVIO_DATA;

    for m loop curs1

    stmt: = calc_pluvio (m.clef_var);

    INSERT INTO pluvio_data values (m.clef_var, stmt);

    end loop;

    commit;

    END AFFICHAGE_PLUVIO_VEILLE; {code}

    This procedure calls a function:

    {code: sql}create or replace function "CALC_PLUVIO" (station NUMBER)

    return the number is the default number of 0 total.

    BEGIN

    WITH PRECIPITATION AS

    (SELECT DATE1 RAINFALLDATE, VALUE

    OF EVV_STPL

    WHERE CLEF_VAR = station

    AND TRUNC (DATE1) = TRUNC (sysdate-1))

    SELECT SUM (TOTO) INTO CUMULATION

    DE)

    SELECT TRUNC (RAINFALLDATE) AS date,

    VALUE,

    (VALUE) AHEAD OF (TRUNC PARTITION (RAINFALLDATE)

    ORDER BY RAINFALLDATE

    ) - VALUE AS TOTO

    PRECIPITATION

    )

    WHERE TOTO > = 0

    GROUP BY date;

    DATE OF RETURN;

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    TOTAL: = 0;

    DATE OF RETURN;

    END; {code}

    You can see that the function uses 'sysdate-1' regarding the date. " In order to be more flexible with the date and to be able to use a date other than the date of the previous day, I would like to pass as a parameter to the function of the value of a page called P1_DATE.

    But, how can I do? Function CALC_PLUVIO' is called by the stored procedure 'AFFICHAGE_PLUVIO_VEILLE of PROCEDURE' for which I can not transmit to any parameter as for example the P1_DATE element.

    I use Application Express 5.0.1.00.06

    Thank you for your help.

    Chipniz wrote:

    I have a procedure named AFFICHAGE_PLUVIO_VEILLE of PROCEDURE (sorry I don't know how to get in shape for the code):

    Click on the link to the editor advanced usage in the top right of the edit box, select the code in the editor and choose the language desired from the syntax highlighting options in > toolbar button menu. (For SQL and PL/SQL code, use "SQL").

    create or replace PROCEDURE AFFICHAGE_PLUVIO_VEILLE AS
      CURSOR curs1 is
        select site, nom, clef_var from site_pluviometre
                  where EN_SERVICE = 'OUI';
      stmt number;
    BEGIN
      DELETE FROM PLUVIO_DATA;
      for m in curs1 loop
        stmt := calc_pluvio (m.clef_var);
        INSERT INTO pluvio_data values (m.clef_var, stmt);
      end loop;
        commit;
    END AFFICHAGE_PLUVIO_VEILLE;
    

    This procedure calls a function:

    create or replace function "CALC_PLUVIO" (station in NUMBER)
    return number is cumul number default 0;
    BEGIN
    WITH RAINFALL AS
    (SELECT DATE1 RAINFALLDATE, VALEUR VALUE
    FROM    EVV_STPL
    WHERE  CLEF_VAR = station
    AND        TRUNC (DATE1) = TRUNC (sysdate-1))
    SELECT SUM (TOTO) INTO CUMUL
    FROM (
    SELECT TRUNC (RAINFALLDATE) AS datte,
    VALUE,
    LEAD (VALUE) OVER ( PARTITION BY TRUNC (RAINFALLDATE)
    ORDER BY RAINFALLDATE
    ) - VALUE AS TOTO
    FROM RAINFALL
    )
    WHERE TOTO >= 0
    GROUP BY datte;
    RETURN CUMUL;
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
            CUMUL := 0;
        RETURN CUMUL;
    END;
    

    You can see that the function uses ' sysdate-1' regarding the date. " To be more flexible with the date and to be able to use a date other than the date of the previous day, I want to pass as a parameter to the function of the value of a page called P1_DATE.

    But, how can I do? The CALC_PLUVIO function ' is called by the stored procedure 'AFFICHAGE_PLUVIO_VEILLE of PROCEDURE' for which I can not transmit to any parameter as for example the P1_DATE element.

    What do you mean by "I can't pass any parameter"? That you cannot change the signatures of the procedure and function?

    Passage of a parameter is the recommended approach. Including a default value will ensure that programs are backward compatible with existing code that does not it:

    create or replace PROCEDURE AFFICHAGE_PLUVIO_VEILLE (p_rainfall_date in date default null) AS
      CURSOR curs1 is
        select site, nom, clef_var from site_pluviometre
                  where EN_SERVICE = 'OUI';
      stmt number;
    BEGIN
      DELETE FROM PLUVIO_DATA;
      for m in curs1 loop
        stmt := calc_pluvio (m.clef_var, p_rainfall_date);
        INSERT INTO pluvio_data values (m.clef_var, stmt);
      end loop;
        commit;
    END AFFICHAGE_PLUVIO_VEILLE;
    
    create or replace function "CALC_PLUVIO" (station in NUMBER, p_rainfall_date in date default null)
    return number is
      cumul number default 0;
      rainfall_date date;
    BEGIN
      rainfall_date := trunc(coalesce(p_rainfall_date, sysdate-1));
    WITH RAINFALL AS
    (SELECT DATE1 RAINFALLDATE, VALEUR VALUE
    FROM    EVV_STPL
    WHERE  CLEF_VAR = station
    AND        TRUNC (DATE1) = calc_pluvio.rainfall_date)
    SELECT SUM (TOTO) INTO CUMUL
    FROM (
    SELECT TRUNC (RAINFALLDATE) AS datte,
    VALUE,
    LEAD (VALUE) OVER ( PARTITION BY TRUNC (RAINFALLDATE)
    ORDER BY RAINFALLDATE
    ) - VALUE AS TOTO
    FROM RAINFALL
    )
    WHERE TOTO >= 0
    GROUP BY datte;
    RETURN CUMUL;
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
            CUMUL := 0;
        RETURN CUMUL;
    END;
    

    This code can be called APEX by:

    AFFICHAGE_PLUVIO_VEILLE(p_rainfall_date => to_date(:p1_date, 'DD-MON-YYYY')); -- change format mask to that used in the P1_DATE item
    

    Moreover, if the P1_DATE element is the only possible source of another value on the date of the rain, then the value can be referenced directly in the function:

    create or replace function "CALC_PLUVIO" (station in NUMBER)
    return number is
      cumul number default 0;
      rainfall_date date;
    BEGIN
      rainfall_date := trunc(coalesce(v('P1_DATE'), sysdate-1));
    WITH RAINFALL AS
    (SELECT DATE1 RAINFALLDATE, VALEUR VALUE
    FROM    EVV_STPL
    WHERE  CLEF_VAR = station
    AND        TRUNC (DATE1) = calc_pluvio.rainfall_date)
    SELECT SUM (TOTO) INTO CUMUL
    FROM (
    SELECT TRUNC (RAINFALLDATE) AS datte,
    VALUE,
    LEAD (VALUE) OVER ( PARTITION BY TRUNC (RAINFALLDATE)
    ORDER BY RAINFALLDATE
    ) - VALUE AS TOTO
    FROM RAINFALL
    )
    WHERE TOTO >= 0
    GROUP BY datte;
    RETURN CUMUL;
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
            CUMUL := 0;
        RETURN CUMUL;
    END;
    
  • Passing multiple values at the request of the State (no status page)

    Hello

    [APEX 4.2.4.00.08 on the 11.2.0.3 database]

    I didn't know how to explain briefly what I need in the title of the discussion, that's why I added the song "(non page rapport)". "  I met a lot of threads associated with passing of selections multiple values from one page to another, or via a URL from one page to another.  I know how to do this.  The problem I have right now is trying to pass the commas of the values contained in an application to a report query element.  Here's where the "(rapport non page) ' comes into play."  I refer to the report query at the level of the application (i.e. shared components-> report queries).  I wish really it had another name for it.  "Report on the application of queries", perhaps?

    In any case, my report query has a bind variable, AI_ID_NUMBERS, that is defined correctly in the shared-> components report queries. However, when this item application has multiple values such that AI_ID_NUMBERS = 4, 5, 6, 7 etc., my URL looks like this:

    myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1:AI_ID_NUMBERS:4, 5, 6, 7

    So, this returns only one record for the report where the identification number is 4, one.  I tried a string parameter of Substitution of Application (URL_REPORT_1) with the two following variants (for which both return only a single record):

    Substitution string = URL_REPORT_1 and Substitution value = f? p = & APP_ID.:0 : & SESSION. : PRINT_REPORT = report_1:AI_ID_NUMBERS: & AI_ID_NUMBERS.

    Substitution string = URL_REPORT_1 and Substitution value = f? p = & APP_ID.:0 : & SESSION. : PRINT_REPORT = report_1:AI_ID_NUMBERS:-& AI_ID_NUMBERS. \

    returns...

    myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1:AI_ID_NUMBERS:4, 5, 6, 7

    myapexsite.com/f?p=456:2:1234567890:PRINT_REPORT=report_1:::AI_ID_NUMBERS:\4,5,6,7\

    .. .respectively

    I really thought that the backslashes would have solved the problem.  Any ideas why my report request (PDF) returns only one line?

    Thank you

    -Seth.

    Well, too bad. I realized the mistake I did.

    When you work with 'request report queries', there is an option to include variable bind, for example the application or page elements.  I had already done that, but for some reason, thought that I also had to pass the parameter and its values in the URL.  This is not necessary since the report query query already has the issue of the application/page related to it.  The following URL works fine:

    myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1

    And, Yes, it's the URL that is provided when you set up a "application report query.  I was thinking too hard.

    -Seth.

  • passing multiple values of variable presentation to go the url in dashboard

    Hi all

    I use go url in dashboard in the area of text using html file mark up. We have a guest area which saves the values in the variable of presentation P_REGION. The link to the dashboard works well when we choose to value as a single region. She passes the parameter. However, if we choose multiple values, it fails. Do we need to modify the code below in support of more than the presentation variable value to pass to the report.


    <a href="http://nqrc.cci.edu:7001/analytics/saw.dll?PortalGo&path=%2Fusers%2Faron%2FActionLink%2Fname&Action=Navigate&P0=1&P1=eq&P2=%22Employee%22.%22Region%22&P3=@{variables.P_REGION}">Drill Report</a>
    Thank you

    Sushil

    Before you go to the link, I would say to understand how the variable takes values.
    Try to use the link as ay of the column expression in the criteria to see the full url with multiple values.

    http://nqrc.cci.edu:7001/analytics/saw.dll?PortalGo&path=%2Fusers%2Faron%2FActionLink%2Fname&Action=Navigate&P0=1&P1=eq&P2=%22Employee%22.%22Region%22&P3=@{variables. P_REGION}

    If my assumption is not wrong valiables holds as "one, two."

    This will give you some ideas to work on.
    If need more help to share the url with multiple values.

    BTW: I don't think that it works with multiple values, give a try, as said.

    So much sense mark :)

  • Passing multiple values to the report

    Hello
    I have a form of parameter. One of the field will have at least one value. When there are multiple values, the values will be separated by a comma and pass on to the State. Please tell me how to separate them and put them in the citation in the report query.
    EX: values are: PO, DR
    There will be in the where condition as: where code in ('OP', 'DR');
    Thank you in advance.

    PS. I use 10g

    Published by: 945599 on 10 July 2012 14:04

    Hello

    I sent the unit test by mail.
    Please note that there are some hardcoded values when you use run_report_object (name of report server and host name).

    Kind regards
    Alex

    Published by: AlexDiniasi on 19.07.2012 17:14

Maybe you are looking for

  • How to add between a date range + category

    I use numbers 3.6.2 on a macbook pro with El Captain 10.11.5 I have a financial spreadsheet that I want to shoot the numbers a second sheet that has a book running.  Ideally, I would like to have a book current running year round.  I can't figure out

  • Error Oxå/OxB

    Hi, I have a ProBook s 4310 bought a week ago. I instaled Windows 7 Professional (64 bit), and I get this error: "Allow reboot on HP ProtectTools security keys" in the BIOS menu. When I enter on the menu of the BIOS f10, I can't enter the administrat

  • cannot enable virus protection

    HP support assistant showing antivirus protection is off... How to turn on... I use kaspersky antivirus

  • win xp pro Re: why does search in my doc &#62; downloads search not numeric values

    GI production of labels for specimens of plants of a model in excellent and storing labels in my doc... search does very well with the words/phrases (as indicated in the search pane) but why he can't find the dates, number of collection, lat/lon?

  • 2010-11-07 = 7 November or July 11?

    According to the Lenovo Web site, my R50e warranty expires on 2010-11-07.  Is - this November 7 or July 11?