How to pass variables bind to select query

Hello
I use jdeveloper 11.1.1.6.0 version.
My use case is - I want to change the settings of the select clause dynamically
For example
My view of object query is as follows:
    SELECT FN_GET_ALFA_MESSAGE_DETAIL_SEQ(1,2) FROM DUAL
   
where FN_GET_ALFA_MESSAGE_DETAIL_SEQ is the name of function.
I want to pass parameters at runtime instead of 1 and 2 as a and b.
So, how can I pass dynamic parameters (bind variables) in the display object during execution of the select clause.

Published by: 925410 on January 7, 2013 18:25

Hello

You may have two bind variables (note that bind variables are always preceded by a colon in the query) as below:

SELECT FN_GET_ALFA_MESSAGE_DETAIL_SEQ(:bind_var1,:bind_var2) FROM DUAL

Then, follow the following steps:
1. create two variables of the same names liaison in the variables section of Bind in the query tab of the VO
2 2 disposer have a method in the class Impl of Module of the Application and within this method, pass the values of these bind variables as below:

            Impl vo = null;
            vo = get1();
            vo.setNamedWhereClauseParam("bind_var1", );
            vo.setNamedWhereClauseParam("bind_var2", );
            vo.executeQuery();

3 expose this method of the the module interface of the client Application, then the method will be visible in the section data when updating controls.
4 use the method to run the original Version of data controls you want :)

Kind regards
Seddik

Tags: Java

Similar Questions

  • How many times can I use a variable binding in a query of the VO?

    Is it possible that I can use a variable binding in a query of VO just once?

    I test a query that keeps throwing the Houston-27122 error by pressing the application module tester. I tried to limit the problem to the simplest possible case, and it seems that the error is caused by the fact that I use the same variable bind two or more times.

    When the query looks like this:

    query1.png

    I have run, enter 'x' and it returns me the result.

    When I change to:

    query2.png

    I have run, enter the value

    param.png

    and immediately get the error

    error.png

    The same thing in sqlplus runs without problem:

    sqlplus.png

    My version of JDev is build JDEVADF_11.1.1.9.0_GENERIC_150314.0718.6673

    Please, advise.

    P. S. where can I find documentation queries are supported in your? In particular, I'm interested if I can use WITH the clause. There seems to be some confusion on this matter (see, for example, Oracle SQL WITH clause support - JDeveloper and ADF)

    Thank you.

    It depends on:

    Open your VO in JDev and go the the query page.

    In the lower part, there is a drop down 'link type', it is usually set to "JDBC-positional. In this case, you will need to provide the bind value for each occurrence of the variable binding separately.

    You could change that to "named" (don't remember the exact name). But beware, this will also affect all relatioships master retail to others your. I think that this is not a good idea to change the style of binding to a single VO.

    Good bye

    DPT

  • How to pass variable frame 1 throughout a swf file?

    Hi guys,.

    How to pass variable frame 1 throughout a swf file? -Including executives more later and their children?

    Thanks in advance

    Mike

    I'm not sure what you mean by variable pass in a swf, but to make it available throughout the timeline you place in a layer that extends along the timeline.

  • How to pass variable separated by commas in the bind value of VOquery?

    Version 11.1.1.3.0
    The guys need to help you on this

    I have a VO with query somethg as below

    SELECT *.
    FROM a schema. Table-name
    WHERE (: Bind_Varible has the value null or Column_Name IN (: Bind_Varible))

    User will be be select several values of the screen and I need to pass these value above bind variable.
    But in the variable binding ADF take everything as a single string, then, how can I pass values separated by commas?

    As SELECT *.
    FROM a schema. Table-name
    WHERE (: Bind_Varible has the value null or Column_Name IN (99,55))

    Thank you
    Any help will be appreciated

    I put mine up in this way, my binding variable is a list of values separated by commas, that is to say ("A, B, C, D") (I have a select that many shuttle) then I used a regexp substr to turn them into a list

     WHERE    :Bind_Batch_NM_Comma_Sep_List IS NULL
             OR batch_nm IN
                   (    SELECT REGEXP_SUBSTR (:Bind_Batch_NM_Comma_Sep_List,
                                              '[^,]+',
                                              1,
                                              LEVEL)
                                  batch_nm
                          FROM DUAL
                    CONNECT BY LEVEL <=
                                    REGEXP_COUNT (:Bind_Batch_NM_Comma_Sep_List,
                                                  ',')
                                  + 1)
    

    Published by: pollywog on September 18, 2012 16:07

  • How not to display variable binding in the query ADF search panel?

    Hello, I use JDeveloper 11.1.2.3.0.

    I have a variable binding in my VO, (* required) that I use in the sql query. I put the value of this variable to link through the groovy expression so I don't have to manually put through my page. It works fine but the problem is that it appears in the query ADF Panel that I created in my page. To do this, I created a ViewCriteria and I've specified to display only 3 (other) fields for the simple search. Apart from the selected 3 variable bind shows here again because its value is set. I tried to remove the ' * required ' of the variable binding in the original Version, but in this case I have problems with my sql query.

    Does anyone know how this variable is not to display in the Panel request ADF?

    Thank you

    Has tried to define the binding to bee hidden variable?

    Controll tips, hint of display = hide

  • passing variable table_name in SELECT... IN... FROM in pl/sql

    DECLARE
    cnt1 number;
    cnt2 number;
    tab_name  varchar2(34);
    bkp_tab_name varchar2(34) ;
    CURSOR c_cur IS select table_name from dba_tables where username='XXX';
    c1   c_cur%ROWTYPE;
    BEGIN
    tab_name='XXX.'||c1.table_name||'';
    bkp_tab_name='XXX.'||substr(c1.table_name,1,26)||'_BKP' ;
    select count(*) into cnt1 from tab_name;      ------------------------>how to pass "tab_name"  variable in this loop ??
    select count(*) into cnt2 from bkp_tab_name;  ------------------------>how to pass "bkp_tab_name"  variable in this loop ??
    dbms_output.put_line('original tab count: '||cnt1);
    dbms_output.put_line('backup tab count: '||cnt2);
    END LOOP;
    END;
    /
    in over pl/sql block how can I pass the variable table_name and bkp_tab_name Select... IN... CLAUSE?

    It is a very poor design.

    It would be something like this...

    DECLARE
    cnt1 number;
    cnt2 number;
    sql1 varchar2(4000) ;
    sql2 varchar2(4000);
    tab_name  varchar2(34);
    bkp_tab_name varchar2(34) ;
    CURSOR c_cur IS select table_name from dba_tables where username='XXX';
    c1   c_cur%ROWTYPE;
    BEGIN
    tab_name='XXX.'||c1.table_name||'';
    bkp_tab_name='XXX.'||substr(c1.table_name,1,26)||'_BKP' ;
    --select count(*) into cnt1 from tab_name;      ------------------------>how to pass "tab_name"  variable in this loop ??
    --select count(*) into cnt2 from bkp_tab_name;  ------------------------>how to pass "bkp_tab_name"  variable in this loop ??
    sql1 := 'select count(*) from '||tab_name;
    sql2 := 'select count(*) from '||bkp_tab_name;
    execute immediate sql1 into cnt1;
    execute immediate sql2 into cnt2;
    dbms_output.put_line('original tab count: '||cnt1);
    dbms_output.put_line('backup tab count: '||cnt2);
    END LOOP;
    END;
    / 
    

    but maybe you had better explain what you are trying to reach that make dynamic SQL is not a good idea, and it is rare that you should have the dynamic table names that are not known at design time.

  • How to pass variables to idoc html?

    Hello

    I'm going through user input to HTML (for example the list of parameter values 'Faculty of the student')"to the script idoc to do a database query and retrieve related information student?


    Anyone have an example on how to do this...

    Kind regards
    AAQ

    Hey ayman.

    Take a look at this post for some good info on how to reach some parts of what you are looking for: http://cfour.wordpress.com/2010/05/28/how-to-adding-an-external-database-lookup-to-a-ucm-checkin-form/

    To more directly answer your questions, you need to do is pass the value as a query parameter in the URL. The content server analyzes all query parameters into variables in the portion of local data of the DataBinder. Which means that in the idoc on a page of the Site Studio, you have direct access to the value of the parameter as follows:

    I'm going to assume on your page, you were going to make a call to executeService in the query on the database. If you use a resource of application under this call to service, all you have to do is make sure you that you are querying the resource definition has the same name of variable as the value passed in.

    Hope that helps,

    Andy Weaver - Senior Consultant software
    Fishbowl Solutions< http://www.fishbowlsolutions.com?wt.mc_id="L_Oracle_Consulting_amw_OTN_ECM">

  • passing parameters to the select query in DB link to call him...

    I have a DB link that executes the select query based on user specified parameter.

    Now, I created an invoke activity and specified input [which must be passed to the query] and output parameters [it is the result of the query]. That invoke link activity DB calls in which a parameter was created to be used in the select query. So my question is, DB link partner take the input parameter of call activity automatically or do we need to specify a mapping for this?

    When you create a partnerlink db the setting that you create for your chosen matches the entry and when you create the variable entry in the invoke for this partnerlink is created with the type of the parameter.

    Create an assignment before your invoke and assign a value to the input variable that you created in the invoke. This value will be passed and used as a parameter in the selection.

    Heidi.

  • How to pass variables in different QML

    hand code. QML:

    import bb.cascades 1.2
    TabbedPane {}
    ID: tabnav
    property string book_path;

    .........

    onTriggered: {}
    clearSelection();
    Select (row);
    var point = dataModel.data (row);
    If {(point)
    book_path = maincfg.bookpath + item.text;  (, book_path'm happy Get)
    var kvbookview1 = kvbookview.createObject ();
    NAV.push (kvbookview1);
    }
    }
    }
    attachedObjects:]
    {ComponentDefinition}
    ID: kvbookview
    Source: "kv_book_view.qml".
    }
    ]

    .........

    Code of kv_book_view. QML:

    import bb.cascades 1.2
    {Page}
    ID: Discovers;

    .........
    onCreationCompleted: {}
    Text3. Text =?     (how to get variables from book_path to main.qml)
    }

    Thank you

    Simon has given you the solution:

    import bb.cascades 1.2
    Page {
        id: view;
        .........
        onCreationCompleted: {
            text3.text = tabnav.book_path
        }
    
  • How to pass variables to the basket to your fund information?

    Here's what I have to do.

    I have a site that sells the same products to several groups of people.

    When a customer enters our site that they need to choose what 'group', they belong to.

    Based on this selection of some of the images, text and links on the pages are customizable (I can do this without problems using a combination of passing parameters through the URL, and writing based on cookies).

    My problem is when I get the extraction are the cookies that I wrote do not give because the url changes to the worldsecuresystems.com.

    I tried everything I can think of to try to get the information stored in the basket page to transfer to the payment page.

    I basically need to spend the 2 pieces of data based on {{globals.cookie.creditunion}} and {{globals.cookie.group}} in the cart at checkout it is added to the CMS or order somewhere.

    I hope that makes sense.

    James

    Hi James,

    Just like Mihai said, pass variables by using the url in the payment button.

    Use the liquid version to create a payment button, here is an example:

    Checkout

    Afterwards, you should be able to go to globals.get.creditunion or globals.get.group

    Good luck

    Stoiky

  • How to pass variable from bean to resourceID for the document map?

    Hello experts, I have added WebCenter workflow Microsoft document explore task in my ADF which as a parameter called resourceId.   I want to pass variable bean to this setting, because the content ID (doc name or ID) are determined dynamically.

    When I provide ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} as a resource in the expression ID, it works very well.    But samething if I attribute to a bean bean variable and entitlement in the form ${sessionScope.MyBean.docName}, it evaluates the variable bean in the form ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} and then below throws the exception:

    [2013-10 - T 02, 14: 34:50.369 - 04:00] [DefaultServer] [WARNING] [WCS-07219] [oracle.webcenter.doclib.internal.view.backing.ContentProvider] [tid: [ASSETS].] [ExecuteThread: '10' for the queue: "(self-adjusting) weblogic.kernel.Default"] [username: anonymous] [ecid: d50192415c689920:-7d97126c:1417a5d6a49: - 8000 - 000000000000008 a, 0] [APP: CreateContactWSProxy] invalid parameter combination: the login name specified by resourceId = ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} is not specified in the parameter connectionName = UCM57Server.

    Variable bean is defined as:

    private String Nomdoc = "${" UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI "} ;

    Please give me some advice on how to pass the value to resourceId dynamically via the variable of bean.

    Thank you.

    private String Nomdoc = "UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI";

    Without $ {}

  • How to pass variables from cursor to a job

    Hello

    begin
    for cur_1 in (select  tab1.c1  c1 from  tab1)
    loop 
    dbms_scheduler.create_job(......
    ..........
    job_type =>plsql_block,
    job_action => 'declare verrm varchar2(100); '||
                           ' begin   for cur_2 in (select col1,col2 from tab2)'||
                             'loop prc( cur_1. c1,cur2.col1,cur.col2  ); end loop;  end;' ,----- gettin gerror undeclared identifier cur_1.c1
    ........)               
    end loop;

    user8731258 wrote:

    When reading about dbms_parallel, I have seen examples where the task is running an sql statement.
    Now, can we run a pl sql also block?

    Why would you run a PL/SQL block in parallel?

    Yes, the DBMS_PARALLEL_EXECUTE. Run_Task() sql_stmt parameter can accept an anonymous PL/SQL block as statement. For example

    --// example of passing a PL/SQL anon block as statement
    declare
      ..
    begin
            ..code..
    
            parallelSql := 'declare
                                    t1      timestamp;
                            begin
                                    t1 := SysTimestamp;
                                    update foo_tab set obj_type = lower(obj_type)
                                    where rowid between :start_id and :end_id;
                                    ProcessLog( fromTime=>t1, toTime=>SysTimestamp, rowsProcessed=>SQL%RowCount );
                            end;';
    
            DBMS_PARALLEL_EXECUTE.Run_Task(
                    task_name => taskName,
                    sql_stmt => parallelSql,
                    language_flag => DBMS_SQL.NATIVE,
                    parallel_level => 5
            );
    
            ..code..
    end;
    

    However, if you want code PL/SQL real multithreaded (no SQL), then that can be done using a parallel pipeline table function (PL/SQL function).

    So, I'll go for dbms_Scheduler thing. But still when I'm stuck on how to pass the value of date to work...

    In the example I posted using DBMS_JOB - cursor loop identifies the days of treatment. The loop then call ScheduleJob() to schedule a task of process to date. This procedure should look something like the following:

    // schedules a job to run procedure ProcessDailyInvoices for the specified day
    create or replace procedure ScheduleJob( day date ) is
            jid             number;
            dateParam       varchar2(100) default 'to_date(''$DATE'',''$FORMAT'')';
            plsqlBlock      varchar2(1000);
    begin
            dateParam := replace( dateParam, '$DATE', to_char(day,'yyyy/mm/dd') );
            dateParam := replace( dateParam, '$FORMAT', 'yyyy/mm/dd' );
            plsqlBlock := 'begin ProcessDailyInvoices( day=>'||dateParam||' ); end;';
    
            DBMS_JOB.Submit(
                    job => jid,
                    next_date => sysdate,
                    what => plsqlBlock
            );
    end;
    
  • How to pass variables by using the command line when starting from a native application ActionScript

    How to pass in variables or arguments to start using the command line when starting a native ActionScript application? For example, I have my app MySweetWidget call and it was compiled with Adobe AIR runtime in captivity so now I have MySweetWidget.exe.

    In the command line, I call MySweetWidget.exe and would like to pass in variables or properties of the application. I guess that these variables are read from the loaderInfo.parameters object.

    Please let me know if the Adobe AIR runtime supports passing the parameters to native execution. If so, I would like to help determine the correct format of how pass variables. So would you want to read those loaderinfo.parameters object?

    Thank you

    Jeff

    I found the answer to my own question:

    Yes, it's a feature supported. It is documented on the following page:

    http://help.Adobe.com/en_US/FlashPlatform/reference/ActionScript/3/Flash/desktop/NativeApp lication.html #event:invoke

    When you subscribe to the event from the NativeApplication invoke it will subsequently send the event and you read the table of e.arguments object to get the start in the native application arguments.

  • How to store results of the select query in the tables.

    I created a variable varray type and now want to assign some data of output of the select query in pl/SQL, as well as in reports 6i.

    You are in the wrong forum (this is for problems with the SQL Developer tool). You were the one where you have published first on the right, but not to reuse independent threads as you did.

    Kind regards
    K.

  • How to pass the binding settings dynamically

    Hi experts,

    In my query VO I wasn't a binding parameter. I want to call a parameter dynamically. How to call dynamically bind the parameter in my co or am.

    give me the steps.

    Thanks in advance

    Hello

    write a method in AM:
    ' Public Sub GEPSSupplierASLDetails (pageContext OAPageContext, OAWebBean webBean)
    {
    ViewObject SupplierStatusVOImpl = getSupplierStatusVO ();
    No String = new String();
    if(viewObject!=null)
    {
    If (PageContext.GetParameter ("person")! = null &! pageContext.getParameter("Person").equal(""))
    person = PageContext.GetParameter ("person"). ToString();
    viewObject.setWhereClause ("PERSON_ID =: 1");
    viewObject.setWhereClauseParams (null);
    viewObject.setWhereClauseParam(0,person);
    clearCache();
    viewObject.executeQuery ();
    }
    }

    Call this method in CO:

    MDB SupplierASLDetails (pageContext, webBean);

    Concerning
    Meher Irk

Maybe you are looking for