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.

Similar Messages

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

  • 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

  • How do I find the number of users returned by a cfldap query?

    How do I find the number of users returned by a cfldap query?
    I'm not allowed to do something like:
    <cfif ArrayLen(results.rows) gt 1>
    I then get an error:
    faultCode:Server.Processing faultString:'Unable to invoke CFC - Object of type class coldfusion.tagext.net.LdapResultTable cannot be used as an array' faultDetail:''
    Many thanks for any light you can shed

       Cheers again Ian for your many helps,
    it now won't let me do
    <cfqueryparam value="#results.USNCreated#" cfsqltype="cf_sql_varchar">
    I get the message:
    faultCode:Server.Processing faultString:'Unable to invoke CFC - Error Executing Database Query.' faultDetail:'[Macromedia][SQLServer JDBC Driver][SQLServer]The name "results.USNCreated" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.'

  • Error :cannot show the value of the filter.The Field may not be filterable or the number of items returned exceeds the list view threshold enforced by administrator

    Issue : In sharepoint 2013, I am experiening below error while using filter in the list view due to the number of items in this list exceeds the list view threshold, which is 10000 items. Tasks that cause excessive server load (such as those
    involving all list items) are currently prohibited.
    Error :cannot show the value of the filter.The Field may not be filterable or the number of items returned exceeds the list view threshold enforced by administrator
    Could you please suggest a way to avoid this issue apart from incrementing the list view threshold limit .
    Prashanth

    Reorganizing content, or creating more specific views. sharepoint is warning you that the content is structured in such a way that it can cause performance issues, which should be addressed in some way.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • How-To Display the Number of Records Returned from a List to the User?

    We currently are using lists to identify accounts that meet various criteria. Because the territories vary from 4k to 60k customers the users have stated that they don't know the size of the list and therefore don't know if they need to refine the list. Currently they are exporting to Excel to look at the row count to see if they need to further refine their searches. This takes quite a while and while shuffling through many lists is a bit painful. Isn't there a way to just show the total records returned from the list down at the bottom of the screen where it allows you to see 25/50/75/100 records at a time?
    There is probably a simple way to do this but it is a large user dissatisfier at the time because we simply don't know how to make this show up. Again we are using lists and not analytics for simple lists at this time.
    - john
    Edited by: user11286597 on Jun 19, 2009 11:02 AM

    Thanks Bobb. I can't believe that one wasn't in R1 :)
    Is there a link to the items being worked in the next release by any chance?
    - john

  • How to restrict the number of Records into the Table?

    Is there any way that I can restrict the number of records can be entered into the table?
    For example I have created a table TAB1 with size category 0( zero).
    User dont want to enter more than 100 values, How to restrict the number entries? Whether Basis can do it?
    Regards,
    Prathap

    Hi Prathap,
    You can write a code in table maintenance events to restrict the number of Records added into the Table to constant.
    Solution:
    Se11 -> enter table name (TAB1) -> F6 -> Utlities -> Table maint. generator -> Envirnment -> modification -> events -> write here the form routine name.
    Double click on routine name. You will get into include section of the code. Write here code like:
    IF current_rec_num > 100.
       messgae error 'Entry restriceted to 100'
    ENDIF.
    Somewhat this way you can achieve your target.
    Regards,
    Sachin

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

  • How to get the number of rows written to the header of the spool file.

    Hi
    I need to create a header line for the spool file .
    the header line should include fixed length values .
    The header should include the number of records found in the table with a maximum begin date (begin_date is the column of the table)
    To get the header in the spool file , i wrote a select query has :-
    --SPOOL 'C:\Documents and Settings\abc\Desktop\output.TXT'
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000') ||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) ||
    rpad(' ',76,' ')
    from dad.school
    group by sysdate;
    SPOOL OFF
    which gets me all the rows in the table , but i only want the rows with the latest school_begin_date .
    how can i achieve that ...
    I know that a subquery should be written in the from clause to get the number of rows found with a maximum school_begin_date.
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000') ||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) ||
    rpad(' ',76,' ')
    from dad.school where
    select rownum from dad.school
    where school_begin_date = max(school_begin_date) ;
    the error i get is
    ORA-00934: group function is not allowed here
    I NEED HELP ..IN GETTING THE ROWNUM JUST FOR THE LATEST BEGIN_DATE ?
    PLS HELP ME IN WRITING THE QUERY .
    THANKS IN ADVANCE .

    Try this:
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000')||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) || rpad(' ',76,' ')
      from dad.school
    where school_begin_date = (select max(school_begin_date)
                                  from dad.school);

  • Count the number of carriage returns in a multiline text box

    Hello,
    I have a script to count the number of carriage returns at the end of each line of text in a multiline text box.
    After running the script in the console, the result keeps showing as 0.
    Can anyone please advise how the script can be revised to count the number of carriage returns?
    var count = 0;
    for (var i = 0;  i < this.getField; i++)
    var f = this.getField("ActionAgenda");
    if (f.value =="\u000d") count++
    console.println("There are a total of "+ count + " carriage returns.");
    Any assistance will be most appreciated.

    Try this:
    var count = 0;
    var s = getField("ActionAgenda").valueAsString;
    for (var i = 0; i < s.length; i++) {
        if (s[i] === "\r") count += 1;
    console.println("There are a total of "+ count + " carriage returns.");

  • 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

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

  • Number of rows returned by the resultset is wrong

    Hi All,
    I have pasted the code i used for JDBC. The problem is the number of rows returned by the resultset is 5 times that of the original data. Is something wrong with my code. Can anyone pls point out the mistake I have done if any.
        public ArrayList dataBreakup(String team, int monthNo, int year) {         String sqlDataBreakup = "";         Connection con1 = null;         Statement stmt = null;         ResultSet rs = null;         ArrayList data = new ArrayList();         int noRows = 0;         Calendar cal = Calendar.getInstance();         Calendar cal2 = new GregorianCalendar(cal.get(Calendar.YEAR), monthNo, 1);         int days = cal2.getActualMaximum(cal2.DAY_OF_MONTH);         String start_date = "01-Jan-" + year;         String end_date = days + "-" + monthName[cal2.get(Calendar.MONTH)] + "-" + cal2.get(cal2.YEAR);         System.out.println("START: " + start_date);         System.out.println("END: " + end_date);         databaseConnection dbObject = new databaseConnection();         try {             con1 = dbObject.GetConnection();             stmt = con1.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);             sqlDataBreakup = "Select * from EXPENSE_STORE WHERE " +                     "team='" + team + "'AND category != 'Pending PO''s' AND ACCOUNTING_DATE " +                     "BETWEEN to_date('" + start_date + "') AND to_date('" + end_date + "')";             rs = stmt.executeQuery(sqlDataBreakup);                         ResultSetMetaData rsmd = rs.getMetaData();             int numColumns = rsmd.getColumnCount();             data.add(numColumns);             for (int i = 1; i < numColumns + 1; i++) {                 data.add(rsmd.getColumnName(i));             }                        while (rs.next()) {                                noRows++;                 for (int i = 1; i < numColumns + 1; i++) {                     switch (rsmd.getColumnType(i)) {                         case java.sql.Types.NUMERIC:                             data.add(rs.getFloat(i));                             break;                         case java.sql.Types.DATE:                             data.add(rs.getDate(i));                             break;                         default:                             data.add(rs.getString(i));                             break;                     }                                    }                     }             data.add(1, noRows);             rs.close();         } catch (SQLException SQLe) {             System.out.println("DumpData() : SQL Exception" + SQLe.getMessage());             SQLe.printStackTrace();         } catch (Exception e) {             System.out.println("DumpData() : Other Exception");             e.printStackTrace();         } finally {             dbObject.CloseConnection(con1);         }         return data;     }
    Thanks
    Cheers N...

    Only thing i can say is
    try the following
    replace your function by this one and tell us the console output of the same
    public ArrayList dataBreakup(String team, int monthNo, int year) {
            String sqlDataBreakup = "";
            Connection con = null;          
            ArrayList data = new ArrayList();
            int noRows = 0;
            Calendar cal = Calendar.getInstance();
            Calendar cal2 = new GregorianCalendar(cal.get(Calendar.YEAR), monthNo, 1);
            int days = cal2.getActualMaximum(cal2.DAY_OF_MONTH);
            String start_date = "01-Jan-" + year;
            String end_date = days + "-" + monthName[cal2.get(Calendar.MONTH)] + "-" + cal2.get(cal2.YEAR);
            System.out.println("START: " + start_date);
            System.out.println("END: " + end_date);
            System.out.println("START: " + start_date);
            System.out.println("END: " + end_date);
            databaseConnection dbObject = new databaseConnection();
            try {
                con = dbObject.GetConnection();          
                sqlDataBreakup = "Select * from EXPENSE_STORE WHERE " +
                        "team = '"+team+"' AND category != 'Pending PO''s' AND ACCOUNTING_DATE " +
                        "BETWEEN to_date('"+start_date+"') AND to_date('"+end_date+"')";
                   System.out.println("-----------sql starts---------------");
                   System.out.println(sqlDataBreakup);
                   System.out.println("-----------sql ends---------------");
                PreparedStatement pstmt = con.prepareStatement(sqlDataBreakup);
                   pstmt.setString(1, team);
                pstmt.setString(2, start_date);
                pstmt.setString(3, end_date);
                ResultSet rs = pstmt.executeQuery();
                ResultSetMetaData rsmd = rs.getMetaData();
                int numColumns = rsmd.getColumnCount();
                data.add(numColumns);
                for (int i = 1; i < numColumns + 1; i++) {
                    data.add(rsmd.getColumnName(i));
                while (rs.next()) {
                    noRows++;
                    for (int i = 1; i < numColumns + 1; i++) {
                        switch (rsmd.getColumnType(i)) {
                            case java.sql.Types.NUMERIC:
                                data.add(rs.getFloat(i));
                                break;
                            case java.sql.Types.DATE:
                                data.add(rs.getDate(i));
                                break;
                            default:
                                data.add(rs.getString(i));
                                break;
                //data.add(1, noRows);
                   System.out.println("no of Rows : " +noRows );
            } catch (SQLException SQLe) {
                System.out.println("DumpData() : SQL Exception" + SQLe.getMessage());
                SQLe.printStackTrace();
            } catch (Exception e) {
                System.out.println("DumpData() : Other Exception");
                e.printStackTrace();
            } finally {
                dbObject.CloseConnection(con);
            return data;
        }and try running the sql printed on the screen in your db and then let us know the result.
    in this code i have removed some of your code in order to simplify the problem.

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

  • 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

Maybe you are looking for

  • Adobe Media Encoder Error with MPEG2 Formats [../../src/Command.cpp-2519]

    I am trying to use some of my presets using MPEG2 format and it is giving me this error: [/Volumes/BuildDisk/builds/ame602_mac/main/app/frontend/prj/mac/../../src/Command.cpp-251 9]. I try the system presets that use MPEG2 and I get the same error. I

  • The schedule in Power BI report refresh error with the powerpivot or powerview with SQL Analysis services as data source

    In the Power BI Admin Centre, the data sources that cannot be setup with Analysis services, and it has the error to schedule the powerpivot or powerview report to have data refresh. The error is "我們無法重新整理此報表中的資料來源種類." - english, "We can not rearrange

  • CURRENT_DATE  in EclipseLink/JPA

    When I use CURRENT_DATE in JPA queries for date comparisions, it seems to be taking time into consideration as well. So when I comapre a date with CURRENT_DATE, even though the date I am comparing is today's date, the results state that CURRENT_DATE

  • 10G EM -- and 9i database

    Can EIM 10G be used to monitor 9i databases ? If not, do I need 9i EM installed in order to monitor 9i ???

  • Problem with filter object

    Hi, i have a filter (client number) in my WAD In a query i have the same client number infoobject with some attributes as a detail. When i run the WAD in Internet Explorer, and i search by client number, the query detail don´t show me the client numb