ViewObjectImpl createRowSetIterator not returning rows?

Hi, I hope somebody can help with the following question please?
I have the following code in one of my ViewObjectImpl classes:
public String findGender(String titleId) {
  RowSetIterator rsi = this.createRowSetIterator("myIterator");
  Key key = new Key(new Object[] {titleId});
  Row[] rows = rsi.findByKey(key, 1);
  Row row = rows[0];
  return row.getAttribute("Gender").toString();
}When testing this code in the Business Components Browser a row is successfuly returned. However when I run this same code under an ADF Faces application, the findByKey line fails to return any records.
What am I missing here? I'm guessing the Business Components Browser is intializing the View Object while ADF Faces isn't, but why, and how do I fix the issue, such the code will run successfully regardless?
Any help appreciated.
Regards,
Chris Muir
PS. JDev 10.1.3.1

Chris,
indeed, glad you are earning your keep with the rest of us now :O
Actually thinking of why it works in the tester and not in the faces app, is it possible that the rangeSize or batching of the VO is causing a partial search?
it does seem strange that it can't find it. The ADF BC guide says you can use vo.findByKey to use the default RSI.
You could use Ctrl-Minus and set a breakpoint in the findByKey method which i think is in the RowIterator class.
don't forget to close your Iterator when done.
Also, I assume your VO is based on an EO? If it is a read-only VO there is an extra step to get read-only VO's to use keys.
Brenden

Similar Messages

  • Select query does not return rows

    Hi all,
    The following query does not returning rows even though values are there in table.
    Kindly let me know why it is creating problem.
    thanks, P Prakash
    /* Formatted on 2011/05/11 16:44 (Formatter Plus v4.8.8) */
    SELECT pr.pa_rqst_sid, ptr.sbmtr_trnsctn_idntfr, ptr.athrztn_infrmtn,
    DECODE (ou.org_unit_name,
    'PA - MDCH', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    'PA - MPRO', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_2_PA'),
    'PA - DEFAULT', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    NULL
    ) AS intrchng_sndr_idntfr,
    ptr.intrchng_sndr_idntfr AS intrchng_rcvr_idntfr, ptr.usg_indctr,
    ptr.intrchng_sndr_idntfr AS applctn_rcvr_code,
    ptr.trnsctn_set_cntrl_nmbr AS trnsctn_set_cntrl_nmbr,
    ptr.athrztn_infrmtn_qlfr AS athrztn_infrmtn_qlfr,
    ptr.scrty_infrmtn_qlfr AS scrty_infrmtn_qlfr,
    ptr.scrty_infrmtn AS scrty_infrmtn,
    ptr.intrchng_sndr_idntfr_qlfr AS intrchng_sndr_idntfr_qlfr,
    ptr.intrchng_rcvr_idntfr_qlfr AS intrchng_rcvr_idntfr_qlfr,
    ptr.intrchng_cntrl_stndrds_idntfr AS intrchng_cntrl_stndrds_idntfr,
    ptr.intrchng_cntrl_vrsn_nmbr AS intrchng_cntrl_vrsn_nmbr,
    ptr.intrchng_cntrl_nmbr AS intrchng_cntrl_nmbr,
    ptr.acknwldgmnt_rqstd_indctr AS acknwldgmnt_rqstd_indctr,
    ptr.cmpnt_elmnt_sprtr AS cmpnt_elmnt_sprtr,
    ptr.fnctnl_idntfr_code AS fnctnl_idntfr_code,
    ptr.grp_cntrl_nmbr AS grp_cntrl_nmbr,
    ptr.rspnsbl_agncy_code AS rspnsbl_agncy_code,
    ptr.vrsn_rls_indstry_idntfr_code AS vrsn_rls_indstry_idntfr_code
    FROM pa_request pr, pa_transaction_request ptr, org_unit ou
    WHERE ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    AND pr.org_unit_sid = ou.org_unit_sid
    AND pr.oprtnl_flag = 'A'
    AND ptr.oprtnl_flag = 'A'
    AND ou.oprtnl_flag = 'A'
    AND pr.pa_mode_type_lkpcd = 'BT'
    AND (pr.status_cid = 86 OR pr.status_cid IN
    (20, 70, 30, 80, 25, 101, 96)
    AND pr.pa_rqst_sid = 75006271
    ORDER BY pr.pa_rqst_sid;
    the query is not giving result for this particular request sid.75006271 is present in table.

    833560 wrote:
    Hi all,
    The following query does not returning rows even though values are there in table.
    Kindly let me know why it is creating problem.
    thanks, P Prakash
    /* Formatted on 2011/05/11 16:44 (Formatter Plus v4.8.8) */
    SELECT pr.pa_rqst_sid, ptr.sbmtr_trnsctn_idntfr, ptr.athrztn_infrmtn,
    DECODE (ou.org_unit_name,
    'PA - MDCH', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    'PA - MPRO', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_2_PA'),
    'PA - DEFAULT', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    NULL
    ) AS intrchng_sndr_idntfr,
    ptr.intrchng_sndr_idntfr AS intrchng_rcvr_idntfr, ptr.usg_indctr,
    ptr.intrchng_sndr_idntfr AS applctn_rcvr_code,
    ptr.trnsctn_set_cntrl_nmbr AS trnsctn_set_cntrl_nmbr,
    ptr.athrztn_infrmtn_qlfr AS athrztn_infrmtn_qlfr,
    ptr.scrty_infrmtn_qlfr AS scrty_infrmtn_qlfr,
    ptr.scrty_infrmtn AS scrty_infrmtn,
    ptr.intrchng_sndr_idntfr_qlfr AS intrchng_sndr_idntfr_qlfr,
    ptr.intrchng_rcvr_idntfr_qlfr AS intrchng_rcvr_idntfr_qlfr,
    ptr.intrchng_cntrl_stndrds_idntfr AS intrchng_cntrl_stndrds_idntfr,
    ptr.intrchng_cntrl_vrsn_nmbr AS intrchng_cntrl_vrsn_nmbr,
    ptr.intrchng_cntrl_nmbr AS intrchng_cntrl_nmbr,
    ptr.acknwldgmnt_rqstd_indctr AS acknwldgmnt_rqstd_indctr,
    ptr.cmpnt_elmnt_sprtr AS cmpnt_elmnt_sprtr,
    ptr.fnctnl_idntfr_code AS fnctnl_idntfr_code,
    ptr.grp_cntrl_nmbr AS grp_cntrl_nmbr,
    ptr.rspnsbl_agncy_code AS rspnsbl_agncy_code,
    ptr.vrsn_rls_indstry_idntfr_code AS vrsn_rls_indstry_idntfr_code
    FROM pa_request pr, pa_transaction_request ptr, org_unit ou
    WHERE ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    AND pr.org_unit_sid = ou.org_unit_sid
    AND pr.oprtnl_flag = 'A'
    AND ptr.oprtnl_flag = 'A'
    AND ou.oprtnl_flag = 'A'
    AND pr.pa_mode_type_lkpcd = 'BT'
    AND (pr.status_cid = 86 OR pr.status_cid IN
    (20, 70, 30, 80, 25, 101, 96)
    AND pr.pa_rqst_sid = 75006271
    ORDER BY pr.pa_rqst_sid;
    Hi,
    Its very difficult to analyse the query without any data being provided. So I suggest you to debug the above query by keeping basic join condition intact and comment out all the other where conditions for initial run.
    FROM pa_request pr, pa_transaction_request ptr, org_unit ou
    WHERE ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    --AND pr.org_unit_sid = ou.org_unit_sid
    --AND pr.oprtnl_flag = 'A'
    --AND ptr.oprtnl_flag = 'A'
    --AND ou.oprtnl_flag = 'A'
    --AND pr.pa_mode_type_lkpcd = 'BT'
    --AND (pr.status_cid = 86 OR pr.status_cid IN
    (20, 70, 30, 80, 25, 101, 96)
    --AND pr.pa_rqst_sid = 75006271If if you have given join conditions proper and if data exists ,you can see set of rows displayed.
    Next step is to keep on uncommenting each of the where condition
    AND pr.oprtnl_flag = 'A'Like this you 'll come to the condition which does not match your requirement
    Hope this helps
    Regards,
    Achyut

  • Second level detail in master-detail via VL does not return rows

    Sorry, I did not want to repost the entire thread. Please see the last entry in the following thread for my urgent question.
    second level detail in master-detail-detail does not return rows
    "second level detail in master-detail-detail does not return rows"
    Thanks so much!
    Teri

    Ahhh ... that explains everything!
    You wrote:
    ListView1
    -> ListRowView2 (via ListRowFkLink1)
    -> ListValueView2 (via ListValueFkLink2)
    That's why I thought it's a master and two details.
    But it's more like:
    ListView1
        -> ListRowView2 (via ListRowFkLink1)
              -> ListValueView2 (via ListValueFkLink2)Is that correct?
    That's the explanation.
    A ViewLink is basically a RowSetIterator controlling a detail RowSet. When the iterator navigates, the detail RS is refreshed.
    When you create a hierarchy in the wizard, the controlling master iterator is always the default iterator! But you used a new iterator (listRowIter) to iterate over your first detail. The default iterator of that first detail didn't move, hence the RowSet of your second detail was not refreshed.
    When you navigate in the tester, the tester always uses the default iterator. That's why it worked there.
    Sascha

  • Query not returning rows (nvl)

    Hi all, I was wondering if anyone could help
    I have a query :
    select a, b, c, d, e from table_t
    where a=nvl(:para, a)
    and b=nvl(:parb,b)
    and c=nvl(:parc,c)
    the problem is is one the rows contain a null, then that row is not returned. I would like to return all rows along with the null values.
    for example:
    row 1 has b= null then row 1 is not displayed but only the rest of the rows where b is not null are displayed
    DB version 11.1.0.6.0 g
    All help will be appreciated.
    Kind regards,
    Cleopatra

    Hi, Cleo,
    Cleopatra wrote:
    Hi Frank ,
    thanks for the reply
    I get all the rows displayed now, but the filters do not seem to work for para, parb and parc.
    Any ideas how I could get that?Before moving on to other ideas, let's try the ideas I already mentioned:
    Frank Kulash wrote:
    ... post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data. Make sure the data shows special situations you care about, for example, if a is NULL, but :para is not NULL.
    Explain, using specific examples, how you get those results from that data.
    In problems like this, it often helps to know if there are impossible values for any of the columns. For example, if a is a DATE, it could be helpful to know if all dates stored in the table are after the year 1000, or, if b is a NUMBER, that it is always in the range -100 to +100.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}If the problem includes parameters (such as :para and :parb), then post a few sets of parameters and the results you want from the same sample data for each set.
    Simplify the problem if you can. For example, instead of comparing 3 columns to 3 paramaeters, could you illustrate the problem just as well with 2 columns and 2 parameters, or even 1 column and 1 parameter?

  • Sp_sproc_columns not returning row for "@RETURN_VALUE"

    Hello folks...
    I have published a CLR stored procedure to replace a "normally created" stored procedure.
    If I execute "sp_sproc_columns" for the CLR procedure, it does not return a row for "@RETURN_VALUE".
    If I execute "sp_sproc_columns" for any normally created stored procedures, there is a row for "@RETURN_VALUE".
    Code used:  exec sp_sproc_columns N'PROC_NAME_HERE',@ODBCVer=3
    For backwards compatibility issues, I need the "@RETURN_VALUE" row to be returned for all CLR Stored procedures.
    My CLR stored procedure executes no problem when manually run.  It looks like this:
    [Microsoft.SqlServer.Server.SqlProcedure]
     public static SqlInt32 proc_CreateNewFile(out String filename)
        return 0;
    I have tried changing the data type so INT is returned, but no luck either.
    SQL Server 2014 is the version being used.
    Thanks!

    And as a workaround you might call a TSQL wrapper proc instead of calling the CLR proc directly.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • I found out issue distinct clause in query ,refcursor not returning rows

    URGENT
    hi the following procedure returns records  but when i add  distinct clause to (open v_refcursor for select )
    i.e   open v_refcursor for select distinct column1,column2   .......... in the procedure the procedure is not returning records. please help what is the issue here?
    CREATE OR REPLACE procedure proc_shared_report3 (in_cust_id varchar2,in_user_array user_tab , in_acct_array acct_tab,in_report_pvlg_hier varchar2,in_fmt_pvlg_hier varchar2,v_refcursor OUT sys_refcursor)
    is
    BEGIN
    if  in_acct_array.count>0 and in_fmt_pvlg_hier is not null and in_cust_id is not null and in_user_array.count>0 and in_report_pvlg_hier is not null  then
    dbms_output.put_line('all are not null');
    *open v_refcursor for  select usr_id* from vw_get_user_profile where usr_id in (
            SELECT USR_ID FROM VW_GET_ACCOUNTS WHERE USR_ID IN (SELECT distinct up1.usr_id FROM vw_get_user_privileges up1,vw_get_user_privileges up2  WHERE 
            up1.usr_id=up2.usr_id and
            up1.product_hierarchy=in_report_pvlg_hier  and up2.PRODUCT_HIERARCHY=in_fmt_pvlg_hier AND up1.usr_id in (select usr_id from vw_get_user_for_customer where
            cust_id=in_cust_id)
            and up1.usr_id Member Of in_user_array) AND acct_nb Member of in_acct_array);
    /* if account list is null and rest all  not  null */
    elsif (in_acct_array is null or in_acct_array IS EMPTY or in_acct_array.count = 0) and in_fmt_pvlg_hier is not  null  and in_cust_id is not null and in_user_array.count>0 and in_report_pvlg_hier is not null  then
    dbms_output.put_line('acc is null and rest are not null');
    *open v_refcursor for select usr_id,usr_type_cd* from vw_get_user_profile where usr_id in(SELECT  distinct up1.usr_id FROM vw_get_user_privileges up1,vw_get_user_privileges up2  WHERE 
              up1.usr_id=up2.usr_id and
              up1.product_hierarchy=in_report_pvlg_hier and up2.PRODUCT_HIERARCHY=in_fmt_pvlg_hier AND   up1.usr_id in (select usr_id from vw_get_user_for_customer where
              cust_id=in_cust_id)
              and up1.usr_id Member Of in_user_array);
    /* if account list is null and format pvlg hierarchy is null */
    elsif  (in_acct_array is null or in_acct_array IS EMPTY or in_acct_array.count = 0) and in_fmt_pvlg_hier is null and in_cust_id is not null and in_user_array.count>0 and in_report_pvlg_hier is not null
    then
    dbms_output.put_line('acc is null and format is null null');
    *open v_refcursor for select usr_id,tmzon_cd* from vw_get_user_profile where usr_id in (
      (SELECT  distinct usr_id FROM vw_get_user_privileges  WHERE  product_hierarchy=in_report_pvlg_hier  AND   usr_id in (select usr_id from vw_get_user_for_customer where
       cust_id=in_cust_id)
       and usr_id Member Of in_user_array))  ;
    /* if account list is not null and format pvlg hierarchy is  null */
    else  -- If i get only one privilege and all other inputs then 
    dbms_output.put_line('acc list is not null and format pvlg is null');
    *open v_refcursor for select usr_id,prod_shrt_nm* from vw_get_user_profile where usr_id in (
         SELECT USR_ID FROM VW_GET_ACCOUNTS WHERE USR_ID IN (SELECT  distinct usr_id FROM vw_get_user_privileges  WHERE 
         product_hierarchy=in_report_pvlg_hier  AND   usr_id in (select usr_id from vw_get_user_for_customer where
         cust_id=in_cust_id) and usr_id Member Of in_user_array ) AND acct_nb Member of in_acct_array);
    END IF;
    END proc_shared_report3;
    /Edited by: raj_fresher on Aug 12, 2009 8:50 AM
    Edited by: raj_fresher on Aug 12, 2009 1:40 PM

    its like this ...... ?
    You have to understand that without any testdata/ a reproducable testcase, all I can do is asking you to test some alternatives, I'm just guessing things from what I can make of your example, and hope you'll repost back any differences in a clear and concisive way.
    What I didn't understand is why you're not just joining your tables/views instead of using inner queries.
    Unfortunatly you're not providing any feedback on that, on the other hand you've narrowed down your problem to a specific part of your query? But you're not sharing why/what makes you decide to take that turn.
    But: you're still using inner queries in your reply.
    So, sorry, I cannot proceed/say anything useful unless you answer my previous post.
    Because, there are still many other questions/doubts: I don't understand why you're not aliasing your columns properly, for example.
    I don't know why you've suddenly switched to VW_GET_USER_cust_sa?
    I don't know if you've tried the straight join instead of nesting queries?
    And if you did, what's the problem?
    Please read and understand this, so you'll get your answers by the speed of light the next time you've got a question or problem:
    http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html
    And don't refrain from using that tag ;)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • FindByAltKey not returning rows

    We have a EO in which alternatekey is defined,that has two attributes:ExternalKey1 and ExternalKey2.
    When we do
    RowIterator itr = rs.findByAltKey(altKeyName, key, 1, false);
    if(itr != null && itr.first() != null){
    r = itr.first();
    logFinest("row found using alt-key " + key);
    itr.first() is null even though there is a row existing in the db with the given externalkey1,externalkey2(alternate key attributes).Do we know the reason why this behavior is seen?
    Below is the complete code of the method:
    private Row findUsingKey(RowSet rs, AttributeDef[] keyattrs, AttributeList attrList, String altKeyName){
    Row r = null;
    if(keyattrs != null && keyattrs.length > 0){
    Object[] keyvals = new Objecthttp://keyattrs.length;
    for(int i=0; i<keyattrs.length; i++){
    AttributeDef keyattr = keyattrs;
    keyvals[i] = attrList.getAttribute(keyattr.getName());
    logFinest(keyattr.getName() + " : " + keyvals[i]);
    if(keyvals[i] == null) {
    //if we don't do this and pass a null key the framework still fires a qry and
    //will return some rows, it may not be the rows we are interested in
    //we will only find using key if all key values are specified.
    logFinest("not enough key values specified, skipping key for searching row");
    return null;
    Row r1[]=null;
    Key key = new Key(keyvals);
    if(altKeyName != null){
    try{
    logFinest("rs - alt-key whereclause = " + rs.getViewObject().getWhereClause());
    RowIterator itr = rs.findByAltKey(altKeyName, key, 1, false);
    if(itr != null && itr.first() != null){
    r = itr.first();
    logFinest("row found using alt-key " + key);
    else
    logFinest("row NOT found using alt-key" + key);
    }catch(Exception e){
    //sometime we get exception when searching by alternate key because of some adf bug
    //Basically for some reason, even the primary key is returned by getAltKeyNames() method
    //and if you call findByAltKey() with the primary key, it gives an exception
    //it's safe to ignore the exception, since we are anyway searching by pk
    //e.printStackTrace();
    logFinest(e.getMessage());
    }else{
    logFinest("\n-----\nrs - pri-key whereclause = " + rs.getViewObject().getWhereClause());
    Row[] rows = rs.findByKey(key, 1);
    if(rows !=null && rows.length > 0){
    r = rows[0];
    logFinest("\n-------\nrow found using pri-key " + key);
    }else
    logFinest("row NOT found using pri-key " + key);
    else{
    logFinest("invalid key");
    return r;

    findByAltKey takes a oracle.jbo.Key as input .It cant be an object.
    So we need to construct Key key=new Key(Object[]{attrList.getAttribute(keyattr.getName())) which I am doing if u see in the method code
    Edited by: 904149 on Aug 6, 2012 2:27 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Refcursor not returning rows when called from non SQL*Plus IDE or other

    Hi all,
    I have a very weird problem.
    We have recently performed a minor upgrade to our oracle database and are now using:
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for Linux: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    5 rows selected.We have a crystal report selecting data from a refcursor returned by a stored procedure.
    The stored procedure updates data when called as well as returning the refcursor in question.
    Observe the following test scenario executed in SQL*Plus:
    SQL> create table testtab (teststr varchar2(100));
    Table created.
    Elapsed: 00:00:00.00
    SQL> insert into testtab values ('X');
    1 row created.
    Elapsed: 00:00:00.00
    SQL> create or replace procedure testtabproc (p_listcur in out sys_refcursor)
      2  as
      3  begin
      4 
      5     open p_listcur for
      6        select *
      7          from testtab
      8         where teststr = 'X';
      9 
    10 
    11     update testtab
    12        set teststr = 'Y';
    13 
    14        commit;
    15 
    16  end;
    17  /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> declare
      2 
      3  v_list_cur sys_refcursor;
      4 
      5  type t_out_rec is record (teststr varchar2(100) );
      6 
      7 
      8 
      9  v_out_rec t_out_rec;
    10 
    11  v_rec_count   number := 0;
    12  v_count_limit number := 10000;
    13 
    14  begin
    15 
    16  dbms_output.put_line('about to call proc');
    17
    18  testtabproc(v_list_cur);
    19 
    20  dbms_output.put_line('about to fetch records');
    21 
    22  fetch v_list_cur into v_out_rec;
    23  while v_list_cur%found loop
    24     v_rec_count := v_rec_count + 1;
    25     if v_rec_count <= v_count_limit then
    26       dbms_output.put_line(v_out_rec.teststr);
    27     end if;
    28  fetch v_list_cur into v_out_rec;
    29  end loop;
    30  dbms_output.put_line('complete. selected '||v_rec_count||' records.');
    31 
    32 
    33  end;
    34  /
    about to call proc                                                                                                                 
    about to fetch records                                                                                                             
    X                                                                                                                                  
    complete. selected 1 records.                                                                                                      
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> select * from testtab;
    TESTSTR
    Y
    1 row selected.
    Elapsed: 00:00:00.00
    SQL> as you can see, the cursor returns data and the table is updated.
    now, our problem is with crystal and also when I use the same test case via another IDE like TOAD.
    No data is returned from the list but the table is still updated.
    We suspect that something is happening that is causing the table to be updated before the refcursor is opened, or at least before the predicates are applied.
    has anyone else encountered this problem before?

    Tubby wrote:
    WhiteHat wrote:
    nope - it works from sqlplus itermitantly (i.e. we always get the debug output but the cursor only sometimes fetches the rows).
    it is almost as if the commit is being executed before the cursor is opened.
    I still havn't been able to reproduce it except with the actual scenario that I am working with...Is the code you are dealing with exactly the same as the skeleton you've posted in your original post? Do you perhaps have a generic exception catcher in there somewhere (perhaps catching and hiding an ORA-01555) when the cursor is being fetched?
    Not that i expect it to make any difference, but i'm curious as to why you've declared your cursor as IN / OUT ?
    p_listcur in out sys_refcursor
    the code structure in the real example is almost identical to that test case I produced - the exception handler is only catering for no_data_found, all other errors should be raised as normal.
    edit: sorry I forgot to add - it's in/out because apparently that's what crystal reports needs in order to use the refcursor..... I'm not a crystal guy so I can't be any more specific than that sorry......
    Edited by: WhiteHat on Oct 11, 2010 9:34 AM

  • Outer Join not returning rows

    Hi,
    i have a view based on the following statement. I can't get the unmatched rows from table 'npe' to show up in the result.
    SELECT DISTINCT rctla.customer_trx_id, msi.segment1 item_number,
                    rcta.trx_date trx_date, rcta.bill_to_customer_id cust_id,
                    (rctla.quantity_invoiced) * NVL (msi.attribute13, 1) quantity,
                    ROUND ((rctla.unit_selling_price * rctla.quantity_invoiced),
                           0
                          ) net_sales,
                    ROUND ((cic.material_cost * rctla.quantity_invoiced),
                           0
                          ) product_cost,
                    ROUND ((npe.expense * rctla.quantity_invoiced), 0) expense,
                    ROUND (  (rctla.unit_selling_price * rctla.quantity_invoiced
                           - (  cic.material_cost * rctla.quantity_invoiced
                              + rctla.quantity_invoiced * npe.expense
                           0
                          ) gp_dollars
               FROM ra_customer_trx_all rcta,
                    ra_customer_trx_lines_all rctla,
                    cst_cost_types cct,
                    cst_item_costs cic,
                    mtl_system_items_b msi,
                    nfpc.nfpc_gpm_expense npe,
                    hz_cust_accounts hca
              WHERE rcta.complete_flag = 'Y'
                AND rcta.interface_header_attribute1 NOT LIKE '%B'
                AND rcta.interface_header_context = 'ORDER ENTRY'
                AND rcta.batch_source_id IN (1068, 1069)
                AND rcta.customer_trx_id = rctla.customer_trx_id
                AND rctla.inventory_item_id = msi.inventory_item_id
                AND UPPER (cct.cost_type) = 'FROZEN'
                AND cic.cost_type_id = cct.cost_type_id
                AND cic.inventory_item_id = msi.inventory_item_id
                AND npe.customer_no = hca.account_number
                AND hca.cust_account_id = rcta.bill_to_customer_id
                AND rcta.trx_date BETWEEN '01-FEB-10' AND '01-FEB-10'
                AND rctla.inventory_item_id = npe.inventory_item_id(+)
                AND rctla.customer_trx_id = '903670';I know there are two inventory_item_id rows that are not in the nfpc_gpm_expense table but are in the 'rctla' and 'msi' tables.
    I am on RDBMS 9i .
    Thanks in advance for your time.
    A/A

    Hi Asgar,
    check if this helps:
    SELECT DISTINCT rctla.customer_trx_id, msi.segment1 item_number,
                    rcta.trx_date trx_date, rcta.bill_to_customer_id cust_id,
                    (rctla.quantity_invoiced) * NVL (msi.attribute13, 1) quantity,
                    ROUND ((rctla.unit_selling_price * rctla.quantity_invoiced),
                           0
                          ) net_sales,
                    ROUND ((cic.material_cost * rctla.quantity_invoiced),
                           0
                          ) product_cost,
                    ROUND (( nvl(npe.expense,1 ) * rctla.quantity_invoiced), 0) expense,   --included NVL
                    ROUND (  (rctla.unit_selling_price * rctla.quantity_invoiced
                           - (  cic.material_cost * rctla.quantity_invoiced
                              + rctla.quantity_invoiced * nvl(npe.expense,1 )                        --included NVL
                           0
                          ) gp_dollars
               FROM ra_customer_trx_all rcta,
                    ra_customer_trx_lines_all rctla,
                    cst_cost_types cct,
                    cst_item_costs cic,
                    mtl_system_items_b msi,
                    ( select nge.expense, nge.inventory_item_id, rctla2.customer_trx_line_id
                      from nfpc.nfpc_gpm_expense nge,
                           hz_cust_accounts_all hcaa,
                           ra_customer_trx_all rcta2,
                           ra_customer_trx_lines_all rctla2
                      where nge.customer_no = hcaa.account_number
                      and   hcaa.cust_account_id = rcta2.bill_to_customer_id
                      and   rcta2.customer_trx_id = rctla2.customer_trx_id
                    ) npe,                                      --created inline view for npe
                    --nfpc.nfpc_gpm_expense npe,                --commented
                    hz_cust_accounts hca
              WHERE rcta.complete_flag = 'Y'
                AND rcta.interface_header_attribute1 NOT LIKE '%B'
                AND rcta.interface_header_context = 'ORDER ENTRY'
                AND rcta.batch_source_id IN (1068, 1069)
                AND rcta.customer_trx_id = rctla.customer_trx_id
                AND rctla.inventory_item_id = msi.inventory_item_id
                AND UPPER (cct.cost_type) = 'FROZEN'
                AND cic.cost_type_id = cct.cost_type_id
                AND cic.inventory_item_id = msi.inventory_item_id
                --AND npe.customer_no = hca.account_number        --commented
                AND hca.cust_account_id = rcta.bill_to_customer_id
                AND rcta.trx_date BETWEEN '01-FEB-10' AND '01-FEB-10'
                AND rctla.inventory_item_id = npe.inventory_item_id(+)
                AND rctla.customer_trx_line_id = npe.customer_trx_line_id(+)
                AND rctla.customer_trx_id = '903670';Regards
    Imran

  • Flashback Version Query Does Not Return Rows

    I followed the example given in the documentation; http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_flashback.htm#sthref1478
    but even I connect as sys versions BETWEEN query no rows returns, any comments will be welcomed.
    Thank you,
    Best regards.
    Tonguc
    Test scenerio;
    conn hr/hr
    -- drop table flashback_test purge ;
    create table flashback_test ( c1 number, c2 date ) ;
    insert into flashback_test values ( 1, sysdate ) ;
    commit ;
    update flashback_test set c1 = c1 * 2 ;
    commit ;
    update flashback_test set c1 = c1 * 2 ;
    commit ;
    delete flashback_test ;
    commit ;
    conn sys/passwd as sysdba
    SELECT versions_xid xid,
    versions_startscn start_scn,
    versions_endscn end_scn,
    versions_operation operation,
    c1,
    c2
    FROM hr.flashback_test versions BETWEEN TIMESTAMP minvalue AND maxvalue
    ORDER BY versions_starttime;
    SELECT xid, undo_sql
    FROM flashback_transaction_query
    where undo_sql like '%HR%FLASH%' ;
    The results;
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    Table dropped
    Table created
    1 row inserted
    Commit complete
    1 row updated
    Commit complete
    1 row updated
    Commit complete
    1 row deleted
    Commit complete
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as SYS
    XID START_SCN END_SCN OPERATION C1 C2
    XID UNDO_SQL
    07002A0003010000 update "HR"."FLASHBACK_TEST" set "C1" = '1' where ROWID = 'AAADiFAAEAAAAiXAAA';
    08000E0027010000 insert into "HR"."FLASHBACK_TEST"("C1","C2") values ('4',TO_DATE('04/01/2007', '
    0900080013010000 delete from "HR"."FLASHBACK_TEST" where ROWID = 'AAADiFAAEAAAAiXAAA';
    0A0006000A010000 update "HR"."FLASHBACK_TEST" set "C1" = '2' where ROWID = 'AAADiFAAEAAAAiXAAA';
    Also tried with Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 the same results..
    Message was edited by:
    TongucY

    Hi Tonguc
    I Think there is something wrong with your configuration. If you want i can share the parameter file with you.
    hr@XE> conn hr/hr
    Connected.
    hr@XE> -- drop table flashback_test purge ;
    hr@XE> create table flashback_test ( c1 number, c2 date ) ;
    Table created.
    hr@XE> insert into flashback_test values ( 1, sysdate ) ;
    1 row created.
    hr@XE> commit ;
    Commit complete.
    hr@XE>
    hr@XE> update flashback_test set c1 = c1 * 2 ;
    1 row updated.
    hr@XE> commit ;
    Commit complete.
    hr@XE>
    hr@XE> update flashback_test set c1 = c1 * 2 ;
    1 row updated.
    hr@XE> commit ;
    Commit complete.
    hr@XE>
    hr@XE> delete flashback_test ;
    1 row deleted.
    hr@XE> commit ;
    Commit complete.
    hr@XE> connect sys/password as sysdba
    Connected.
    sys@XE> SELECT versions_xid xid,
    2 versions_startscn start_scn,
    3 versions_endscn end_scn,
    4 versions_operation operation,
    5 c1,
    6 c2
    7 FROM hr.flashback_test versions BETWEEN TIMESTAMP minvalue AND maxvalue
    8 ORDER BY versions_starttime;
    XID START_SCN END_SCN O C1 C2
    07001F0055010000 1038838 D 4 13/03/2007
    02001D0069010000 1038835 1038838 U 4 13/03/2007
    04001F0039010000 1038832 1038835 U 2 13/03/2007
    1038832 1 13/03/2007
    sys@XE> SELECT xid, undo_sql
    2 FROM flashback_transaction_query
    3 where undo_sql like '%HR%FLASH%' ;
    XID
    UNDO_SQL
    02001D0069010000
    update "HR"."FLASHBACK_TEST" set "C1" = '2' where ROWID = 'AAADskAAEAAAAM2AAA';
    04001F0039010000
    update "HR"."FLASHBACK_TEST" set "C1" = '1' where ROWID = 'AAADskAAEAAAAM2AAA';
    07001F0055010000
    insert into "HR"."FLASHBACK_TEST"("C1","C2") values ('4',TO_DATE('13/03/2007', 'DD/MM/RRRR'));
    08002D0074010000
    delete from "HR"."FLASHBACK_TEST" where ROWID = 'AAADskAAEAAAAM2AAA';
    sys@XE> select version from v$instance;
    VERSION
    10.2.0.1.0
    sys@XE>
    init file
    xe.__db_cache_size=415236096
    xe.__java_pool_size=4194304
    xe.__large_pool_size=12582912
    xe.__shared_pool_size=155189248
    xe.__streams_pool_size=8388608
    *.audit_file_dest='C:\oraclexe\app\oracle\admin\XE\adump'
    *.background_dump_dest='C:\oraclexe\app\oracle\admin\XE\bdump'
    *.compatible='10.2.0.1'
    *.control_files='C:\oraclexe\oradata\XE\control.dbf'
    *.core_dump_dest='C:\oraclexe\app\oracle\admin\XE\cdump'
    *.cpu_count=2
    *.db_block_checking='FALSE'
    *.db_name='XE'
    *.DB_RECOVERY_FILE_DEST_SIZE=10G
    *.DB_RECOVERY_FILE_DEST='C:\oraclexe\app\oracle\flash_recovery_area'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=XEXDB)'
    *.job_queue_processes=4
    *.open_cursors=300
    *.os_authent_prefix=''
    *.pga_aggregate_target=335544320
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sessions=20
    *.sga_target=570M
    *.shared_servers=4
    *.undo_management='AUTO'
    *.undo_tablespace='UNDO'
    *.user_dump_dest='C:\oraclexe\app\oracle\admin\XE\udump'
    Message was edited by:
    coskan

  • Query not returning rows in 'result' tab due to invalid date field (bug?)

    It seems that in the results display, if there is a date field with out of bounds data then the query is stopped and only the results up to that record are displayed. When running the same query as a script, all of records are returned. The offending date in the table was '-10100-00-00 0-1:0-1:0-1.0'. Don't ask how it got there... I really have no idea.
    Has anyone else noticed this? Could it relate to the NLS format? Would it be possible to just display this value as null in the 'results' tab instead? Or wrap any invalid data as such and return nothing in the field but still show the record?

    Hello,
    It seems that you had resolved the issue which caused by premission.
    You can post the solution in a new reply and mark it as answer.
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here. 
    Fanny Liu
    TechNet Community Support

  • RowSetIterator not returning all the rows

    Hi,
    We have a use-case where we need to create a new row iterator to insert rows(values) in it. Immediately after insertRow(), we are reading the values by creating a secondary row set iterator (createRowSetIterator) but it is not returning all the inserted rows. Here is the code snippet:
    Code to insert rows:
    public void insertTerrLineOfBusiness(CreateOperation operation, TerritoryVORowImpl newTerritoryRow, TerritoryVORowImpl selectedRow){     
    if((operation.equals(CreateOperation.CREATE))
    || operation.equals(CreateOperation.COPY)
    || operation.equals(CreateOperation.ADD_EXISTING)){
    RowIterator selTerritoryLineOfBusinessIter = selectedRow.getTerritoryLineOfBusiness();
    //RowIterator newTerrLineOfBusinessIter = newTerritoryRow.getTerritoryLineOfBusiness();
    ViewRowSetImpl newTerrLineOfBusinessIter = (ViewRowSetImpl) newTerritoryRow.getTerritoryLineOfBusiness();
    newTerrLineOfBusinessIter.setAssociationConsistent(true);
    while(selTerritoryLineOfBusinessIter.hasNext()){
    TerritoryLineOfBusinessVORowImpl selTerrLineOfBusinessRow =
    (TerritoryLineOfBusinessVORowImpl)selTerritoryLineOfBusinessIter.next();
    TerritoryLineOfBusinessVORowImpl newTerrLineOfBusinessRow =
    (TerritoryLineOfBusinessVORowImpl)newTerrLineOfBusinessIter.createRow();
    newTerrLineOfBusinessRow.setTerritoryVersionId(newTerritoryRow.getTerritoryVersionId());
    newTerrLineOfBusinessRow.setLobCode(selTerrLineOfBusinessRow.getLobCode());
    newTerrLineOfBusinessIter.insertRow(newTerrLineOfBusinessRow);
    Code to read:
    public List getTerritoryLobsValues() {
    List <String> lobsValues = new ArrayList<String>();
    if (this.getTerritory().getCurrentRow() != null) {
    TerritoryVORowImpl territoryVORowImpl =
    (TerritoryVORowImpl)this.getTerritory().getCurrentRow();
    if(territoryVORowImpl.getTerritoryLineOfBusiness() != null){
    ViewRowSetImpl territoryLob =
    (ViewRowSetImpl)territoryVORowImpl.getTerritoryLineOfBusiness();
    RowSetIterator itr = territoryLob.createRowSetIterator(null);
    if(itr!=null){
    while(itr.hasNext()) {
    Row r = itr.next();
    String lobCode = (String)r.getAttribute("LobCode");
    lobsValues.add(lobCode);
    itr.closeRowSetIterator();
    return lobsValues;
    Can anybody suggest what could be the issue? How to fix it?
    Thanks,
    Akhila

    Thanks for your response.
    Jdev version:
    Primary == FUSIONAPPS_PT.V1REL6INT_LINUX.X64_120719.0800 (Primary Product for the view)
    Primary depends on FMWTOOLS == FMWTOOLS_11.1.1.6.0_GENERIC_120112.0037.2
    FMWTOOLS depends on label == JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1
    The above label originated from base label == JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192
    Use case: We have a tree table, each record may or may not have Line of Business(LOB) associated with it. On creating a child node in the tree table, the child node copies all the attributes of parent. These attributes are not committed explicitly, if user wants to save the child node only then the attributes are committed.
    Giving secondary rowSetIterator a name did not help in resolving this issue.
    If I am calling postChanges() before reading from secondary row iterator then its returning all the inserted values. But this.getTransaction().postChanges() is a JAudit violation, so cannot use it:
    RuleId: apps-jbo-category.File.AdfModel.54
    Rule: insertTerrLineOfBusiness - Review DBTransaction.postChanges call to ensure passivation-safety
    Any pointers on this?

  • How to Create a record if vo.executequery does not return any rows

    I would like to update a single record on adf form. However if the record does not exist would like to create a row and save it in the table.
    The user does not want to add a "create" button on the screen. Hence would need to add the create code if vo.execute does not return any rows...
    How to add this and where to add?

    you can have a TF router for for exists and does not exist and based on that execute transient VO and other VO.
    Add a method call activity like below to create a row in transient VO
    public Row createRow()
    ViewObjectImpl tVO = (ViewObjectImpl)getTVO();
    tVO.executeEmptyRowSet();
    Row newRow = tVO.createRow();
    tVO.setCurrentRow(newRow);
    tVO.insertRow(newRow);
    return newRow;
    }

  • ExecuteWithParams is not returning the rows from cache

    Hi,
    We have two VO's based on same entity ,whenever new row is inserted in one VO and we do executeWithParams on another VO ,It is not returning the rows which are uncommitted.
    I replaced the executeWithParams with a custom method in AM in which I am executing the query after applying the view criteria and setting query mode.Its returning rows which are uncommitted.
    Jdev Version which I am using is 11.1.1.7.0
    ExecuteWithParams used to work with uncommitted data in 11.1.1.6.0 .
    Do we need to raise a bug on framework or Am I missing something?
    Edited by: sharavnkumar_malla on Oct 18, 2012 1:02 AM

    Still the same answer, even after you updated the question. We (the public) don't have 11.1.1.7, know nothing about 11.1.1.7, and cannot help you with 11.1.1.7. Questions about internal builds belong on internal forums.

  • Query not returning any rows?

    hi experts,
    My query running long but not returning any result. i have data , no locks on the tables.
    i have bigger ( hardware ) database on different server , where I can get results with same query.
    Can you tell me what are the DB settings i have to look at to resolve this issue?
    ( any sql query that can monitor these parameters ?)
    (the tabels involved in this query has 33milliions, 2millions, 7 milllions )
    Thanks ..
    Edited by: 642877 on Sep 21, 2011 6:46 PM

    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE     11.2.0.2.0     Production"
    TNS for Solaris: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    ==========================================================
    Plan hash value: 3185710999
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 3 | 423 | 24592 (2)| 00:05:45 | | |
    | 1 | HASH GROUP BY | | 3 | 423 | 24592 (2)| 00:05:45 | | |
    | 2 | NESTED LOOPS | | | | | | | |
    | 3 | NESTED LOOPS | | 3 | 423 | 24591 (2)| 00:05:45 | | |
    | 4 | NESTED LOOPS | | 3 | 345 | 24585 (2)| 00:05:45 | | |
    | 5 | NESTED LOOPS | | 1 | 84 | 21916 (2)| 00:05:07 | | |
    | 6 | NESTED LOOPS | | 1 | 67 | 21915 (2)| 00:05:07 | | |
    | 7 | PARTITION LIST ALL | | 2 | 60 | 21913 (2)| 00:05:07 | 1 | 11 |
    |* 8 | TABLE ACCESS FULL | ART_CRDT_ACCT_FACT | 2 | 60 | 21913 (2)| 00:05:07 | 1 | 11 |
    |* 9 | TABLE ACCESS BY INDEX ROWID| ART_PRTFOL_GRP_DIM | 1 | 37 | 1 (0)| 00:00:01 | | |
    |* 10 | INDEX UNIQUE SCAN | ART_PRTFOL_GRP_DIM_INDEX1 | 1 | | 0 (0)| 00:00:01 | | |
    | 11 | TABLE ACCESS BY INDEX ROWID | W_MONTH_D | 1 | 17 | 1 (0)| 00:00:01 | | |
    |* 12 | INDEX UNIQUE SCAN | UQ_W_MONTH_D | 1 | | 0 (0)| 00:00:01 | | |
    | 13 | PARTITION LIST ITERATOR | | 3 | 93 | 2669 (2)| 00:00:38 | KEY | KEY |
    |* 14 | TABLE ACCESS FULL | ACCT_CLTRL_RLTNP | 3 | 93 | 2669 (2)| 00:00:38 | KEY | KEY |
    |* 15 | INDEX UNIQUE SCAN | UQ_ART_CLTRL_DIM | 1 | | 1 (0)| 00:00:01 | | |
    | 16 | TABLE ACCESS BY INDEX ROWID | CLTRL_DIM | 1 | 26 | 2 (0)| 00:00:01 | | |
    -------------------------------------------------------------------------------------------------------------------------------

Maybe you are looking for

  • Async to sych Bridge

    Hi all, as i know it is possible to couple Synch to Async via Sync-Async Bridge. But what about the other way around, e.g. couple async to sync via ccBPM? What we want to try is to send a async message via a jms-Adapter. This message will request an

  • Some keys as ENTER, SPACE and BACKSPACE type characters

    Some keys as ENTER, SPACE and BACKSPACE are not working properly in my HP Pavilion dm4 1055br. When pressing one of these keys type two or three characters ( ): ENTER (lçj), SPACE (.;M), BACKSPACE (~h). This latter at the same time turn off the F11 k

  • Background Cover Flow Ipod Classic 80G

    Hello, I've got a question about de background of the Cover Flow on my Black Ipod Classic 80 G. Now i see the covers on a white background. On promotion stuff of Apple is see a black backround and that's much better Does anyone know if I can change t

  • User profiles disappearing

    This is a problem we are experiencing with OS 10.6.8 on an X Serve with client iMacs. I have some users that have been on our system for 4 months, in which time they've built up work only to find it missing since our return from the Christmas break.

  • G550 Alps touchpad New driver 7.7.1602.501

    Hi All, This topic is based on the G550 alps touchpad topic that has been discussed for some times. If you would like to know more, please check it out here, the topic created by digitaleagle. I created this new topic for the previous thread was too