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?

Similar Messages

  • ALV not showing all the rows! Please help!

    Hi Experts,
         I have webdynpro ALV report and I am using SALV_WD_TABLE as the reusable component. In component controller's WDDOINIT I have written the code for pulling teh data from R/3 table and binding it to ALV table.
    In the view's WDDOMODIFYVIEW event I have written the following code to get subtotal and grand total of Qty column based on product column.
          I have coded like this:
          lr_field_settings ?= l_value.
    lr_field = lr_field_settings->get_field( 'PRODUCT' ).
    lr_field->if_salv_wd_sort~set_group_aggregation_allowed( ABAP_TRUE ).
    lr_field->if_salv_wd_sort~create_sort_rule( ).
    l_sortrule = lr_field->if_salv_wd_sort~GET_SORT_RULE(  ).
    l_sortrule->set_sort_order( if_salv_wd_c_sort=>sort_order_ascending ).
    l_sortrule->set_group_aggregation( ABAP_TRUE ).
    *...Aggregate Field PRODUCT
    lr_field = lr_field_settings->get_field( 'QTY' ).
    lr_field->if_salv_wd_aggr~create_aggr_rule( ).
    lr_aggr_rule = lr_field->if_salv_wd_aggr~get_aggr_rule(  ).
    lr_aggr_rule->set_aggregation_type( if_salv_wd_c_aggregation=>aggrtype_total ).
    It is working now but my ALV table is not showing all the rows. I have 6 products and it is showing from product 2. But it is calculating grand total and subtotal correctly. I am not able to see the first product row and subtotal for that. Even if I click on the ^ icon in the ALV table below it is not showing all the rows.
    What could be the problem?
    Please help
    Thanks
    Gopal

    did you somehow manage to set the "first visible row" property on table object
    to 2.   Only thing I can think of that could cause this effect.
    Cheers
    Phil

  • InfoPath form load rule is not checking all the rows in form library

    Hi,
    Requirement:
    We have a form library named "HR Annual Review". In the InfoPath form we have two buttons "Save" and "Submit". User is allowed to Save multiple times and only once using Submit button. The file name of form library "HR
    Annual Review" will be stored in the format “<username>+<mm>+<dd>+<yy>.xml”. Say for example, an user named Mike Walt submitted a form then the file name will be as “MikeWalt012314.xml”. If the same user (Mike Walt)
    submits the form and tries to open the form for subsequent edit, then we need to show a view which has an error info saying “The Appraisal is already submitted for the current appraisal cycle”.
    Solution we tried:
    To achieve the above requirement, we tried using InfoPath Form Load and add a rule to check whether the combination of current user name and the year already exists in the filename column of the form library. But the rule we applied is not checking all the
    rows in the form library. The rule is always checking the first row of the form library.
    What we need:
    We need the validation using InfoPath rule or some other way/solution to check whether the combination of current login username and current year file already exists in the form library.
    Thanks in advance.
    Srivignesh J

    Hi Srivignesh,
    Submit button Uses the Main Data connection to submit the data to the list. This is what you are using and naming the file in the format. You can create secondary data submit that will update the exiting item in the list. With this, you don't have to create
    any rules to check all the rows which is also not possible in OOB InfoPath.
    Once you have the two data connection, hide the toolbar from the form and display these two on the button. For The Submit button, apply the rule to hide the button if created by is not empty. For Save button, apply the rule to hide the button if Created
    By is empty. This way, when a new form is created, you will see the Submit button, and when the user have to update the form, they will see Save button. Hope it help.s
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

  • Is there a way to BULK COLLECT with FOR UPDATE and not lock ALL the rows?

    Currently, we fetch a cursor on a few million rows using BULK COLLECT.
    In a FORALL loop, we update the rows.
    What is happening now, is that we run this procedure at the same time, and there is another session running a MERGE statement on the same table, and a DEADLOCK is created between them.
    I'd like to add to the cursor the FOR UPDATE clause, but from what i've read,
    it seems that this will cause ALL the rows in the cursor to become locked.
    This is a problem, as the other session is running MERGE statements on the table every few seconds, and I don't want it to fail with ORA-0054 (resource busy).
    What I would like to know is if there is a way, that only the rows in the
    current bulk will be locked, and all the other rows will be free for updates.
    To reproduce this problem:
    1. Create test table:
    create table TEST_TAB
    ID1 VARCHAR2(20),
    ID2 VARCHAR2(30),
    LAST_MODIFIED DATE
    2. Add rows to test table:
    insert into TEST_TAB (ID1, ID2, LAST_MODIFIED)
    values ('416208000770698', '336015000385349', to_date('15-11-2009 07:14:56', 'dd-mm-yyyy hh24:mi:ss'));
    insert into TEST_TAB (ID1, ID2, LAST_MODIFIED)
    values ('208104922058401', '336015000385349', to_date('15-11-2009 07:11:15', 'dd-mm-yyyy hh24:mi:ss'));
    insert into TEST_TAB (ID1, ID2, LAST_MODIFIED)
    values ('208104000385349', '336015000385349', to_date('15-11-2009 07:15:13', 'dd-mm-yyyy hh24:mi:ss'));
    3. Create test procedure:
    CREATE OR REPLACE PROCEDURE TEST_PROC IS
    TYPE id1_typ is table of TEST_TAB.ID1%TYPE;
    TYPE id2_typ is table of TEST_TAB.ID2%TYPE;
    id1_arr id1_typ;
    id2_arr id2_typ;
    CURSOR My_Crs IS
    SELECT ID1, ID2
    FROM TEST_TAB
    WHERE ID2 = '336015000385349'
    FOR UPDATE;
    BEGIN
    OPEN My_Crs;
    LOOP
    FETCH My_Crs bulk collect
    INTO id1_arr, id2_arr LIMIT 1;
    Forall i in 1 .. id1_arr.COUNT
    UPDATE TEST_TAB
    SET LAST_MODIFIED = SYSDATE
    where ID2 = id2_arr(i)
    and ID1 = id1_arr(i);
    dbms_lock.sleep(15);
    EXIT WHEN My_Crs%NOTFOUND;
    END LOOP;
    CLOSE My_Crs;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20000,
    'Test Update ' || SQLCODE || ' ' || SQLERRM);
    END TEST_PROC;
    4. Create another procedure to check if table rows are locked:
    create or replace procedure check_record_locked(p_id in TEST_TAB.ID1%type) is
    cursor c is
    select 'dummy'
    from TEST_TAB
    WHERE ID2 = '336015000385349'
    and ID1 = p_id
    for update nowait;
    e_resource_busy exception;
    pragma exception_init(e_resource_busy, -54);
    begin
    open c;
    close c;
    dbms_output.put_line('Record ' || to_char(p_id) || ' is not locked.');
    rollback;
    exception
    when e_resource_busy then
    dbms_output.put_line('Record ' || to_char(p_id) || ' is locked.');
    end check_record_locked;
    5. in one session, run the procedure TEST_PROC.
    6. While it's running, in another session, run this block:
    begin
    check_record_locked('208104922058401');
    check_record_locked('416208000770698');
    check_record_locked('208104000385349');
    end;
    7. you will see that all records are identified as locked.
    Is there a way that only 1 row will be locked, and the other 2 will be unlocked?
    Thanks,
    Yoni.

    I don't have database access on weekends (look at it as a template)
    suppose you
    create table help_iot
    (bucket number,
    id1    varchar2(20),
    constraint help_iot_pk primary key (bucket,id1)
    organization index;not very sure about the create table syntax above.
    declare
      maximal_bucket number := 10000; -- will update few hundred rows at a time if you must update few million rows
      the_sysdate date := sysdate;
    begin
      truncate table help_iot;
      insert into help_iot
      select ntile(maximal_bucket) over (order by id1) bucket,id1
        from test_tab
       where id2 = '336015000385349';
      for i in 1 .. maximal_bucket
      loop
        select id1,id2,last_modified
          from test_tab
         where id2 = '336015000385349'
           and id1 in (select id1
                         from help_iot
                        where bucket = i
           for update of last_modified;
        update test_tab
           set last_modified = the_sysdate
         where id2 = '336015000385349'
           and id1 in (select id1
                         from help_iot
                        where bucket = i
        commit;
        dbms_lock.sleep(15);
      end loop;
    end;Regards
    Etbin
    introduced the_sysdate if last_modified must be the same for all updated rows
    Edited by: Etbin on 29.11.2009 16:48

  • Sharepoint List of action plan not load all the rows,

    hello
    we are using sharepoint 2010 , we are facing problem in loading list_of_action_plan that not load all the raws (data)in datasheet view, but in standard view its loads all the data,
    can some one helps in this problem
    We have one separate virtual machine  SQL server 2005 for sharepoint server.  also we check that SQL server instance use more CPU usages.

    Hi,
    According to your post, my understanding is that one of your custom columns could not be copied using the copy list item action.
    I had created a custom field using the URL type, then add the column into the list.
    Using the SharePoint Designer to create a custom workflow with the copy list item action.
    The workflow worked without any issue, it can copy the custom URL type field.
    Did the issue occur in other list? You can create a new list, add the custom field to the list, then just using the copy list item to check whether it works.
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Database adapter not returning all the records

    I've taken over a BPEL from a developer who left the organization and have been having an issue during our User Acceptance Testing. We are querying a table that will return the insurance enrollment information for employee's and their dependants. When an employee change plans, or adds people, the old plan is terminated and a new once is created. When this happens there will be two records on the database to show the old plan and the new plan.
    When we run the SQL thru JDEV or SQLDeveloper, the data comes out fine. When we run it through a BPEL Database Adapter we are only getting one of the rows returned.
    I have created a small tester BPEL that is easily modified and deployed to run the same query to try multiple configurations changes within the DBAdapter. What I have found is all the records are returned when the "Return single result set" box on the DBAdapter Wizard is unchecked. When it's checked then it only returns one record for the employees with an old and a new plan.
    Can someone explain what the "Return single result set" option does, and what the impact will be if it's unchecked?

    Hello,
    In same way i am using two parent-child(header-line) tables. they have one to many relationship.
    I want to generate XML which contains multiple line items under a child elements for header elements.
    I have tried it but i am getting only one line under that child item. i am using jdev10.0.3.3.0
    can u help me please.
    -regards
    satyendra

  • Report not displaying all the rows

    Hi Experts,
    We are having a report which when ran for a year as a filter criteria gives me 6725 rows and i also observe that there are more rows which are not getting displayed. Is there any restriction with the no of rows getting displayed. I am also able to find the specific information of a particular vendor when i explicitly filter it. Which would otherwise not get displayed in the normal report execution for the entire year. Thanks
    Warm Regards,
    Akilesh

    Hello Akilesh,
             This is the issue with your Bex Analyzer...! please update ur Bex with all the latest patches. I am sure this report sould be running on other mechines...
    I will try to find the concern patch in t he mean while..!
                   EnjoySAP

  • Rowtype not fetching all the rows

    This my cursor declaration. When the Package is executed it get all records minus 1 (Assumming there are 10 rows to be processed, it ONLY processes 9 records)
    cursor X1 is
    select *
    from NT
    hdr X1%rowtype;
    Below is the procedure call
         open X1;
         fetch X1 into hdr;
         loop
         exit when X1%notfound;
                   fetch X1 into hdr;
                   pkgXX.insrt(hdr);
         end loop;
              commit;
         close X1;

    That makes sense. You 1) fetch a row, 2) check for %notfound, 3) fetch a row and process it. Notice that the row you fetched in 1 was never processed. Try this:
    open X1;
    loop
      fetch X1 into hdr;
      exit when X1%notfound;
      pkgXX.insrt(hdr);
    end loop;
    commit;
    close X1;

  • Entity based VO not showing all the rows

    Hi, I am having a entity based VO in a page. When we run a page from Jdeveloper the table shows all 1300 rows. But in Front end it shows onli 1001 rows

    Hi ,
    Or instead of setMaxFetchsize see By Johny  explain setAttribute in OAF?
    if it is helpful to you..

  • Instr not returning all the occurance

    hi i used this to get the space occurance.
    SQL> select instr('hi madam bye madam',' ',1) from dual;
    INSTR('HIMADAMBYEMADAM','',1)
    3
    there is a space in 3,9,13 th position but the above query gives 0nly 3.so how to get all the space occurance.

    You need to pass an additional parameter to get the Nth occurrence of a value.
      1* select instr('hi madam bye madam',' ',1,1) from dual
    SCOTT @ nx102 JCAVE9420> /
    INSTR('HIMADAMBYEMADAM','',1,1)
                                  3
    Elapsed: 00:00:00.00
    SCOTT @ nx102 JCAVE9420> ed
    Wrote file afiedt.buf
      1* select instr('hi madam bye madam',' ',1,2) from dual
    SCOTT @ nx102 JCAVE9420> /
    INSTR('HIMADAMBYEMADAM','',1,2)
                                  9
    Elapsed: 00:00:00.00
    SCOTT @ nx102 JCAVE9420> ed
    Wrote file afiedt.buf
      1* select instr('hi madam bye madam',' ',1,3) from dual
    SCOTT @ nx102 JCAVE9420> /
    INSTR('HIMADAMBYEMADAM','',1,3)
                                 13
    Elapsed: 00:00:00.01
    SCOTT @ nx102 JCAVE9420> ed
    Wrote file afiedt.buf
      1* select instr('hi madam bye madam',' ',1,4) from dual
    SCOTT @ nx102 JCAVE9420> /
    INSTR('HIMADAMBYEMADAM','',1,4)
                                  0
    Elapsed: 00:00:00.01Justin

  • Discover Plus - Export to Text Tab delimited is not exporting all the rows

    Hi gurus,
    I am trying to export a large data report which has 1 million plus rows to text tab delimited. The export takes 9 plus hours to export and the data is not more than 100000.
    My question is
    1. How can I make the discoverer to export it quicker or rather faster to tab delimited.
    2. Where can I change the number of rows to be exported.
    Any help, suggestions is appreciated.
    Thanks,
    SAI

    Hi Rod,
    Yes. The text tab delimited export is taking lot of time. The total rows for this report are nearly 1 million. If I break down the report with condition and export it I was able to export it ( three files exported with 212000, 103000 and 687000 rows respectively).
    But I m still having problems exporting it in one shot. Is there any way I could resolve this? Please let me know.
    Thanks,
    SAI

  • Multiple selection in table not returning all selected rows

    I am unable to obtain multiple selected rows from a table. I only get a single row no matter how many I select.
    I have the following table
    <af:table value="#{bindings.TargetSelectorTargets1.collectionModel}"
    var="row"
    rows="#{bindings.TargetSelectorTargets1.rangeSize}"
    emptyText="#{bindings.TargetSelectorTargets1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.TargetSelectorTargets1.rangeSize}"
    rowBandingInterval="0"
    filterModel="#{bindings.ImplicitViewCriteriaQuery2.quickQueryDescriptor}"
    queryListener="#{bindings.ImplicitViewCriteriaQuery2.processQuery}"
    filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.TargetSelectorTargets1.collectionModel.selectedRow}"
    selectionListener="#{bindings.TargetSelectorTargets1.collectionModel.makeCurrent}"
    rowSelection="multiple"
    partialTriggers="::qryId1" id="t3"
    styleClass="AFStretchWidth"
    binding="#{testbean.targetselectortable}">
    <af:column sortProperty="Name" filterable="true"
    sortable="true"
    headerText="#{bindings.TargetSelectorTargets1.hints.Name.label}"
    id="c2">
    <af:outputText value="#{row.Name}" id="ot33"/>
    </af:column>
    <af:column sortProperty="Type" filterable="true"
    sortable="true"
    headerText="#{bindings.TargetSelectorTargets1.hints.Type.label}"
    id="c11">
    <af:outputText value="#{row.Type}" id="ot34"/>
    </af:column>
    </af:table>
    and I have the following bean method to get the selected rows
    RowKeySet rks = targetselectortable.getSelectedRowKeys();
    Iterator itr = rks.iterator();
    Object key;
    while(itr.hasNext())
    key = (Object)itr.next(); targetselectortable.setRowKey(key);
    Object o = targetselectortable.getRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding) o;
    Row row = rowData.getRow();
    System.out.println(row.getAttribute("Name").toString());
    and I only get one row.
    Note: selectedRowKeys="#{bindings.TargetSelectorTargets1.collectionModel.selectedRow}"
    shows a warning that "reference selectedRow" not found.
    Can I do something to make it work?

    can u change the logic like
    RowKeySet rowSet = targetselectortable.getSelectedRowKeys();
    Iterator rowSetIter = rowSet.iterator();
    > while (rowSetIter.hasNext()) {
    > List l = (List)rowSetIter.next();
    > Key key = (Key)l.get(0);
    >
    FacesContext fc = FacesContext.getCurrentInstance();> BindingContainer bindings =
    > (BindingContainer)fc.getApplication().evaluateExpressionGet(fc,
    > "#{bindings}",
    > BindingContainer.class);
    >
    DCBindingContainer bindings = (DCBindingContainer)bindings ;> DCIteratorBinding iter =
    > bindings.findIteratorBinding("TargetSelectorTargets1Iterator");
    >
    > iter.setCurrentRowWithKey(key.toStringFormat(true));
    > Row r = iter.getCurrentRow();
    > System.out.println(row.getAttribute("Name").toString());
    > }

  • Loop Not Returning All Rows

    I finally need to turn to the forum after trying for a few days to resolve my problem I decide to turn to the Oracle people for help.
    The following code below does two things:
    1. If I have the get_menu_label in side of it's own loop it never returns
    2. If I take the get_menu_label out side of it's own loop it returns but does not return all the data.
    DECLARE
    -- GETTING THE DATABASE NAME
    CURSOR get_db_name
    IS
    SELECT DATABASE
    FROM uaf_mfgp_menus_and_groups_vm
    GROUP BY DATABASE
    ORDER BY DATABASE ASC;
    -- GETTING THE OBJECT_ID FOR EACH DATABASE
    CURSOR get_object_id_db (l_db_name VARCHAR2)
    IS
    SELECT object_id
    FROM UAF_FORM_OBJECTS
    WHERE object_label_2 = l_db_name;
    -- GETTING THE GROUP NAME
    CURSOR get_gp_name
    IS
    SELECT group_name
    FROM uaf_mfgp_menus_and_groups_vm
    GROUP BY group_name
    ORDER BY group_name ASC;
    -- GETTING THE OBJECT_ID FOR GROUP WITH GP NAME AND DATABASE
    CURSOR get_object_id_gp (l_gp_name VARCHAR2, db_id NUMBER)
    IS
    SELECT object_id
    FROM UAF_FORM_OBJECTS
    WHERE object_label_2 = l_gp_name AND parent_object_id = db_id;
    -- GETTING MENU LABEL
    CURSOR get_menu_label (l_db_name VARCHAR2, l_gp_name VARCHAR2)
    IS
    SELECT menu_label
    FROM uaf_mfgp_menus_and_groups_vm
    WHERE DATABASE = l_db_name AND group_name = l_gp_name;
    got_object_id_db NUMBER (20);
    got_object_id_gp NUMBER (20);
    got_db VARCHAR2 (100);
    got_menu_label VARCHAR2 (200);
    BEGIN
    FOR c1 IN get_db_name
    LOOP
    FOR c2 IN get_gp_name
    LOOP
    OPEN get_object_id_db (c1.DATABASE);
    FETCH get_object_id_db
    INTO got_object_id_db;
    OPEN get_object_id_gp (c2.group_name, got_object_id_db);
    FETCH get_object_id_gp
    INTO got_object_id_gp;
              CLOSE get_object_id_db;
    CLOSE get_object_id_gp;
    OPEN get_menu_label (c1.DATABASE, c2.group_name);
    LOOP
    FETCH get_menu_label
    INTO got_menu_label;
    END LOOP;
    CLOSE get_menu_label;
    DBMS_OUTPUT.put_line ( 'GP_OBJECT_ID= '
    || got_object_id_gp
    || ' '
    || 'MENU_LABEL= '
    || got_menu_label
    END LOOP;
    END LOOP;
    END;
    /

    Javier, this the wrong way to use PL/SQL. Oracle SQL can do all this for you using JOINs.
    This code, even if it did work, would be terrible slow - unable to scale with data volumes.
    This code breaks a few fundamental Oracle rules:
    - row-by-row processing using PL/SQL
    - huge number of context swicthes per PL/SQL loop iteration
    - not maximizing SQL and minimizing PL/SQL
    I suggest you trash this code and write a SQL JOIN instead.

  • Business Objects is not returning all rows from Query

    We set the rowcount to 1000000 and the business objects query only returns 16,960 rows.  We then uncheck the limit for the rowcount and the first run of the query returns 65,535.  The subsequent run of the query returns all the rows which is greater than 65,535.  We are on release 6.1A of business objects and selecting from Microsoft SQLServer 2005 in 2000 compatablility mode. We noticed that the rowcount being sent to SQLServer is replacing the set number with the 65,535 the first time the query is sent and subsiquent queries have the correct rowcount set.  What would be causing the rowcount to be reset and how can it be fixed?

    We set the rowcount to 1000000 and the business objects query only returns 16,960 rows.  We then uncheck the limit for the rowcount and the first run of the query returns 65,535.  The subsequent run of the query returns all the rows which is greater than 65,535.  We are on release 6.1A of business objects and selecting from Microsoft SQLServer 2005 in 2000 compatablility mode. We noticed that the rowcount being sent to SQLServer is replacing the set number with the 65,535 the first time the query is sent and subsiquent queries have the correct rowcount set.  What would be causing the rowcount to be reset and how can it be fixed?

  • Contains return all the records when the query string matches the columns

    I used the multi_column_datastore preference and created an index on three columns (item_name, description,owner_part_number). Now if I do a search:
    select * from items where contains(description, 'description') > 0;It returns all the rows in items table, but not all the rows have "description" as a word. I guess Oracle text assumes the query intends to get all the rows as the query string matches one of the column names. My question is whether Oracle Text has any preference settings to alter this behavior?
    execute ctx_ddl.create_preference('item_multi_preference', 'MULTI_COLUMN_DATASTORE');
    execute ctx_ddl.set_attribute('item_multi_preference', 'columns', 'item_name, description,owner_part_number');
    create index item_text_index on items(description) indextype is ctxsys.context filter by owner parameters('LEXER ENG_LEXER WORDLIST ENG_WORDLIST STOPLIST CTXSYS.EMPTY_STOPLIST datastore item_multi_preference MEMORY 1024M');Thanks.
    Jun Gao

    It looks like a basic_section_group fixes the problem as well, as demonstrated below and I believe a basic_section_group may be more efficient than auto_section_group.
    SCOTT@orcl_11gR2> -- recreation of problem:
    SCOTT@orcl_11gR2> drop table items
      2  /
    Table dropped.
    SCOTT@orcl_11gR2> create table items (
      2       "ITEM_NAME"             varchar2(100 byte),
      3        "ITEM_NUMBER"              varchar2(100 byte),
      4        "DESCRIPTION"              varchar2(4000 byte),
      5        "OWNER" number
      6  )
      7  /
    Table created.
    SCOTT@orcl_11gR2> begin
      2    FOR Lcntr IN 1..100
      3    loop
      4         insert into items (item_name, item_number, description, owner)
      5         values (dbms_random.string('A', 10),
      6              dbms_random.string('A', 10),
      7              dbms_random.string('L', 8) || ' '
      8              || dbms_random.string('A', 4)
      9              || dbms_random.string('A', 5)  || ' '
    10              || dbms_random.string('A', 10),
    11              dbms_random.value(1,10) );
    12    end loop;
    13  end;
    14  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    FOR Lcntr IN 1..100
      3    loop
      4         insert into items (item_name, item_number, description, owner)
      5         values (dbms_random.string('A', 10),
      6              dbms_random.string('A', 10),
      7              dbms_random.string('L', 8) || ' '
      8              || dbms_random.string('A', 4) || '111'
      9              || dbms_random.string('A', 5)  || ' '
    10              || dbms_random.string('A', 10), 1234 );
    11    end loop;
    12  end;
    13  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> exec ctx_ddl.drop_preference('ENG_WORDLIST');
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference('ENG_WORDLIST', 'BASIC_WORDLIST');
      3    ctx_ddl.set_attribute('ENG_WORDLIST','PREFIX_INDEX','TRUE');
      4    ctx_ddl.set_attribute('ENG_WORDLIST','PREFIX_MIN_LENGTH',1);
      5    ctx_ddl.set_attribute('ENG_WORDLIST','PREFIX_MAX_LENGTH',10);
      6    ctx_ddl.set_attribute('ENG_WORDLIST','SUBSTRING_INDEX','TRUE');
      7    ctx_ddl.set_attribute('ENG_WORDLIST','WILDCARD_MAXTERMS', 0);
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> execute ctx_ddl.drop_preference('ENG_LEXER');
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    CTX_DDL.CREATE_PREFERENCE ('ENG_LEXER', 'BASIC_LEXER');
      3    CTX_DDL.SET_ATTRIBUTE ('ENG_LEXER', 'PRINTJOINS', '@-_');
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> execute ctx_ddl.drop_preference('items_multi_preference');
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference('items_multi_preference', 'MULTI_COLUMN_DATASTORE');
      3    ctx_ddl.set_attribute('items_multi_preference', 'columns', 'item_name, description,item_number');
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> create index items_text_index
      2  on items(description)
      3  indextype is ctxsys.context
      4  parameters
      5    ('LEXER         ENG_LEXER
      6        WORDLIST   ENG_WORDLIST
      7        STOPLIST   CTXSYS.EMPTY_STOPLIST
      8        datastore  items_multi_preference
      9        MEMORY     1024M')
    10  /
    Index created.
    SCOTT@orcl_11gR2> create index owner_idx on items (owner)
      2  /
    Index created.
    SCOTT@orcl_11gR2> exec dbms_stats.gather_table_stats (user, 'ITEMS')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> select count(*)
      2  from   items
      3  where  contains (description, 'description') > 0
      4  /
      COUNT(*)
           200
    1 row selected.
    SCOTT@orcl_11gR2> -- correction of problem:
    SCOTT@orcl_11gR2> exec ctx_ddl.drop_section_group ('items_sec')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_section_group ('items_sec', 'basic_section_group');
      3    ctx_ddl.add_field_section ('items_sec', 'item_name', 'item_name', true);
      4    ctx_ddl.add_field_section ('items_sec', 'description', 'description', true);
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> drop index items_text_index
      2  /
    Index dropped.
    SCOTT@orcl_11gR2> create index items_text_index
      2  on items(description)
      3  indextype is ctxsys.context
      4  parameters
      5    ('LEXER         ENG_LEXER
      6        WORDLIST   ENG_WORDLIST
      7        STOPLIST   CTXSYS.EMPTY_STOPLIST
      8        datastore  items_multi_preference
      9        MEMORY     1024M
    10        section group items_sec')
    11  /
    Index created.
    SCOTT@orcl_11gR2> select count(*)
      2  from   items
      3  where  contains (description, 'description') > 0
      4  /
      COUNT(*)
             0
    1 row selected.

Maybe you are looking for