What is fastest approach to get count of list items ? I need to do something like select (*) from table

Hi All,
I have implemented paging on huge list. Grid gets shown 20 items per page but I have to show on grid pager a total count of items. Moreover filters could be applied to the grid. So, total count will depend from filter criteria. What is best approach to do
something similar to SQL select count (*) from sometable  on SharePoint list?
Oleg

Hi,
According to your description, you want to get the total count of items in current list view.
There is an OTTB feature  “Totals” in the list view settings, it can count the items existing in the current list view.
I suggest you do as the followings:
1. Set the total count for the column in the list view->”Totals”.
Then, the total item count will show in the list.
Best regards

Similar Messages

  • While working in Material Master, Before exporting to Excel need to know the count of listed items in SQVI Reporting

    While working in Material Master, Before exporting to Excel need to know the count of listed items in SQVI Reporting

    Major documentation is at https://service.sap.com/installmdm.
    In the "Installation" section, you can find information about predefined object models (e.g. Product, Business Partner). For "Vendor" information, please check under "Previous Releases (ZIP Files) > MDM 5.5 (SP03) Installation Guides > SAP ERP-MDM Field Mapping and Check Tables.xls.

  • Fastest way to get count

    Hi
    I am having big table "BT" around 5,00,000 records in a table. this table is having various columns
    a, b,c,d,e,f,g .....etc
    I am having following indexes on a table
    1/ unique index a, b, c, d, e, f, g
    2/ index a, b, c, d
    3/ index a, b
    4/ index a, o,p,q
    5/ index r, s, t, u, v
    I am doing count(*) on a table where e = < some condition > and g = dt
    It is doing fast index full table scan. But it is taking more than 30 mins.
    I can not activate parallel query option. Can it be done faster way ?
    thanks & regards
    PJP

    The only index that contains both e and g is the first one and it's pretty wide. I agree with cd, you should try an index on g,e or e,g. remember, the order of columns in an index is a strategic decision so you need to consider things like the uniqueness of e and g. In general put the more unique one first. You also need to consider how often e and g are used in other queries. In general, the column referenced in the where cluse of the most queries should be placed first. The 2 general recommendations I mention sometimes contradict each other and that is where you need to make a judgement call

  • How to Get the required List Item values by using Where Clause

    I have two tables named "TAX_RULES","BILL"
    1. " Tax_Rules" (Sub_Head_Code,Tax_ID,Tax_Percentage)
    { While "Sub_Head_Code" field is unique,
    Tax_ID describes that there are two kinds of Tax_IDs based on Tax_percentage which is 6% for some Sub_Head_Codes and 3.5% for the remainng Sub_Head_Codes. I have given Tax_ID 1 for 6% and Tax_ID 2 for Sub_Head_codes having 3.5%. }
    2. "BILL" (Bill_ID,Sub_Head_Code,Tax_ID,Bill_Amount)
    {While "Bill_ID" describes unique Bill Identification Number,
    Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table}
    I have design form for both tables.
    In BILL form i am trying to get values of Tax_ID from Tax_Rules table at run-time by using WHEN-NEW-FORM-INSTANCE.
    For this whenever i select a Sub_Head_Code in Bill Form, all the Tax_IDs that i have recorded against each Sub_Head_Code which is either 1 or 2 against 6% and 3.5% respectively.
    But I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code ahould come in the LIST ITEM.
    I have used WHERE clause but that is useless.
    Following is the Code that i have applied in the WHE-NEW-ITEM-INSTANCE Trigger at FORM LEVEL
    <CODE>
    DECLARE
         rg_n1 VARCHAR2(40) :='TAX_ID';
         rg_idn1 RecordGroup;
         gc_idn1 GroupColumn;
         errcode NUMBER;
    BEGIN
         CLEAR_LIST('BILL.TAX_ID');
         rg_idn1 := Find_Group(rg_n1);
    IF      Id_Null(rg_idn1) then
              rg_idn1 := Create_Group(rg_n1);
         gc_idn1 := Add_Group_Column(rg_idn1,'EXPLAIN',CHAR_COLUMN,60);     
              gc_idn1 := Add_Group_Column(rg_idn1,'TAX_ID',CHAR_COLUMN,3);
         END IF;
         errcode := Populate_Group_With_Query(rg_idn1,'select TAX_ID,TAX_ID from TAX_RULES');
         POPULATE_LIST('BILL.TAX_ID',RG_IDn1);
    END;
    </CODE>

    In the Tax Rules table, you state:
    "Sub_Head_Code" field is unique
    In the Bill table, you state:
    Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table
    If the Sub_Head_Code is unique, then it's acting as a primary key, so Sub_Head_Code and Tax_ID in the Bill table are not behaving like a composite foreign key. The Sub_Head_Code is a foreign key, and the Tax_ID is irrelevant as far as keys are concerned.
    It is not clear what it is you want to do.
    If you want to display the Tax_IDs from the Bill table when you select a Sub_Head_Code from the Tax_Rules table, then change your query to:
    select TAX_ID, TAX_ID from BILL where Sub_Head_Code = :Tax_Rules.Sub_Head_Code
    If you want to display the Tax_IDs from the Tax_Rules table when you select a Sub_Head_Code from the Bill table, then change your query to:
    select TAX_ID, TAX_ID from TAX_RULES where Sub_Head_Code = :Bill.Sub_Head_Code
    If this is not what you want, then clarify what it is you want to do. Don't say:
    "I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code"
    because it is not clear what tables you are referring to.

  • Getting an error while selecting from table having CLOB column.

    Hi All,
    I have below table created in My oracle database version Oracle Database 11g Enterprise Edition Release 11.2.0.1.0.
    CREATE TABLE my_clob -- Dummy table created
    (DataBody CLOB);
    Current Database Character set - WE8MSWIN1250.
    On the front end of my application, I have one form through which I can save/edit data in the above table. If I'm creating one new entry in the above table then it first check with existing record to avoid the duplicate entry and the this point application create the below select statement on the above table and return the error "ORA-00932: inconsistent data types: expected - got CLOB".
    I can not change the sql statement.
    SELECT * FROM my_clob WHERE databody IS NULL OR databody ='';
    Even when I run the same statement on my DB server I’m getting the same error. Shown below
    SQL> SELECT * FROM my_clob WHERE databody IS NULL OR databody ='';
    SELECT * FROM my_clob WHERE databody IS NULL OR databody =''
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected - got CLOB
    SQL>
    Is there anything with OraOLEDB which causing this error? Please help me out to get rid of this error.
    Thanks,
    Santosh

    You cannot compare directly a CLOB column with a VARCHAR2 column. In your case you don't need to do such comparison because Oracle consider zero length strings as null values:
    SQL> create table my_clob(data int, databody clob);
    Table created.
    SQL> insert into my_clob values(1, null);
    1 row created.
    SQL> insert into my_clob values(2, '');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from my_clob where databody is null;
          DATA
    DATABODY
             1
             2About null values in Oracle, please read http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements005.htm#SQLRF30037.

  • System getting hanged whilst using Insert into table select * from table

    I have a peculiar problem.
    I am using the below statements:
    Query 1:
    insert into table ppms.erin_out@ppms_dblink select * from erin_out;
    Query 2:
    insert into table ppms.erin_out@ppms_dblink values(23,'dffgg',12',dfdfdgg,dfdfdg);
    I am in 'interfaces' schema (testing server) and executing above statements. We have testing server and development server, both are identical, i.e one is clone of the other.
    ppms_dblink is created in interfaces schema. ppms_dblink points to different database server which has two schemas 'clarity' and 'ppms'. ppms_dblink is create through authentication details of clarity schema.
    erin_out table is created on ppms schema on the same dababase server pointed by ppms_dblink.
    Question is :
    TOAD hangs while running query 1.
    Query 2 is working perfectly.
    As I have pl/sql script which is using query 1. I want to know why query 1 is creating problem.
    If I use query 2 in my pl/sql query then it may create performance issue as i have to use cursor then.
    On clarity schema, I have insert, update, select, modify rights on ppms.erin_out.
    I have tried same queries from another database server.
    That is I tried queries from 'interfaces' schema of development server ( clone of the testing server ). Its working perfectly.
    Message was edited by:
    user484158

    Dhanchik:
    The table from which I select rows, to insert into table on dblink, is having only one record. It may contatin maximum 100 rows at a time because I am scheduling the procedure through daemon process. Anyway transaction is not more than 100 records. I am trying with just 1 record for testing.
    So 1) Problem is not about the cost, TOAD is getting hanged ( to insert 1 record, cost does not mean much)
    2) there is no large amount of data, so no question of deteriorated performance
    Aron Tunzi:
    I think that should not be problem, because I am able to insert a record through query 2.
    Warren Tolentino :
    I am testing with 1 record only. Its not performance issue.
    Message was edited by:
    &#2352;&#2330;&#2367;&#2340;

  • "select * from table" and "select top 14260 from table" get nothing but select top 14259 get result successful

    select * from tablename                   ------always running,but get nothing
    select top 1 *  from tablename         -------get result quickly
    select top 2 *  from tablename         -------get result quickly
    select top 14259 * from tablename  --------get result quickly
    select top 14260 * from tablename  --------always running,but get nothing
    the thread is:
    java.net.SocketInputStream.socketRead0(Native Method)
    java.net.SocketInputStream.read(SocketInputStream.java:150)
    java.net.SocketInputStream.read(SocketInputStream.java:121)
    com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1782)
    com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:4838)
       - 已锁定com.microsoft.sqlserver.jdbc.TDSReader@54269910
    com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:6150)
    com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:402)
    com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
    com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
    com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
       - 已锁定java.lang.Object@320b1499
    com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
    com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
    com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:332)

    when I run the below sql of Uri Dimant,I get many rows,I think you are right!
    Do you have some method to handle this problem?
    Or do you have some information for me to Learn?
    Thanks a lot.
    SELECT
    owt.session_id AS waiting_session_id,
        owt.blocking_session_id,
    DB_NAME(tls.resource_database_id) AS database_name,
        (SELECT SUBSTRING(est.[text], ers.statement_start_offset/2
    + 1,
    (CASE WHEN ers.statement_end_offset = -1
    THEN LEN(CONVERT(nvarchar(max), est.[text])) * 2
    ELSE ers.statement_end_offset
    END
    - ers.statement_start_offset
    ) / 2)
    FROM sys.dm_exec_sql_text(ers.[sql_handle]) AS est) AS waiting_query_text,
    CASE WHEN owt.blocking_session_id > 0 
    THEN (
    SELECT
    est.[text] FROM sys.sysprocesses AS sp
    CROSS APPLY sys.dm_exec_sql_text(sp.[sql_handle]) as est
    WHERE sp.spid = owt.blocking_session_id)
    ELSE
    NULL
    END AS blocking_query_text,
        (CASE tls.resource_type
    WHEN 'OBJECT' THEN OBJECT_NAME(tls.resource_associated_entity_id, tls.resource_database_id)
    WHEN 'DATABASE' THEN DB_NAME(tls.resource_database_id)
    ELSE (SELECT  OBJECT_NAME(pat.[object_id], tls.resource_database_id)
    FROM sys.partitions pat WHERE pat.hobt_id = tls.resource_associated_entity_id)
    END
    ) AS object_name,
    owt.wait_duration_ms,
    owt.waiting_task_address,
    owt.wait_type,
    tls.resource_associated_entity_id,
    tls.resource_description AS local_resource_description,
    tls.resource_type,
    tls.request_mode,
    tls.request_type,
    tls.request_session_id,
    owt.resource_description AS blocking_resource_description,
    qp.query_plan AS waiting_query_plan
    FROM sys.dm_tran_locks AS tls
    INNER JOIN sys.dm_os_waiting_tasks owt ON tls.lock_owner_address = owt.resource_address
    INNER JOIN sys.dm_exec_requests ers ON tls.request_request_id = ers.request_id
    AND owt.session_id = ers.session_id
    OUTER APPLY sys.dm_exec_query_plan(ers.[plan_handle]) AS qp
    GO

  • Whats the fastest way to get CS6 out of trial mode?

    Premiere 6 is in trial mode, only allowing Standar Def DV settings. Application manager wont launch and says " Adobe Genuine Software Validation Failure. The product you are trying to install is not Adobe Genuine Software and appears to be counterfeit/ What is the most efficient way to get back to work?
    Windows 7 64 bit

    Please try the following document:
    http://helpx.adobe.com/x-productkb/global/digital-certificate-revoked-aam.html

  • I updated my iTunes on Friday and it won't open. I'm getting an error message that I need to reinstall something. What could this be? Please help.

    I was on my laptop Friday evening listening to my iTunes. A window popped up saying there's an update for iTunes. I start downloading the update. After it finished downloading, I closed iTunes out then went to open it back up. That's when I got an error message saying that something wasn't installed properly and that I need to reinstall it. What would cause this and how can I fix this problem??

    If this is an iCloud account the Outbox only appears when sending an email, so if it is still trying I suppose it should be showing now (not sure though, hard to replicate this)
    What type of email account?

  • I can't sync my iPod to my computer it says that the Apple Mobile Device is not started and I tried everything, what can I do to get it back to normal so I can use it like I used to?

    What can I do so that I can sync my iPod like I used to???

    See:
    iPhone, iPad, iPod touch: How to restart the Apple Mobile Device Service (AMDS) on Windows

  • Unable to get the selected from table when AM Pooling is disabled

    Hi,
    I have created a EO and VO for EMPLOYEE table and dragged on to pagefragment as ADF table. RowSelection property is set as Single.
    It is displaying the data in the table. I have written below method which should be invoked on selection of a row.
    It should give the Firstname and LastName column values of the selected row.
    public void onSelectTable(SelectionEvent selectionEvent)
    RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys();
    Iterator selectedEmpIter = selectedEmps.iterator();
    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding empIter = bindings.findIteratorBinding("EmployeeVOIterator");
    RowSetIterator empRSIter = empIter.getRowSetIterator();
    while(selectedEmpIter.hasNext()){
    Key key = (Key)((List)selectedEmpIter.next()).get(0);
    Row selRow = empRSIter.getRow(key);
    String firstName = selRow.getAttribute("FirstName").toString();
    String lastName = selRow.getAttribute("LastName").toString();
    This method is working fine.
    But I have disabled the Application Module Pooling and tried in local machine(AM Configuration -> Pooling and Scalability -> Uncheck Enable Application Module Pooling).
    Then it is not workinng. it is returning null to selRow. Ideally it should work.
    Can any one pls suggest why it is not working when Application Module Pooling is disabled?
    Regards,
    Vinod

    Which jdve version do you use?
    What is the whole use case?
    I don't understand why you make it so complicated when the framework gives you what you like fro free. If you leave the selectionListener like it was when you dropped the table onto the page the framework handles the selection for you. If you like the name and first name of hte selected row you can drag the name, firstname from the VO onto the table (even if you don't want to see it, dorp it an e.g. inputText) and drop it onto the page. This will create the needed binding for you in the pagedef file. as you don't want to see the inputtext components switch into source mode for the page and remove the components. Removing components in source mode will keep the bindings, whereas if you remove them in design mode the bindings are removed too.
    Now, if you select a row in the table, the attributes for name, firstname automatically getting the correct values assigned.
    If you like to get to them from a mangaed bean you should read http://www.oracle.com/technetwork/developer-tools/adf/learnmore/23-generic-table-selection-listener-169162.pdf which shows you how to first use the default selectionListener and then do something else with the row (if you like).
    Timo

  • How do I get Mail address list (contacts) back in the composition toolbar like it was in Mavericks?

    I just upgraded to OS 10.10 on my Mac Mini.  In the older versions of Mail there was a 'Contacts' button in the toolbar when composing an email.  If selected, you could choose any number of addresses to include in the address fields.  It was simple to use, especially by holding down the 'open apple' key to select multiple addresses.  I didn't use address groups, because my email lists varied greatly.
    It is gone and I can't find how to include it in the toolbar.  It seems to have been replaced with a 'plus' sign that opens up the contact list.  I have not been able to figure out how to replicate the older process with this new 'plus' option.  I've tried the Mail help, but found it lacking.
    Please tell me there is a way to bring this feature back so I don't have to switch to another Mail application.

    Solved it. You move the reload and stop buttons to the right of the address bar. They have to be in that order. Then when you hit done on the customize windows they become part of the address bar.

  • How to get count of member

    hi 
    i have 2 table like this
    table1
    memberid     name  
    1                    roy
    2                    cartrie
    table2
    memberid            name               location
    1                        roy                             nj
    1                        roy                             tx
    2                      cartrie                          va
    now i want to select member from table 1 ,which has more than 1  same record with distinct location, in this case its member id 1,
    i am using query like
    select * from table1 a join table 2 b
    on a.memberid = b.memberid
    and a.name = b.name
    having count(distinct(location))>1
    but its not getting me correct result
    any help

    If you want member details alone use this
    select *
    from table1 t
    where exists(
    select 1
    from table 2
    where memberid = t.memberid
    group by memberid
    having count(distinct location) > 1
    and in case you want location details also use this
    select memberid,name,location
    from
    select a.memberid, a.name , b.location,
    count(b.location) over (partition by a.memberid) AS Occ
    from table1 a join table 2 b
    on a.memberid = b.memberid
    and a.name = b.name
    )t
    where Occ > 1
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • What is best method for getting most capacity when burning DVDs?

    Supposedly there's 4.7 gigs on your average one layer DVD that you get in a spindle at the office supply store, but I've never got that much on one.
    This Apple error message is frustratingly backwards and rediculous:
    "Files 001 is too large to fit on disc. Remove some files and try again."
    I don't want to take files out one at a time and try again and again and again and again. I want the exact amount of space available when I insert the DVD. Is this too complicated for a computer company like Apple to figure out?
    What do you guys do to streamline? Partitions? How big? TIA!

    You are falling for the same old Madison Avenue hype that affects all computers and computer storage devices. Salesmen think that a megabyte is 1 million bytes, but in reality, all computers consider a megabyte to be 1024,000,000 bytes. This leads to the common problem of not actually getting 80GB with an 80GB drive (actually formats to something like 74GB). A 1TB drive actually formats to 931GB.
    A 4.7GB DVD actually holds 4.37GB of data. A Dual Layer 8.5GB DVD (sometimes referred to as DV9) actually holds about 7.9GB of data. In addition, a very small portion of every disk is used to keep track of the files on the disk.
    Mac, Windows, Linux - no operating system agrees with Salesmen
    Message was edited by: dechamp

  • I can't download the Kindle app on my IPAD because Chinese Store doesn't have Kindle app. I am living in USA now, so what can I do to get a kindle app on IPAD?

    I can't download the Kindle app on my IPAD because Chinese Store doesn't have Kindle app. I am living in USA now, so what can I do to get a kindle app on IPAD? Can I change the store from Chinese Store to American Store?

    Open App store app. On the main page scroll to the bottom. You will see your Apple ID. Click on it...then click on Open Apple ID. You should be able to change store.

Maybe you are looking for

  • Reviews in other languages

    Hi all! For many not-so-popular apps in the App Store there are no reviews in my native language (Spanish). This is probably the same in most languages, except in English, as it has a larger number of users. So, wouldn't it be great if the App Store

  • Pdf's suddenly not opening!

    hi all, I have not been able to open pdf's on my macbook pro for over a month. I have osx 10.6.8.  Suddenly, pdf's open but the screen is black. I 've gone to the adobe website and downloaded the latest update several times. I'm wondering if there wa

  • How to set the title of an urxvt window?

    Hello, I have read the manpage and FAQ on the urxvt website, but my problem persists: When I try to set the title of an urxvt window, for example: $ urxvt -title test then the new window shows for a second the title "test" and then switches  to "user

  • File Sender adapter , FCC Multiple levels

    Hi Experts, I have gone thru forum, but I could not find exact information. Scenaio: Outbound, XI receives flat file and has to convert flat file to XMl file. Below is the structure of flat file created in XI. <MT>     -----<FileHeader>     -----</Fi

  • Is it safe to store my macbook air on its end?

    I have limited space and was hoping it would be "safe"to store my MacBook Air on it's end (vs flat)?  If so, any end?  I'm thinking that you carry it around in a messenger bag or something and it is upright, so it probably is safe, but not sure for a