Bind Variable Problem

Hi Guys
PLease i am really stuck
i have a LOV which has a complex query...
in that query there are multiple bind variables that are assigned... ie :1 , :2 and so forth
here is the query for the LOV
SELECT a.kri_description, a.kri_id
FROM xx_key_result_indicators a, xx_kri_positions b
WHERE TO_DATE (:1, 'DD-MON-YYYY') BETWEEN a.effective_from_date
AND a.effective_to_date
AND TO_DATE (:2, 'DD-MON-YYYY') BETWEEN b.effective_from_date
AND b.effective_to_date
AND a.kra_id = :3
AND a.kri_id IN (
SELECT c.kri_id
FROM xx_kri_positions c
WHERE TO_DATE (:4, 'DD-MON-YYYY')
BETWEEN c.effective_from_date
AND c.effective_to_date
AND c.position_id = :5
AND c.enable_flag = 'Y')
AND b.position_id = :6
AND a.enable_flag = 'Y'
AND b.enable_flag = 'Y'
AND a.kri_id NOT IN (SELECT NVL (g.kri_id, 1)
FROM xx_perf_kri g
WHERE g.perf_kra_id = :7)
UNION
SELECT f.kri_description, f.kri_id
FROM xx_key_result_indicators f
WHERE TO_DATE (:8, 'DD-MON-YYYY') BETWEEN f.effective_from_date
AND f.effective_to_date
AND f.kra_id = :9
AND f.kri_id NOT IN (SELECT e.kri_id
FROM xx_kri_positions e)
AND f.enable_flag = 'Y'
AND f.kri_id NOT IN (SELECT NVL (d.kri_id, 1)
FROM xx_perf_kri d
WHERE d.perf_kra_id = :10)
so in theroy when i push the tourch icon next to my text field i set these bind variables...
so in theroy that should work,,, but becuase i have a lov the framework will automatically assign extra where clause params for the filter.... and the query will look as follows
SELECT *
FROM (SELECT a.kri_description, a.kri_id
FROM xx_key_result_indicators a, xx_kri_positions b
WHERE TO_DATE (:1, 'DD-MON-YYYY') BETWEEN a.effective_from_date
AND a.effective_to_date
AND TO_DATE (:2, 'DD-MON-YYYY') BETWEEN b.effective_from_date
AND b.effective_to_date
AND a.kra_id = :3
AND a.kri_id IN (
SELECT c.kri_id
FROM xx_kri_positions c
WHERE TO_DATE (:4, 'DD-MON-YYYY')
BETWEEN c.effective_from_date
AND c.effective_to_date
AND c.position_id = :5
AND c.enable_flag = 'Y')
AND b.position_id = :6
AND a.enable_flag = 'Y'
AND b.enable_flag = 'Y'
AND a.kri_id NOT IN (SELECT NVL (g.kri_id, 1)
FROM xx_perf_kri g
WHERE g.perf_kra_id = :7)
UNION
SELECT f.kri_description, f.kri_id
FROM xx_key_result_indicators f
WHERE TO_DATE (:8, 'DD-MON-YYYY') BETWEEN f.effective_from_date
AND f.effective_to_date
AND f.kra_id = :9
AND f.kri_id NOT IN (SELECT e.kri_id
FROM xx_kri_positions e)
AND f.enable_flag = 'Y'
AND f.kri_id NOT IN (SELECT NVL (d.kri_id, 1)
FROM xx_perf_kri d
WHERE d.perf_kra_id = :10)) qrslt
WHERE (( UPPER (kri_description) LIKE :1
AND ( kri_description LIKE :2
OR kri_description LIKE :3
OR kri_description LIKE :4
OR kri_description LIKE :5
not that now there are bind variable 1 through to 10 and then 1 through to 5...
the error i am getting is not all variables bound exception..
please if anyone could help....
Thanks

I am new to OA Fwk, but I am Expert of java, J2EE.
My solution will work fine in pure java.
I am sure same should work in OA also.
But I never experimented it. Give it a try
Lets take a select query:
select my_col from my_table where clo1 = :1 and col2 = :1
In this query there is only one bind varible ":1" in the world of PL/SQL.
But for there are two bind varibales you need to set them two times.
in java you will do
stmt.setString(1, myval);
stmt.setString(2, myval);
Now coming to your query.
It has 10 +5 total 15 bind variables and you need to set 15 but not 10.
For all practicle purposes assume that :1 or :2 or :3 is equivalent to ?
Thus your select query is equivalent to
SELECT *
FROM (SELECT a.kri_description, a.kri_id
FROM xx_key_result_indicators a, xx_kri_positions b
WHERE TO_DATE (?, 'DD-MON-YYYY') BETWEEN a.effective_from_date
AND a.effective_to_date
AND TO_DATE (?, 'DD-MON-YYYY') BETWEEN b.effective_from_date
AND b.effective_to_date
AND a.kra_id = ?
AND a.kri_id IN (
SELECT c.kri_id
FROM xx_kri_positions c
WHERE TO_DATE (?, 'DD-MON-YYYY')
BETWEEN c.effective_from_date
AND c.effective_to_date
AND c.position_id = ?
AND c.enable_flag = 'Y')
AND b.position_id = ?
AND a.enable_flag = 'Y'
AND b.enable_flag = 'Y'
AND a.kri_id NOT IN (SELECT NVL (g.kri_id, 1)
FROM xx_perf_kri g
WHERE g.perf_kra_id = ?)
UNION
SELECT f.kri_description, f.kri_id
FROM xx_key_result_indicators f
WHERE TO_DATE (?, 'DD-MON-YYYY') BETWEEN f.effective_from_date
AND f.effective_to_date
AND f.kra_id = ?
AND f.kri_id NOT IN (SELECT e.kri_id
FROM xx_kri_positions e)
AND f.enable_flag = 'Y'
AND f.kri_id NOT IN (SELECT NVL (d.kri_id, 1)
FROM xx_perf_kri d
WHERE d.perf_kra_id = ?)) qrslt
WHERE (( UPPER (kri_description) LIKE ?
AND ( kri_description LIKE ?
OR kri_description LIKE ?
OR kri_description LIKE ?
OR kri_description LIKE ?)))
you need to set the values in the order in which bind varibale appear in select query

Similar Messages

  • Bad Bind Variable Problem

    Hi
    I am trying to create a trigger and facing Bad Bind Variable problem.
    Plz let me know, what's the problem in this trigger.
    CREATE OR REPLACE TRIGGER Tender_tax_update AFTER
    INSERT
    OR UPDATE
    OR DELETE OF ITEM_QTY,ITEM_RATE,TENDER_ACC_QTY ON TENDER_ENQUIRY_ITEM_D REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW
    Declare
         v_amt TENDER_VENDOR_TAX_D.TAX_AMOUNT%TYPE;
         v_tax_ty TENDER_VENDOR_TAX_D.TAX_TYPE%TYPE;
         v_tax_cd TENDER_VENDOR_TAX_D.TAX_CODE%TYPE;
         v_ven_cd TENDER_VENDOR_TAX_D.VENDOR_CODE%TYPE;     
         v_item_cd TENDER_VENDOR_TAX_D.item_cd%TYPE;     
         v_tenno TENDER_VENDOR_TAX_D.tender_enquiry_no%TYPE;
    Begin
         if inserting then
              v_tax_ty:=:new.TAX_TYPE;
              v_tax_cd:=:new.TAX_CODE;
              v_ven_cd:=:new.vendor_code;
              v_item_cd:=:new.item_cd;
              v_tenno:=:new.tender_enquiry_no;
    select TAX_AMOUNT into v_amt from TENDER_TAX_DETAILS where tender_enquiry_no=v_tenno and TAX_CODE=v_tax_cd and TAX_TYPE=v_tax_ty and item_cd=v_item_cd and vendor_code=v_ven_cd;
    update TENDER_VENDOR_TAX_D set TAX_AMOUNT=v_amt where tender_enquiry_no=v_tenno and TAX_CODE=v_tax_cd and TAX_TYPE=v_tax_ty and item_cd=v_item_cd and vendor_code=v_ven_cd;
         end if;
    End Tender_tax_update;
    Database deails are as follows:
    TENDER_VENDOR_TAX_D
    Name Null? Type
    TENDER_ENQUIRY_NO NOT NULL VARCHAR2(8)
    VENDOR_CODE NOT NULL VARCHAR2(4)
    TAX_CODE NOT NULL VARCHAR2(4)
    PERCENTAGE NUMBER(5,2)
    TAX_AMOUNT NUMBER(15,2)
    ITEM_CD NOT NULL VARCHAR2(10)
    TAX_FLAG VARCHAR2(1)
    TAX_TYPE CHAR(3)
    TENDER_TAX_DETAILS
    Name Null? Type
    TENDER_ENQUIRY_NO NOT NULL VARCHAR2(8)
    VENDOR_CODE VARCHAR2(4)
    ITEM_CD VARCHAR2(10)
    TAX_CODE NOT NULL VARCHAR2(4)
    TAX_TYPE CHAR(3)
    TAX_AMOUNT NUMBER
    Message was edited by:
    user648065

    facing Band Bind Variable problem.Doesn't the error message tell you which bind variable is the problem?

  • Query Bind Variables problem

    I have a ViewObject with bindvariable GroupnameItemname.
    In JHeadstart AppDef this item is not bound to model, but included in Quick Search and Advanced Serach, as in "7.2.5. Using Query Bind Variables in Quick or Advanced Search"
    First I get an error saying GroupnameItemname*Var* is not found on ViewObject, so I changed the bindvariables to GroupnameItemnameVar
    Is something changed here? We are using JHeadstart 10.1.3.3.75 / JDeveloper 10.1.3.4.0
    After changing the bindvariablename I have another problem:
    I get an error in JhsApplicationModuleImpl.advancedSearch on these lines:
    boolean isBindParam = !viewCriterium.isAttributeBased();
    AttributeDef ad = isBindParam ? null : vo.findAttributeDef(attribute);
    The first line returns false for my bindvariable, so the second line raises an error like "JBO-25058: Definition <attr> of type Attribute not found in <VO>".
    In QueryCondition:
    public boolean isAttributeBased()
    return def!=null; //but def is not null here, it is an instance of DCVariableImpl
    This used to work in previous versions of JHeadstart...
    Please help,
    Greetings HJH

    In my MyApplicationModuleImpl (which extends JhsApplicationModuleImpl) I did override advancedSearch.
    Copied the code from JhsApplicationModuleImpl and changed a few lines:
    After
    sLog.debug("executing advancedSearch for " + viewObjectUsage);
    ViewObject vo = getViewObject(viewObjectUsage);
    I added:
    //clear bindParams:
    String[] attrNames =
    vo.getNamedWhereClauseParams().getAttributeNames();
    for (int i = 0; i < attrNames.length; i++) {
    vo.setNamedWhereClauseParam(attrNames\[i\], null);
    sLog.debug("bindParam leeggemaakt: " + attrNames\[i\]);
    And a bit later in the method I made a changed as follows:
    // boolean isBindParam = !viewCriterium.isAttributeBased();
    boolean isBindParam = viewCriterium.getName().endsWith("Var");
    A bit crude, but worked for me...
    Cheerio,
    HJH
    Edited by: HJHorst on Mar 19, 2009 1:56 PM (had to escape square brackets...)

  • Bind variable problem in cascading LOVs

    Hi,
    after upgrade from APEX 3.0 to 3.1 all my cascading LOVs stopped working correctly. First level LOV is OK, but the second level LOV, which contains a bind variable in its SQL code, fails. Debugging shows that the bind variable referrencing to the value of the first level LOV is empty. It has worked without problems in 3.0. The bind variable format is traditional :ITEM
    This is an example of the LOV SQL:
    SELECT PSKUP_CZ display_value, ID return_value
    FROM PSKUP
    WHERE sk_id = :P1_SKUP
    ORDER BY 1
    Where :P1_SKUP refers to the vaule of the top level LOV.
    In Oracle® Database Application Express Release Notes Release 3.1 in chapter "3 Open Bugs and Known Issues", I've only found a short remark called "Problems with Queries Containing a Bind Variable and a String with Two Dashes". The recommended solution here was to use v('P18_X') instead of :P18_X
    I tried that but with no effect on my problem.
    Anybody has similar experience? Any workarounds?
    Thanks in advance,
    Zdenek

    Hi Zdenek,
    DV, NV, V are an optional component of the ApexLib framework. Actually they don't have anything to do with the framework itself.
    Because of the nature of this functions they have to have a hard coded reference to the FLOWS_XXX schema, but which causes problems if APEX is upgraded to a new version and the functions are not altered.
    I will probably removed them from the installation instructions or add a big remark that they have to be altered after an upgrade, because this kind of threads are re-occurring after each new released APEX version.
    Thanks
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com/
    The APEX Builder Plugin: http://builderplugin.oracleapex.info/ New
    The ApexLib Framework: http://apexlib.sourceforge.net/

  • Bind variable problem when renaming page items?

    APEX 2.1 on IE6.
    I'm having trouble with bind variables. I cannot reproduce this regularly, but I notice it from time to time. Basically, certain page items will simply refuse to hold their contents, even though the debug output says :
    0.03: Saving g_arg_names=P9_XYLOPHONE_XYLOPHONE and g_arg_values=hello
    0.03: ...Session State: Save "P9_XYLOPHONE_XYLOPHONE" - saving same value: "hello"
    Whenever I reference the variable (using :, V(), NV(), or &.) I get NULL. None of the output indicates that it was changed elsewhere. I've noticed that changing the name of page item influences this. Shorted names tend to cause fewer problems.
    I can't be more specific, as I can't figure out the pattern. Has anyone else noticed this?
    Cheers.

    hi dccase
    couldnt get what the documentation says with APP_SESSION to work.
    http://aae18331:8089/apex/f?p=102:3:$APP_SESSION.::3:MY_ITEM:315
    However the following which i guess assumes the default session worked
    =====================================================
    http://aae18331:8089/apex/f?p=102:3::::3:MY_ITEM:315
    cheers
    shaunak

  • Bind variable problem in a procedure

    Hi,
    Is there any way I can pass a parameter in a procedure as we do in sql plus (for example where date = &date).
    I have a procedure that is somewhat similar to this...
    select (field 1, field2...
    from table1, table 2....
    where ....
    and ..
    and v_fiscal_year (here I want the bind variable)
    UNION
    select (field 1, field2...
    from table1, table 2....
    where .....
    and ..
    and ..
    and v_fiscal_year (here I want the bind variable)
    I need to register this procedure in oracle apps as a concurrent program where a user should be able to provide value for fiscal_year and then write the file out in a text file.
    Thanks
    A/A

    What you've shown isn't a procedure, but is a query.
    I assume your "field1", "field2" within the query means that you are expecting to be able to create a dynamic SQL from parameters passed into a procedure.
    For that you will need to use DBMS_SQL package to create and execute a dynamic query or use the EXECUTE IMMEDIATE statemetn to execute a query built up in a string. Note however, that dynamic SQL is inherently bad practice and should only ever be used as a last resort. What exactly are you trying to achieve as there are likely to be better ways of doing it?

  • User Report data bind variable problems

    Hello,
    I am trying to build a simple report in SQLDeveloper, using a DATE bind variable. But it fails with the error message:
    Inconsistent datatype, expected DATE got NUMBER
    SELECT * FROM FLOW_COMP_REC_SUMMARY_RU
    where create_date = trunc(:TARGET_DATE)
    and type = 'D'
    ORDER BY MESSAGE_FLOW_ID
    Running this query in SQLDeveloper worksheet executes properly after a dialog box pops up and I enter: current_date - 1
    SELECT * FROM FLOW_COMP_REC_SUMMARY_RU
    where create_date = trunc(&TARGET_DATE)
    and type = 'D'
    ORDER BY MESSAGE_FLOW_ID
    I've searched but no clear solutions present themselves. If you have one it would be most appreciated.
    Thanks

    You'll have to convert the input to date yourself:
    SELECT * FROM FLOW_COMP_REC_SUMMARY_RU
    where create_date = TO_DATE(:TARGET_DATE, 'DD/MM/YYYY')
    and type = 'D'
    ORDER BY MESSAGE_FLOW_ID
    Have fun,
    K.

  • Bind variables problem, very urgent

    hi,
    Oracle gurus,
    In my current project while executing the following ststement i am getting the run time error"ORA-01008: not all variables bound".
    This statement is used inside of a procedure and some bind arguments have values and some arguments have NULL values.
    EXECUTE IMMEDIATE ' insert into trn_billtask
    (area_id,
    asn_no,
    batch_no,
    cases_per_pallet,
    color_zone,
    comp_id,
    cube,
    currdate,
    eachs_per_case,
    ebiz_sku_no,
    ebiz_user_no,
    footage,
    hazmat_flag,
    home_zone,
    intf_conf_flag,
    line_no,
    location,
    lp,
    merge_flag,
    no_of_cases,
    no_of_units,
    packcode,
    po_line_no,
    po_no,
    putaway_strategy,
    qty
    ,rcv_type,
    site_id,
    sku,
    skudesc1,
    skufam,
    skugroup,
    sku_status,
    status_flag,
    task_date,
    task_desc,
    task_type,
    type_stor_equip,
    uom_id,
    wght)
    select null,
    rh.rec_no,
    p.lot,
    pr.each_qty,
    sl.color_zone,
    ''MR'',
    pr.unit_cube*(nvl(p.qty,0)/nvl(pr.each_qty,1)),
    sysdate,
    pr1.each_qty,
    p.prod_no,
    1,
    nvl(sl.wdth,0) * nvl(sl.dpth,0),
    decode(s.haz_mat_class,null,''N'',''Y''),
    sl.home_zone,
    ''N'',
    r.line_no,
    p.end_loc,
    p.lp,
    nvl(p.access_aisle,''N''),
    round(nvl(p.qty,0)/nvl(pr.each_qty,1)),
    1,
    p.pkg_no,
    r.p_line_no,
    rh.po_no,
    r.putaway_strategy,
    p.qty,
    rh.rec_type,
    ''HW'',
    s.sku,
    s.sku_desc1_35,
    s.prod_fam,
    s.prod_cat,
    p.prod_stat,
    2,
    sysdate,
    ''Handling'',
    bt.task_type,
    nvl(sl.type_stor_equip,''100''),
    p.uom,
    pr.unit_wght*(nvl(p.qty,0)/nvl(pr.each_qty,1))
         from [email protected] s,mast_abbtype bt,mast_company bc,[email protected] pr,[email protected] sl,
         [email protected] r,[email protected] rh,[email protected] p,[email protected] pr1
         where p.end_time is not null
              and decode(bt.comp_id,null,:p_comp_id,bt.comp_id)= :p_comp_id
              and decode(bt.site_id,null,:p_site_id,bt.site_id)=:p_site_id
              and bt.task_type = :p_task_type
              and bc.comp_id = :p_comp_id
              and p.proc_cntrl_no =r.rec_cntrl_no
              and bc.ebiz_appown_no= 40
              and bt.delete_flag=''N''
              and r.rec_cntrl_no = rh.rec_cntrl_no
              and p.proc_cntrl_no = nvl(:p_po_no,p.proc_cntrl_no)
              and p.prod_no = nvl(:p_ebiz_sku_no, p.prod_no)
              and nvl(p.prod_stat, ''~'') =nvl(:p_sku_status, nvl(p.prod_stat, ''~''))
              and p.lp = nvl(:p_lp, p.lp)
              and nvl(p.lot, ''~'') = nvl(:p_batch_no, nvl(p.lot, ''~''))
              and r.lp = p.lp
              and p.prod_no = s.prod_no
              and p.prod_no = pr.prod_no
              and p.pkg_no = pr.pkg_no
              and pr.logical_case_flg = ''Y''
              and p.end_loc = sl.loc
              and nvl(p.sku_key3,''A'') != ''1''
              and decode(''COMP'',''BYID'',s.buyer_id,s.comp_code) = bc.comp_id
              and bc.comp_id =:p_comp_id
              and r.cart_lp is null
              and trunc(p.date_time_created) between trunc(nvl(SYSDATE-10000,p.date_time_created))
              and trunc(nvl(SYSDATE,p.date_time_created))
              and trunc(p.date_time_created) >= trunc(bc.effective_date)
              and pr.prod_no = pr1.prod_no and pr.pkg_no = pr1.pkg_no and pr1.logical_plt_flg = ''Y'' '
         using p_comp_id,p_site_id,p_task_type,p_po_no,p_ebiz_sku_no,p_sku_status,p_lp,p_batch_no;
    ur suggestions r most welcome
    thanks
    RR

    Placeholders (:name) are bound by position in EXECUTE IMMEDIATE SQL statement. Hence Oracle does not consider multiple :p_comp_id in your statement to be the same thing. You would need to repeatedly bind them for each occurrence, or use an approach (DBMS_SQL.BIND_VARIABLE or EXECUTE IMMEDIATE PL/SQL block) which binds by name or position / name.
    In the case of the above example you would have a USING clause similar to the below (Note that I am unable to test this).
    EXECUTE IMMEDIATE sql_statement
       USING p_comp_id, p_comp_id, p_site_id,
          p_site_id, p_task_type, p_comp_id,
          p_po_no, p_ebiz_sku_no, p_sku_status,
          p_lp, p_batch_no, p_comp_id;

  • How to catch possible bind variable performance impact during development?

    Since producing load is a problem on development environment and the technics provided with Oracle can capture a parsing problem caused by a bind variable problem only after execution we are looking for pro-active solution like 10g compile time warnings stuff.
    Using binds can have impact on indexed skewed data columns and paritioned tables, so lets just think about a typical oltp environment with always same access path results for similar queries using bind variables.
    Using v$ views or even better dba_hist after 10g or 10046 trace are considered as re-active approaches since they can only be examined on a pre-production loaded environment.
    Is there any tool or approach you are using or may suggest?
    Thank you, best regards.
    Tonguc

    Are you using PL/SQL only?
    If so, I'd look at all the EXECUTE IMMEDIATE's and DBMS_SQL calls throughout the code and determine one by one if they pose a threat. They should be rare, so a simple search against the USER_SOURCE could be sufficient.
    Other programming languages will have different statements to watch out for.
    I am not aware of any tool that does this for you.
    Hope this helps.
    Regards,
    Rob.

  • Problem with bind variable

    Hi,
    I need to get bind variables on SIEBEL to test the performance of query and my problem is on BIND :3 because it's impossible to interprete this.
    NAME     POSITION     LAST_CAPTURED     VALUE_STRING
    :1     1,00     02/17/2010 11:54:25     1-15BVYY
    :2     2,00     02/17/2010 11:54:25     
    :3     3,00     02/17/2010 11:54:25     W1B 1AH%
    :1     1,00     02/17/2010 12:48:04     1-15BVYY
    :2     2,00     02/17/2010 12:48:04     
    :3     3,00     02/17/2010 12:48:04     TQ3 3BJ%
    Thanks for your help

    I have no erros.
    I just want to get the real value of bind variable to run my query, but the problem is on bind 2.
    When i run this
    select name,position,last_captured,value_string
    from DBA_HIST_SQLBIND
    where sql_id='&SQLID'
    i obtain this
    NAME     POSITION     LAST_CAPTURED     VALUE_STRING
    :1     1,00     02/17/2010 11:54:25     1-15BVYY
    :2     2,00     02/17/2010 11:54:25     
    :3     3,00     02/17/2010 11:54:25     W1B 1AH%
    :1     1,00     02/17/2010 12:48:04     1-15BVYY
    :2     2,00     02/17/2010 12:48:04     
    :3     3,00     02/17/2010 12:48:04     TQ3 3BJ%
    What is the value of bind :2
    Thanks

  • Problem with bind variable in subselect

    Using the Oracle 9i JDBC Driver and a query of the form:
    select * from atable a where a.thing = ? and a.id in (select id from btable where b.something = ?)
    via a PreparedStatement, the second parameter is not being set correctly. The query executes but does not return the expected results. If I hard code the param value into the query it works fine. I think the second parameter is being set to an empty string (hence the query executes OK but no results returned). This seems to be peculiar to bind variables in sub-selects.
    Has anyone else encountered this problem?

    ps.setLong(1, along);
    ps.setString(2, astring);
    I've checked this against different driver versions. It's OK with the 10.2 driver but fails with the 10.1. So I've moved to the 10.2.

  • Problem in setting bind variable

    Hi,
    I am sorry but I think I am having problem with this simple ADF BC concept.
    I created a View object from HR Schema and I wanted to filter it with department id
    so I created a bind variable :dept_id.
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="EmployeesView"
      Version="11.1.1.59.23"
      SelectList="Employees.EMPLOYEE_ID,
           Employees.FIRST_NAME,
           Employees.LAST_NAME,
           Employees.EMAIL,
           Employees.PHONE_NUMBER,
           Employees.HIRE_DATE,
           Employees.JOB_ID,
           Employees.SALARY,
           Employees.COMMISSION_PCT,
           Employees.MANAGER_ID,
           Employees.DEPARTMENT_ID"
      FromList="EMPLOYEES Employees"
      BindingStyle="OracleName"
      CustomQuery="false"
      PageIterMode="Full"
      UseGlueCode="false"
      Where="Employees.DEPARTMENT_ID = :dept_id"
      RowClass="com.test.view.EmployeesViewRowImpl"
      ComponentClass="com.test.view.EmployeesViewImpl">
      <DesignTime>
        <Attr Name="_codeGenFlag2" Value="Access|Coll|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Variable
        Name="dept_id"
        Kind="viewcriteria"
        Type="oracle.jbo.domain.Number"/>
      <ViewAccessor
        Name="JobsView1"
        ViewObjectName="com.test.view.JobsView"
        RowLevelBinds="true"/>
      <ViewAccessor
        Name="EmployeesView1"
        ViewObjectName="com.test.view.EmployeesView"
        RowLevelBinds="true"/>
      <ViewAccessor
        Name="DepartmentsView1"
        ViewObjectName="com.test.view.DepartmentsView"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_JobId"
        ListVOName="JobsView1"
        ListRangeSize="10"
        NullValueFlag="none"
        NullValueId="LOV_JobId_LOVUIHints_NullValueId"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="JobId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="JobId"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="JobTitle"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <ListBinding
        Name="LOV_ManagerId"
        ListVOName="EmployeesView1"
        ListRangeSize="-1"
        NullValueFlag="start"
        NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="ManagerId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="EmployeeId"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="FirstName"/>
          <Item Value="LastName"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <ListBinding
        Name="LOV_DepartmentId"
        ListVOName="DepartmentsView1"
        ListRangeSize="-1"
        NullValueFlag="start"
        NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="DepartmentId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="DepartmentId"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="DepartmentName"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <EntityUsage
        Name="Employees"
        Entity="com.test.Employees"/>
      <ViewAttribute
        Name="EmployeeId"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="EmployeeId"
        EntityUsage="Employees"
        AliasName="EMPLOYEE_ID"/>
      <ViewAttribute
        Name="FirstName"
        PrecisionRule="true"
        EntityAttrName="FirstName"
        EntityUsage="Employees"
        AliasName="FIRST_NAME"/>
      <ViewAttribute
        Name="LastName"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="LastName"
        EntityUsage="Employees"
        AliasName="LAST_NAME"/>
      <ViewAttribute
        Name="Email"
        IsUnique="true"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="Email"
        EntityUsage="Employees"
        AliasName="EMAIL"/>
      <ViewAttribute
        Name="PhoneNumber"
        PrecisionRule="true"
        EntityAttrName="PhoneNumber"
        EntityUsage="Employees"
        AliasName="PHONE_NUMBER"/>
      <ViewAttribute
        Name="HireDate"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="HireDate"
        EntityUsage="Employees"
        AliasName="HIRE_DATE"/>
      <ViewAttribute
        Name="JobId"
        LOVName="LOV_JobId"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="JobId"
        EntityUsage="Employees"
        AliasName="JOB_ID">
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Salary"
        PrecisionRule="true"
        EntityAttrName="Salary"
        EntityUsage="Employees"
        AliasName="SALARY"/>
      <ViewAttribute
        Name="CommissionPct"
        PrecisionRule="true"
        EntityAttrName="CommissionPct"
        EntityUsage="Employees"
        AliasName="COMMISSION_PCT"/>
      <ViewAttribute
        Name="ManagerId"
        LOVName="LOV_ManagerId"
        PrecisionRule="true"
        EntityAttrName="ManagerId"
        EntityUsage="Employees"
        AliasName="MANAGER_ID">
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="choice"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="DepartmentId"
        LOVName="LOV_DepartmentId"
        PrecisionRule="true"
        EntityAttrName="DepartmentId"
        EntityUsage="Employees"
        AliasName="DEPARTMENT_ID">
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="choice"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewLinkAccessor
        Name="EmployeesView"
        ViewLink="com.test.view.EmpManagerFkLink"
        Type="oracle.jbo.RowIterator"
        IsUpdateable="false"/>
      <ViewLinkAccessor
        Name="DepartmentsView"
        ViewLink="com.test.view.DeptMgrFkLink"
        Type="oracle.jbo.RowIterator"
        IsUpdateable="false"/>
    </ViewObject>But when I ran it in my Business Component Browser, I am encountering below error
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1Not sure but did I miss something? Thanks
    JDEV 11G PS3

    Hi Frank,
    Thanks, I think thats the gotcha...
    setting the bind variable to required causes the dialog to appear...
    Not sure though if this is a bug or something..

  • A problem with bind variables in a shuttle

    Hi
    After days of research I cannot come up with a solution to this problem which I hope will be easy to describe.
    I'm working on an apex.oracle.com workspace (4.02).
    I have a page with
    a) a region with tree which works well populated by a list of roles and users
    b) a region with a shuttle with the following sql
    List of values
    select SOB_DISPNAME, SOB_ID
    from VIEW_SYSTEMOBJECT
    order by SOB_DISPNAME
    Source
    SELECT SOB_ID FROM VIEW_OBJECTSECURITY_GRANTED WHERE U_ID = :P19_SELECTED_ID
    :P19_SELECTED_ID is a hidden textbox with the currently selected users id.
    The above works very well - I select a user from the tree and the shuttle lhs populates with unselected object names and the rhs with objects selected for the user. A submit button drives a page process which clears out and then inserts the selection into a the table (objectsecurity)
    So far so good.
    I added a list box to the shuttle region (:P19_SOB_TYPE_LIST) so that the data being worked on could be filtered by type, its driven by a LOV that produces a value or 'PAGE', 'REPORT' ... etc.
    I updated the above SQL to be
    List of Values
    select SOB_DISPNAME, SOB_ID
    from VIEW_SYSTEMOBJECT WHERE SOB_TYPE = :P19_SOB_TYPE_LIST
    order by SOB_DISPNAME
    and the source
    SELECT SOB_ID FROM VIEW_OBJECTSECURITY_GRANTED WHERE U_ID = :P19_SELECTED_ID AND SOB_TYPE = :P19_SOB_TYPE_LIST
    So now I would expect that if 'PAGE' is selected in the list box then only objects that are pages will be seen.
    However nothing at all appears.
    If I substitute the bind variable :P19_SOB_TYPE_LIST for 'PAGE' ... WHERE SOB_TYPE = 'PAGE' it works perfectly. So why does :P19_SELECTED_ID do it's job but not P19_SOB_TYPE_LIST ?
    I am probably making some ridiculously simple mistake but I just cannot spot it; is my syntax wrong?.
    The session state is persisting so that I can see the value of :P19_SOB_TYPE_LIST being set to PAGE
    Any help with this would be very much appreciated.

    Hi Dirk
    Thanks for that which looked promising!
    I added P19_SOB_TYPE_LIST as the Cascading LOV Parent Item and removed it from the where clauses of both SQL's and the result was that all types are shown; corresponding to my original position.
    I then added the where clause back to the LOV SQL and both shuttle boxes are blank again
    I added back to the source SQL and again both boxes empty
    Finally I removed the where clause from the LOV SQL (the only other combination) and again lhs box populated with all rows (not filtered) and rhs box blank.
    So unfortunately that doesn't seem to have fixed it.
    Many thanks for the help and any more will be greatly appreciated.
    Regards
    Charles

  • Bind variable and parameter problem

    Hello, I'm migrating a complex report from Oracle Report to BI Publisher. Now I have some problems with the bind variables. In order to explain the question clearly, I simplified the code as below. The value of e1 and sum1 can be generated correctly. The problem is that the value of e2 can not be generated.
    <dataTemplate name="dt" defaultPackage="dt">
         <properties>
              <property name="xml_tag_case" value="upper"/>
         </properties>
         <parameters>
         </parameters>
         <dataQuery>
              <sqlStatement name="q1">
                   <![CDATA[
    select     col1 c1, col2 c2, function1(:c1) e1,
    from     table1
    ]]>
              </sqlStatement>
              <sqlStatement name="q2">
                   <![CDATA[
    select     col3 c3, col4 c4, function2(:sum1) e2,
    from     table2
    ]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="g1" dataType="varchar2" source="q1">
                   <element name="e1" dataType="number" value="e1"/>
              </group>
              <group name="g2" dataType="varchar2" source="q2">
                   <element name="sum1" function="sum" dataType="number" value="g1.e1"/>
                   <element name="e2" dataType="number" value="e2"/>
              </group>
         </dataStructure>
    </dataTemplate>I tried to replace the bind variable ":sum1" in the function2(:sum1) with a value, e.g. 5. And e2 can be generated correctly. So my guess is that ":sum1" is not correctly parsed to function2.
    Please help if you have any idea of what may cause the problem.
    Thank you in advance.

    Thank you. Now the problem is clear and it relates to the conversion of the report.
    I posted a new question in Report conversion compatibility problem (argument, formula and sum column) .

  • Problem while binding variable progmatically shared variable in RT

    Hi All,
    I have a problem while programaticaly binding the shared variable from RT controller.
    The application scenario is as follows 
    I have three cFP controllers and two
    server PCs in my application. Servers are implemented with Redundancy. If server
    1 fails, server 2 will take care and vice versa. The cFP controller program is
    intelligent enough to detect this switching and identify the active server.
    I am using shared variable
    communication for transferring the data between cFP and Active Server. This I am
    achieving by binding the cFP variable to Server variables. I can bind server
    variables to cFP variables also. But I have some advantage with first one rather
    than second one.
    Now, cFP Variable to Server Variable
    binding I can do in two ways.
    Right click the variable in Project
    Explorer and select the network URL.
    Other method is by programmatic
    binding.
    Now Programatic binding should be
    done in cFP controller since cFP controller should bind to second server
    whenever it detects switching.
    For this, I tried with
    SharedVariableIO property node like in the below attached diagram 1.
    But I was getting a deployment error
    shown in attached diagram 2.
    The second method I tried is by
    transferring a shared variable library cFP Library.lvlib to cFP through FTP and
    opening the Library variable reference and by using the variable property node.
    This way of binding was successful when I run from windows PC. But in RT
    controller, it was giving me Error 1 while opening a
    library.
    I am attaching the code with this post
    Summary of the problem is I am not able to progmatically bind variables from
    RT Controllers
    Kindly help me in solving this
    problem.
    Regards,
    Blackperl
    Message Edited by blackperl on 08-18-2008 08:29 AM
    Message Edited by blackperl on 08-18-2008 08:31 AM
    Attachments:
    Code and Library.zip ‏27 KB
    Diagram 1.jpg ‏15 KB
    Diagram 2.jpg ‏25 KB

    Hi All,
    I have a problem while programaticaly binding the shared variable from RT controller.
    The application scenario is as follows 
    I have three cFP controllers and two
    server PCs in my application. Servers are implemented with Redundancy. If server
    1 fails, server 2 will take care and vice versa. The cFP controller program is
    intelligent enough to detect this switching and identify the active server.
    I am using shared variable
    communication for transferring the data between cFP and Active Server. This I am
    achieving by binding the cFP variable to Server variables. I can bind server
    variables to cFP variables also. But I have some advantage with first one rather
    than second one.
    Now, cFP Variable to Server Variable
    binding I can do in two ways.
    Right click the variable in Project
    Explorer and select the network URL.
    Other method is by programmatic
    binding.
    Now Programatic binding should be
    done in cFP controller since cFP controller should bind to second server
    whenever it detects switching.
    For this, I tried with
    SharedVariableIO property node like in the below attached diagram 1.
    But I was getting a deployment error
    shown in attached diagram 2.
    The second method I tried is by
    transferring a shared variable library cFP Library.lvlib to cFP through FTP and
    opening the Library variable reference and by using the variable property node.
    This way of binding was successful when I run from windows PC. But in RT
    controller, it was giving me Error 1 while opening a
    library.
    I am attaching the code with this post
    Summary of the problem is I am not able to progmatically bind variables from
    RT Controllers
    Kindly help me in solving this
    problem.
    Regards,
    Blackperl
    Message Edited by blackperl on 08-18-2008 08:29 AM
    Message Edited by blackperl on 08-18-2008 08:31 AM
    Attachments:
    Code and Library.zip ‏27 KB
    Diagram 1.jpg ‏15 KB
    Diagram 2.jpg ‏25 KB

Maybe you are looking for

  • My phone wont LET ME MAKE CALLS OR RECEIVE CALLS

    My phone doesnt ring when im getting a call and wont let calls or txt go thru.

  • XML nested Loop?

    hi all. I´ve just completed a little test for making a tree component with custom icons / bransch. However, i can only get my first branch to show custom icons.(links - document) I figure I need to make a nested loop to Iterate over nextSibling?. I t

  • Oracle Server to SQL SERVER

    Oracle Version 10.2.0.2(windows) I have configured connecting from Oracle Server to SQLSERVER Ping and ODBC connections are working fine But when I connect thru dblink I am getting TNS ORA-12154: TNS:could not resolve the connect identifier specified

  • Return to store from production quality

    hi, There is a problem , i have a senario suppose some raw material is left in production then we have to return to store , so the stores people check that material Inspection plan is already maintained with usages 5 and status 4 (inspection lot is g

  • Am I able to transfer files from DropBox?

    I'm new to Adobe and I can't figure out how to transfer my files from DropBox.