Returning no records when changing query setFirstResult value

On 1st pass through I can get the number of results based on setFirstResult and max number of records is set to 2 for testing. As a note setFirstResult() seems to be zero-based in that I have to set 1st result to 0 to get the 1st 2 records.
I remove the query from session since I read we could not re-use the query if setting the first result. Then I always create a new query and set the 1st result to the 1st row of next page which would be 2. I have 4 records that match in the database, but never get any results back.
Any help would be really appreciated !
Here's my code:
if (_databaseSession.getQuery(HOGLConstants.NAMED_QUERY_BY_PHONE) != null){_databaseSession.removeQuery(HOGLConstants.NAMED_QUERY_BY_PHONE);
createSearchByPhoneQuery(_databaseSession, searchByPhoneDTO, requestedPage, _maxRowsPerScreen);
Vector supplements = (Vector)databaseSession.executeQuery(HOGLConstants.NAMED_QUERY_BY_PHONE,_searchByPhoneDTO.getAreaCode(),_searchByPhoneDTO.getPhoneNo());
private void createSearchByPhoneQuery(DatabaseSession databaseSession, SearchByPhoneDTO searchByPhoneDTO, int requestedPage, int maxRowsPerScreen) {
          int firstRecordRow = (requestedPage - 1) * _maxRowsPerScreen;// setFirstRecord(int) is zero-based even though API does not mentionit.
          ReadAllQuery _query = new ReadAllQuery(SuppReq.class);
          ExpressionBuilder builder = query.getExpressionBuilder();
//          Define two expressions that map to the applicant's area code and phone number
          Expression areaCodeExpression =     builder.get(HOGLConstants.PERSISTAPPLICANT_AREA_CODE).equal(_searchByPhoneDTO.getAreaCode());
          Expression phoneNoExpression = builder.get(HOGLConstants.PERSISTAPPLICANT_PHONE_NO).equal(_searchByPhoneDTO.getPhoneNo());
          _query.setSelectionCriteria(areaCodeExpression.and(phoneNoExpression));
          query.setMaxRows(HOGLConstants.SEARCHRESULTS_ROWS_PER_SCREEN);
          query.addAscendingOrdering (HOGLConstants.PERSISTSUPP_REQ_ID);
//          Specify the required arguments for the query
          query.addArgument(HOGLConstants.PERSISTAPPLICANT_AREA_CODE);
          query.addArgument(HOGLConstants.PERSISTAPPLICANT_PHONE_NO);
          query.setFirstResult(firstRecordRow);
          query.setQueryTimeout(HOGLConstants.QUERYTIMEOUT);
          databaseSession.addQuery(HOGLConstants.NAMEDQUERY_BY_PHONE, _query);
     }

Hello,
The max rows operation is applied independently from the firstResults opperation, and is applied first. So in setting max rows to 2, you are getting rows 1 and 2, and then by applying firstResults=2, you are skipping past the second row, hence getting 0 back. This is because Max rows is applied to the statement before execution, where as firstResult is applied to the returned resultset. You will need to use firstresults=2 and maxrows=4 to get rows 3+4.
Also, you can change the query parameters on a named query. It is not recommended though only because named queries are stored on the session, and so in a multi-threaded app can cause problems when two threads try to execute the same query with, for example, different max results set. In a multithreaded environment you might want to get the named query and clone it before changing first/max rows, but for single threaded app there shouldn't be any problems.
Best Regards,
Chris

Similar Messages

  • Update info record when changing units of measure in material master

    Hello,
    is there any possibility for an automatic change of info record when changing conversion factors in the material master ?
    We have 3 units of measure in our material master: the base unit and 2 alternative units. The first alternative unit is the order unit and the second alternative unit is the order price unit. So in our purchase info records we maintain an order unit, which differs from the base unit and we also maintain an order price unit, which differs from the base unit and the order unit.
    If we now change the conversion factors between the units in the material master, we would like to get an automatic change of the converions in the info record (to order unit and order price unit), which have the same previous conversions.
    For IS R it seems to be implemented (see OSS-Note 975954).
    Is there any solution for a "normal" industry system ?
    Thanks for answering
    Edited by: Britta Heinsen on Jul 23, 2009 1:52 PM

    I don't think such an auto update is available. Infact I came to know that such an update is available in IS-R after reading your query.
    Obviously you an always create a workflow based enhancement that can synchronize the Info-records and material master changes or sort of enhancement which regularly reads the material master change history for such changes and trigger a synchronization by executing change Info-record automatically.

  • When changing query data source property.....

    hello folks,
    I have this very weird behavior in oracle forms 10 g R2:
    in my form I built a datablock " DB " based on a table " table1 ", in that datablock I added a push button that changed the query data source name of data block DB to " table2 " using the set_block_property() built-in, please note that table1 and table2 has the same structure.
    When I query the table2, and if i try to update a record, the updates are not saved and I got the error ora - 0000 , It seems that after changing the query data source to table2, if i try to update a record, the locking is perform to table1 (the original query data source that the datablock is built in the first place) ....
    Please can anyone help or explain me this behavior and what can i do to perform a workaround for it,,,,,
    and than you in advance...

    dear Mark,
    What indicates that the record is locked? More information please. well if query the v$lock view or from the EM I can see that the lock is performed on the first table

  • WKT polygon returns extra records on intersect query

    We have spatially enabled table with min/max lat/long with 1 degree cell data on which we perform queries coming from an application using well known text. We need to use WKT because we need to support user defined shapes of point, line, polygon, etc. (My test cases uses a rectangle). Our WKT data is accurate to 4 decimal places.
    //WKT version returns 100 records: (this is bad result)
    SELECT COUNT(*) from (select * from MAP_TABLE WHERE series='downunder') where sdo_relate(geometry,sdo_util.rectify_geometry(mdsys.sdo_geometry
    ('POLYGON((117.0627 -31.8451,117.0627 -27.0075,134.5875 -27.0075, 134.5875 -31.8451, 117.0627 -31.8451)))',8307),0.00005),'mask=anyinteract,querytype=window') = 'TRUE'
    // array version returns 90 records: (this is expected result)
    SELECT COUNT(*) from (select * from MAP_TABLE WHERE series='downunder') where sdo_relate(geometry,mdsys.sdo_geometry(2003,8307,null,mdsys.sdo_elem_info_array(1,1003,3),
    mdsys.sdo_ordinate_array(117.0627, -31.8451,134.5875,-27.0007)),'mask=anyinteract,querytype=window') = 'TRUE'
    The WKT seems to return extra records as if a .5 rounding error on the spatial query. We checked for tolerance; in USER_SDO_GEOM_METADATA, SDO_TOLERENCE for lon and lat in DIMINFO column are set to .0000005, and SRID of 8307, and the spatial index for the table has been recreated with .0000005 (just in case).
    Why is WKT not accurate?

    Hi Mike,
    Well, I'll be the first to line up and say that the WKT implementation has some issues. You already know them as you are doing that rectify_geometry step to account for some of them (incorrectly rotated rings which is what your example has).
    Noel is right that your example is not pushing along your case since an optimized rectangle is not the same as a regular rectangle, particularly in a geodetic cs. And that is one tiny tolerance in the rectify step! Is all your data at that tolerance? That's 0.0019685 inches! Wikipedia says the width of a human hair is 0.003937 inches so your tolerance is 1/3 of the width of a human hair. :)
    Anyhow, the second link Noel posted has the blurb we want: "When Spatial constructs the MBR internally for the query, lines along latitude lines are densified by adding points at one-degree intervals. This might affect results for objects within a few meters of the edge of the MBR (especially objects in the middle latitudes in both hemispheres)." So your optimized rectangle when its used internally by Oracle spatial looks like the results from this query:
    SELECT
    SDO_CS.TRANSFORM(
       MDSYS.SDO_GEOMETRY(2003,8307,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(117.0627, -31.8451,134.5875,-27.0007)),
       8307
    FROM
    dualSo you can probably expect some differences in query results in comparison to the four point rectangle that your WKT input creates. And certainly will happen at the follicle scale!
    Could you post a different example that does not use an optimized rectangle where the SDO and WKT produce different outputs?
    If your data is stored as WKT, how did an optimized rectangle get into this story in the first place? If you need to store an optimized rectangle as WKT - well you can't do that. You could do the above transform trick on any optimized rectangles in your data and then put all the resulting points into your WKT. Then things should match on the output query side. But that would mean chucking out the whole concept of optimized triangles from your dataset.
    Cheers,
    Paul

  • Returning all records for a query

    Hi,
    still working on this library. I have the majority of it working (not pretty but it works). One problem I have run into is that when I query an authors name I would like all records for that author to be shown. However, it is only showing the final record.
                   public void Search_a()throws Exception{
              String S_author1 = JOptionPane.showInputDialog(null,"Please enter the authors name");
                   String query = ("select * from library where Author=('"+S_author1+"')");
                   ResultSet rs = db_statement.executeQuery(query);
                   while (rs.next()) {
                  String s = rs.getString("Author");
                  output.setText(rs.getString("ISBN")+"\t"+rs.getString("Title")+"\t"+ s +"\t"+ rs.getString("Publisher")+"\t"+rs.getString("Genre")+"\t"+rs.getString("Details")+"\n");
              }//end while
         }// end search_aI cannot see where the error is. I think maybe I am overwriting the previous records but thought that the inclusion of +"\n" would force each result to a new line.
    Any ideas?

    Thanks for that. Not really sure how I would implement that (new to programming) but I have managed to solve it using               output.setText(output.getText()+rs.getString("ISBN")+"\t"+rs.getString("Title")+"\t"+ s +"\t"+ rs.getString("Publisher")+"\t"+rs.getString("Genre")+"\t"+rs.getString("Details")+"\n");Thanks for the reply though.

  • 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.

  • Problem facing when changing configuration characterstic values in SO

    Hi Experts,
    I am facing a problem when i am chaging sales order configuration characterstic values they are updating perfectly. But when i am creating purchase order with reference to sales order then the sales order configuration currency characterstic values are picking as 0 which are already updated perfectly in sales order.
    I am using cl_cbase-> set_configuration method for to update the characterstic currency values.
                    cl_cbase->set_mark_for_saving after the above method
                    cl_cbase->save_and_free after the above method.
    Would request your suggestions if you have come across this situation.
    Advance Thanks
    Regards,
    Chandra.

    Hi,
    Can do it using Union All is prompt SQL and presentation variable in report.
    Refer : http://www.varanasisaichand.com/2010/01/editing-all-choices-in-dashboard.html
    Regards,
    Srikanth

  • Sql to return second record in a query first

    I have a query that simply retruns records ordered by date
    most recent. What
    I need is to show the second record in the set only, or
    first. How would I
    do that?

    Make the inner join a LEFT JOIN
    SELECT        (ct.amount)
    FROM            dbo.card AS c WITH (NOLOCK) LEFT JOIN
                             dbo.card_transaction_log AS ct WITH (NOLOCK) ON ct.card_id = c.card_id  AND ct.transaction_response_cd = '00' AND 
                             ct.transaction_type_cd = 'REDEMPTION' AND ct.lastupdated <= '2013-12-09 11:02:00'
                             where c.card_id IN 
                             1767811,
                             1767812,
                             1767813 )
    Tom
    P.S.  Using WITH (NOLOCK) is usually a bad idea.  It amounts to saying you don't care if you might get bad data, duplicate data, missing data or unexpected errors.  If you are not having blocking problems, you don't need WITH(NOLOCK) and if
    you are having blocking problems it is usually better to look for other solutions, like improving your indexing strategy or using the SNAPSHOT transaction isolation level.
    Tom

  • Error when changing query

    Hi
    I am getting the following error when i am trying to put the variable for a calender month in filter column and connection getting terminated.
    An unexpected 'activex component can't create object' error occured in wdbrlog.
    1 error(s) are logged.
    Why is this happening. any solutions.
    Regards
    Annie

    Which version of BI solution you are using, if you are using SAP BI 7.0, this is an error coming in the support pack level lesser than 9, you should upgrade to that level or apply suitable notes.
    Regards,
    Sridhar.

  • HELP! Trying to print on an envelope (logo/return address), but when change page/paper size, prints blank page

    Before now, I have really only used Acrobat to convert and send uneditable documents (just to give you an idea that I am not used to trying to edit docs or print them out in paper sizes other than 8.5 x 11.  However, I have a document (created by a graphic designer) that was designed to be viewed as a sample, not really to be printed and now want to print it directly on an envelope.  I have created a custom paper size in the Print Setup menu and have also cropped the PDF page size to be similar (although not exact) to the envelope size.  When I try to print it, my printer prints out a blank page.
    Any thoughts?

    You need to select the paper size in the printer setup that corresponds to the letter size that you are using.  If you just crop to the approximately correct size you may find that the orientation of the page is wrong and various scaling options in the print dialog box can further confuse the issue.

  • Query returns zero records in coldfusion context, but works fine in Navicat

    I've got a query that's returning zero records when I load a page.  If I copy and paste that same query (from the debug output) into navicat, I get rows returned (as I expect).  Has anyone seen this?  It happens locally (CF9) AND remotely on our staging server (CF10).  Even weirder, it's a query that was previously working fine - I simply added an if statement to the where clause, and all of a sudden... 
    Here's the query:
            <CFQUERY name="LOCAL.getEncounterServices" datasource="#REQUEST.dsn#"> 
            SELECT
                a.EncounterProductID,
                a.DateTime AS ServiceDate,
                aa.CartItemID,
                aaa.CartID,
                aaaaa.CartStatus,
                b.ProductID,
                b.ProductName,
                b.CPTCode,
                b.Price,
                c.EncounterID,
                c.DateTimeClosed AS EncounterClosedDate,
                d.FirstName,
                d.LastName
            FROM
                EncounterProducts a
                    LEFT JOIN CartItemProduct aa ON (a.EncounterProductID = aa.EncounterProductID AND aa.Active = 1)
                    LEFT JOIN CartItem aaa ON (aa.CartItemID = aaa.CartItemID)
                    LEFT JOIN Cart aaaa ON (aaa.CartID = aaaa.CartID)
                    LEFT JOIN CartStatus aaaaa ON (aaaa.CartStatusID = aaaaa.CartStatusID),
                Product b,
                Encounters c,
                Contacts d,
                EncounterStatuses e
            WHERE
                1 = 1
                AND (aa.CartItemID IS NULL OR aaaaa.CartStatus = 'Deleted')
                AND a.Active = 1
                AND a.ProductID = b.ProductID
                AND a.EncounterID = c.EncounterID
                AND c.PatientID = d.ContactID
                AND c.EncounterStatusID = e.EncounterStatusID
                AND e.EncounterStatus = 'Closed'
              <CFIF IsDefined("ARGUMENTS.encounter") AND IsObject(ARGUMENTS.encounter)>
                     AND c.EncounterID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.encounter.getID()#">
             <CFELSE>
                    AND c.DateTimeClosed >= <CFQUERYPARAM cfsqltype="cf_sql_date" value="#ARGUMENTS.startDate#">
                    AND c.DateTimeClosed < <CFQUERYPARAM cfsqltype="cf_sql_date" value="#DateFormat(DateAdd('d', 1, ARGUMENTS.endDate), 'yyyy-mm-dd')# 00:00:00">
               </CFIF>
                AND c.LocationID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.locationID#">
                AND c.CustomerID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.customerID#">
            </CFQUERY>
    All of this worked just fine before I added the lines:
             <CFIF IsDefined("ARGUMENTS.encounter") AND IsObject(ARGUMENTS.encounter)>
                     AND c.EncounterID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.encounter.getID()#">
             <CFELSE>
                    AND c.DateTimeClosed >= <CFQUERYPARAM cfsqltype="cf_sql_date" value="#ARGUMENTS.startDate#">
                    AND c.DateTimeClosed < <CFQUERYPARAM cfsqltype="cf_sql_date" value="#DateFormat(DateAdd('d', 1, ARGUMENTS.endDate), 'yyyy-mm-dd')# 00:00:00">
              </CFIF>
    Previously, it had just been:
                    AND c.DateTimeClosed >= <CFQUERYPARAM cfsqltype="cf_sql_date" value="#ARGUMENTS.startDate#">
                    AND c.DateTimeClosed < <CFQUERYPARAM cfsqltype="cf_sql_date" value="#DateFormat(DateAdd('d', 1, ARGUMENTS.endDate), 'yyyy-mm-dd')# 00:00:00">
    With no IF/ELSE statement.
    Anyone seen anything like this before?  Any ideas? 
    Thanks.

    Right, I'll start disabusing myself of the DateFormat!
    I'm sorry, I should've posted the actual query too.  It's inserting the first part - "AND c.EncounterID = ....."
    Here's the full query:
    LOCAL.getEncounterServices (Datasource=xmddevdb, Time=9ms, Records=0) in /Applications/ColdFusion9/wwwroot/XMD_NEW/xmd_dev/cfc/ShoppingGateway.cfc @ 16:56:28.028
    SELECT
                a.EncounterProductID,
                a.DateTime AS ServiceDate,
                aa.CartItemID,
                aaa.CartID,
                aaaaa.CartStatus,
                b.ProductID,
                b.ProductName,
                b.CPTCode,
                b.Price,
                c.EncounterID,
                c.DateTimeClosed AS EncounterClosedDate,
                d.FirstName,
                d.LastName
            FROM
                EncounterProducts a
                    LEFT JOIN CartItemProduct aa ON (a.EncounterProductID = aa.EncounterProductID AND aa.Active = 1)
                    LEFT JOIN CartItem aaa ON (aa.CartItemID = aaa.CartItemID)
                    LEFT JOIN Cart aaaa ON (aaa.CartID = aaaa.CartID)
                    LEFT JOIN CartStatus aaaaa ON (aaaa.CartStatusID = aaaaa.CartStatusID),
                Product b,
                Encounters c,
                Contacts d,
                EncounterStatuses e
            WHERE
                1 = 1
                AND (aa.CartItemID IS NULL OR aaaaa.CartStatus = 'Deleted')
                AND a.Active = 1
                AND a.ProductID = b.ProductID
                AND a.EncounterID = c.EncounterID
                AND c.PatientID = d.ContactID
                AND c.EncounterStatusID = e.EncounterStatusID
                AND e.EncounterStatus = 'Closed'
                     AND c.EncounterID = ?
                AND c.LocationID = ?
                AND c.CustomerID = ?
    Query Parameter Value(s) -
    Parameter #1(cf_sql_integer) = 28
    Parameter #2(cf_sql_integer) = 16
    Parameter #3(cf_sql_integer) = 6
    Thansk again for the help!

  • How to update the table when change list item in classic report

    hi ,
    i worked with apex 4.2 and i create normal classic report with one select list(named loved)Column ,now i want to update table when user change the list with new value ,i can't create dynamic action to do this,i create check box with primary key and loop for check item to update the table but i can't get the value of list item. and for more speed the user want to do this when change the list value.
    my question
    1- how to do this by javascript and get the value from list item and update the table with new value
    2- is i must use API to create list item so i can get the value of item in report or what.
    Thanks
    Ahmed

    I coded the following to give you direction:
    1. In the "Element Attributes" section of the DEPTNO column, I call a javascript function as:
    onchange = "javascript:updateTable(this);"2. I wrote a simple javascript function that shows an alert when the user changes the select list as:
    <script language="JavaScript" type="text/javascript">
    function updateTable(pThis)
        var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
        alert('Row# - '+ vRow + ' has the value - ' + pThis.value);
    </script>Now, you can call a AJAX on-demand process inside the javascript function to update the database value.

  • Export Datasource Returning 0 Records

    Hi,
    I have an export datasource on a COPA cube. This data source returns zero records when the infopackage is run. However, in RSA3 and LISTCUBE it returns records correctly.
    I set a breakpoint in Function Module RSDRC_CUBE_DATA_GET. This worked fine in RSA3 but on running the InfoPackage the breakpoint was not reached so I guess the problem is before this.
    I tried deactivating the V fact table view but this has no effect.
    Any ideas why this may be happening? Or any ideas how I can debug this further? What Function Modules are called when an Infopackage is executed?
    Regards, Lea

    Do you have any restriction on your infopackage? Ar eyou making a full load?
    if you do not have any restriction, try to regenerate again the Export Datsource and restart the loading.
    Which is your release?
    Mike

  • Oracle Forms returns the first record in the database when performing query

    Once in a while when we query for a record on a form, say by first name Tom, then it returns the first record in the database. Other times it return the Tom's record. It only happens once in a while and if you close the form and reopen it and requery for Tom, then it brings Tom's record.
    Does anyone know the issue what could be happening. It just happens every now and then that it's hard to reproduce.
    ORacle Forms 10GR2
    ORacle Application Server 10.1.3
    thanks

    then it returns the first record in the databaseI'm not sure if i understand you correctly. Do you mean forms ignores the searc-condition you entered? I would check SYSTEM.LAST_QUERY at the moment this happens to check if the condition gets somehow lost.

  • Commiting all the records when one is change  --Help Please

    Hi,
    I have a problem. I have got a form to do some changes. (original form was not done by me). This is a base table form. If I query for a particular criteria, and say it returns 5 rows and then if i modify just something only in one record and save, it commits all 5 records.
    But for the second time (without exist form the form), then if I query for the same criteria which returns the same 5 records and at that time when changing something in 1 record will commit only that record... Any idea what property has got wrong...
    The problem is I am supposed to keep a history table and to track the changes done to main table. so in above case as it commits even the records that has not being changed, that also get writes to the history...
    There are some display fields as well which display values from LOVs.
    Any one, ... any idea where the problem is...

    No Mohan,
    I haven't written any code.. I also cannot find how this happens.. because its a form that someone else has done..iam also trying to find why & how this is happening. There is no trigger to update, it is a base table block.
    But I saw a field now which populates from a LOV. There is a description field displayed on the form but actually the field that is on the table is the code, so when selecting from the LOV the code field is getting populated... Is this a problem

Maybe you are looking for

  • Need some help in a JSP

    Hi all i'm new to jsp technolohie and i'm writing a jsp that sends an email on red hat linux i keep having theses errors . ps the first jsp is fine but its in the second one i have problems org.apache.jasper.JasperException: Unable to compile class f

  • Holding a table syle when an excel file is linked

    hello, I am playing around with placing excel files in an InDesign document as a linked file, so that someone can update the info in excel, and I can update the indesign file. Problem is, the excel file had some basic coloring and borders already set

  • Cartridges will not release

    I LOVE my 4180 All-in-One and am very distressed by this problem. I received a message on-screen that there was a problem with the cartridges. I replaced the black and tri-color cartridges with new ones. Now another message: the tri-color cartridge (

  • GPS, WLAN+3G

    So, I have an iPad, the model with the 3G. I have been using it effectively as a GPS all over the world, even in places that I don't have 3G connection (which is only for the US's AT&T). I've been using it in the US, India and Israel (to name a few p

  • Optimized software and apps for Mac Pro 2013 ?

    Hi I'm wondering which apps have been optimised for the Mac Pro ? The ones I was able to find so far: Final Cut X Compressor Motion Logic Aperture here: http://appleinsider.com/articles/13/10/23/updates-to-aperture-final-cut-pro-will -tap-into-horsep