Returning the number of records retrieved by a query

Hi everyone,
I did a search on this question, but I'm still unclear as to why it's so difficult to retrieve the number of records returned by a query.
What is the easiest and most straight-foward way ?
Thanks,
Bob

Shay
I am confused. I still do not know how to achieve the count of records retrieved in a block. I have viewed the viewlet calculated field demo. I am unclear of what you were refering to when you said use the count as the function.
I did try setting function to be "get_block_property('myblock',query_hits)", but this always had value of zero. But I do not think this is what you meant.
Has anybody been able to answer the original question?

Similar Messages

  • Which system field returns the number of records returned after a select?

    Which system field returns the number of records returned after a select?
    a) sy-index
    b) sy-recno
    c) sy-lncnt
    d) sy-dbcnt
    e) sy-tabix

    Hi,
       SY-DBCNT
    Regards,
    Prashant

  • Forms: how to use COUNT_RECORD to get the number of record retrieved?

    After GO_BLOCK(BlockName)EXECUTE_QUERY, there must a way to obtain the number of records retrieved.
    I like to use this number to display to number of records on the form.
    Clearly, a not so good way is:
    SELECT COUNT(*) INTO :NUM_RECORD FROM Table_Name;
    It queries table one more time.
    Could any one give a clue?
    Thank you.

    Dear Kiran,
    Fom tables EINE (inforec no, plant) and EINA (inforec no, material, vendor), you can get the desired information.
    Regards,
    Prasanth

  • How to count the number of records retreived through a query?

    Dear All
    I want to find the total number of records retreived for a particular query .
    does BW provide any internal count function , which can solve my requirement??
    if yes, please provide some details.
    Thanks.
    Regards,
    Pandurang.

    hi pandurang
    when u see the contents of a particular cube
    RSA1->Infocube->manage->contents
    there is a option "Output number of Hits"
    An extra keyfigure is created displaying the number of records rolled up
    Aggregating the column might just solve ur issue
    Try
    Regards
    Akshay

  • Is there a limit to the number of records a dynamic page query can return

    I am using a dynamic page in portal. In between the <ORACLE></ORACLE> tags I have a query that should return 4032 records. All I get on my portal page is the first 1000.
    Any ideas appreciated.

    Hi ,
    Please follow below links for your query :
    http://www.utteraccess.com/forum/lofiversion/index.php/t1991312.html
    http://answers.microsoft.com/en-us/office/forum/office_2010-access/combo-box-limitation-of-500-records-in-access-web/355c33f0-8a32-447e-ae93-ea9e040a0d5f
    http://social.technet.microsoft.com/Forums/office/en-US/baaf8988-3ead-4fd5-8ef0-880552e1f8b3/listbox-dropdown-limit-in-access-2010-form-in-sharepoint?forum=officeitproprevious
    Hope it helps . :)
    Whenever you see a reply and if you think is helpful, click &quot;Vote As Helpful&quot;! And whenever you see a reply being an answer to the question of the thread, click &quot;Mark As Answer

  • Applescript - how can I count the number of records in a Word data source?

    I have written a script in AppleScript to open Word and then perform a mail merge from a data source and everything is working fine.
    One thing I want to do but am struggling with is to return the number of records in the mail merge.
    I am trying things like:
    get last record of datasource of mydatasource
    and also haven't been able to find anything in the AppleScript 2004 Word Reference Guide.
    Can anyone help as I have been searching the web and trying things all day and I am sure it can't be difficult.
    Thank you.

    I don't think there is an automatic way to get a line count, but I don't have any problem just counting the lines on a page. Maybe some more information about what you are trying to do and why you can't do it would help someone to come up with a helpful suggestion.

  • Limitting the number of records in query

    I like to limit the number of records retrieved in the query. I set Query All Records block property to NO, Query Array Size to the number I want to retrieve. Before doing that, I set form Preference - Array Processing checked. The result is form always retrieves all records meets the search condition. Could someone tell me what's wrong with it?

    I do not understand why and what exactly you want to do. The query array size defines the number records your form should fetch at a time, i.e. if you have 100 records in the database and you set the array size to 20, forms will perform 5 fetch cycles to retrieve all records. However, this is transparent to the user and he will see all 100 records. This property is used for performance tuning when working with a large volume of records.

  • How to find number of records retrieved

    hi everyone,
    suppose you made tap canvas and 2 tab page one for dept table and one for emp table and you make non database text item in the emp tab page. i need when i press in row on dept page navigate to emp page and display the number of records retrieved in this text item
    any help i greatly appreciated
    thanks

    Hello,
    What happens if you create one text item (non database) with numeric datatype in the emp block and set the property No. of display records to 1.
    Then set the Calculation Mode to Summary.
    Then Set the Summary Function to Count.
    Then Choose the Summarized Block from list as EMP block and choose any column from the Summarized Items list.
    The run the form.
    -Ammad

  • How do I count the number of records returned in the CMIS query

    How do I count the number of records returned in the query CMIS?
    SELECT COUNT(*) FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition = \'RD_PROJETOS_EXCLUSIVOS\''}
    Euler Homero

    Hi Euler,
    interestingly enough, the reference guide for CMIS ( http://wiki.alfresco.com/wiki/CMIS_Query_Language ) that I found does not mention the COUNT function at all. On the other hand it states that: "The SELECT clause identifies which virtual columns to return in the result set. It can be either a comma-separated list of one or more queryNames of properties that are defined by queryable object types or * for all virtual columns."
    There are, however, some other posts like e.g. http://alfrescoshare.wordpress.com/2010/01/20/count-the-total-number-of-documents-in-alfresco-using-sql/ which state that they could make it working.
    Having asked in the WebCenter Portal forum, I assume that your content repository is WebCenter Content. The CMIS doc for the Content is available here: http://docs.oracle.com/cd/E23943_01/doc.1111/e15813.pdf (no COUNT there either). It does, however, mention explicitly that "CMIS queries return a Result Set where each Entry object will contain only the properties that were specified in the query.". This means your could rather investigate the Result Set. Note that there are also other means than CMIS how to get the requested result set (e.g. calling a search service directly via so-called RIDC).
    In the given context I am also interested what your use case is. OOTB CMIS in WebCenter Portal is used, for instance, in Content Presenter, where it is content rather than "parameters" what's displayed.

  • How  to retrieve one row from the number of records in a table

    i want to retrieve the rows from the number of records in a table without using the perticular column name.

    select count(*) from table
    /If you have your table currently analyzed, and no changes have been made, then you could
    select num_rows from user_tables where table_name = 'table'

  • Variable to hold the number of records returned by the SQL Query.

    Hi folks,
    Is there any way to hold the number of records that could be returned by the SQL query we use to make a report?
    If so, please do come up with the answer.
    Cheers,
    PCZ.

    Hi there,
    Well, there is no actual business requirement.
    It is just the curiosity of mine.
    I would like to handle
    1) the number of records our report query returns or
    2) the query itself
    to write a better pl/sql code in any trigger/program unit, if any business logic beckons in future.
    Cheers,
    PCZ.

  • Retrieve all column data of a table along with the number of records received

    hi, i want to select all the records from a table along with the number of records received as i need to use that number in a loop  to retrive data from another table
    can i use 
    SELECT @emp_id=emp_ID, @emp_NAME=emp_NAME,@RowCnt = (select count(*) from emp_id) order by emp_id

    i tried your idea, i get error in at the over() . I am using sql compact edition and i guess it is not supporting over() function. But i am still going to use the code for example something like this assuming it will work in real time with
    enterprise edition. Please let me know what i am going to use is correct or not?
    SELECT [EventID],[BallroomCharge], @rowcnt=count(*) Over()
    FROM [testSample].[dbo].[Events]while (@rowcnt > 0)perform some request

  • BAPI to find the number of records existing in HR module

    Hi ,
    I wanted to know if there exist BAPI  that would return me the number of SAP HR module users in a system.
    I cam across the BAPI's for info types like  personu2019s Personal Data (Infotype 0002)
    BAPI_PERSDATA_CHANGE u2013 Change personal data
    BAPI_PERSDATA_CREATE u2013 Create personal data
    BAPI_PERSDATA_CREATESUCCESSOR u2013 Create subsequent personal data record
    BAPI_PERSDATA_DELETE u2013 Delete personal data
    BAPI_PERSDATA_DELIMIT u2013 Delimit personal data validity period
    BAPI_PERSDATA_GETDETAIL u2013 Read personal data
    BAPI_PERSDATA_GETDETAILEDLIST u2013 read instances with data
    BAPI_PERSDATA_GETLIST u2013 Read instances
    But i wanted to know if there exist a master table which would  return me the number of records irresepctive of the  infotypes.
    Best Regards
    Manoj

    Hi,
    if you want to know the number of employees, then u should  use the infotype PA00001 and PA0000 with appropriate criteria. Infotype PA0002 should not be used to find the number of employees in the HR.
    As you requested there are no specific BAPI to find the records. Hope this helps you.
    Or u can use PAR2 transaction to find details.
    Thanks,
    Saibaba Kondani
    Edited by: Kondani Saibaba on Aug 19, 2009 7:33 AM

  • How to set the number of records displayed at run time

    Is it possible to set the number of records displayed block property at run time? The built-in 'GET_BLOCK_PROPERTY' can retrieve the number of RECORDS_DISPLAYED. But I can't find SET_BLOCK_PROPERTY to set this property. Is there anyway I can set this property programmatically? Thanks for any suggestions!

    Bookmark Go to End
    goal: How to vary the number of records displayed in a block
    programmatically
    fact: Oracle Forms Developer
    fix:
    Block property 'Number of Records Displayed' can not be changed during runtime
    using SET_BLOCK_PROPERTY. However, it is still possible programmatically change
    the visual appearance of the form so that it creates effect of changing this
    property. To achieve such an effect follow these steps:
    1. in Forms Builder, in the multirecord block define the new set of items.
    The simplest way is to copy/paste the original item and rename created item.
    2. set properties of these new items so that they are the same as the properties
    of the original items. If these new items were copied from original items
    then properties are already the same. Modify following properties
    'Database item' on new items to value 'No'
    'Synchronize with item' to the value of the original item
    'Number of Items Displayed' to desired value.
    'Visible' to 'No'
    In other words, these new items are mirrors of original items.
    3. code event, which is meant to trigger the change in block appearance.
    This code should use SET_ITEM_PROPERTY built-in to set properties
    like 'VISIBLE', 'ENABLED', 'NAVIGABLE', 'UPDATE_ALLOWED' and others
    to desired value for items which are about to be displayed, then
    move cursor to one of these just displayed items with GO_ITEM built-in
    and then hide the previously displayed items.
    Example:
    Assume that the block is built on SCOTT.DEPT schema. Following will
    change the set of displayed items
    set_item_property('dept.mdeptno',visible,property_true);
    set_item_property('dept.mdname',visible,property_true);
    set_item_property('dept.mloc',visible,property_true);
    set_item_property('dept.mdeptno',enabled,property_true);
    set_item_property('dept.mdname',enabled,property_true);
    set_item_property('dept.mloc',enabled,property_true);
    set_item_property('dept.mdeptno',update_allowed,property_true);
    set_item_property('dept.mdname',update_allowed,property_true);
    set_item_property('dept.mloc',update_allowed,property_true);
    set_item_property('dept.mdeptno',navigable,property_true);
    set_item_property('dept.mdname',navigable,property_true);
    set_item_property('dept.mloc',navigable,property_true);
    go_item('dept.mdeptno');
    set_item_property('dept.deptno',visible,property_false);
    set_item_property('dept.dname',visible,property_false);
    set_item_property('dept.loc',visible,property_false);
    Regards,
    Monica

  • How do you return the number of Rows in a ResultSet??

    How do you return the number of Rows in a ResultSet? It's easy enough to do in the SQL query using COUNT(*) but surely JDBC provides a method to return the number of rows.
    The ResultSetMetaData interface provides a method for counting the number of columns but nothing for the rows.
    Thanks

    No good way before JDBC2.0. u can use JDBC2.0 CachedRowSet.size() to retrieve the number of rows got by a ResultSet.

Maybe you are looking for

  • Export to PDF from Infoview does not show correct data - CRS 2008

    I have a problem where users attempt to export a report from the Infoview interface to a PDF.  The report shows correctly in Infoview while in Crystal Reports format, but when the use exports the data, the data changes and shows different values.  To

  • Scheduling SecureErase of Free Space

    I would like to schedule an automatic (daily) run of Disk Utility's Secure Erase Free Space. How do I do this? I did find this command: sudo diskutil secureErase freespace 1 <diskname> Thanks.

  • Rendering error 50 when trying to export in iMovie 10.0.1

    I am trying to export a 74 minute video and I keep getting "Share failed" with a rendering 50 error.  I have tried to export to a thumb drive, to the desktop and to youtube and none have worked. Any help?

  • Problem of WHT in version upgrade

    Hi SAP GURU My client has implemented classical WHT  in 4.6C . It process the WHT through T.code J1INC. Now i am posting a vendor invoice which is subject to WHT and process it through T. code j1inc then system through the error NO doc. require TDS p

  • Changes on Pool table entries

    Hi All, I have made changes to one of the entry of the pool table-T180U. There was no request created in the Development server for the above changes. How to transport the changes to the Production? Can I directly make the same changes for the pool t