Number of records in 30 minutes interval.

Hi All,
I am trying to find number of records in 30 minutes of interval. Being said that, i am trying to find out number of records i am getting in 30 minutes. In my table i have a column called "Last_UPDATE_DATE" with date and time. Can somebody help me, possible way to achive. I tried to think through on how to get, but not getting required information.

And this is yet another solution:
with timeranges as
select trunc(sysdate)+(level-1)*(30/24/60) starttime
     , trunc(sysdate)+(level)*(30/24/60) endtime
  from dual connect by level <= (24*2)
select TO_CHAR(b.starttime, 'MM/DD/YYYY HH24:MI:SS') starttime
    ,  TO_CHAR(b.endtime, 'MM/DD/YYYY HH24:MI:SS') endtime
    , (select count(*)
         from abc a
        where a.last_update_date > b.starttime
          and a.last_update_date <= b.endtime
      ) cnt
  from timeranges b
group by b.starttime, b.endtime
order by b.starttime;
STARTTIME           ENDTIME                    CNT
08/29/2013 00:00:00 08/29/2013 00:30:00          7
08/29/2013 00:30:00 08/29/2013 01:00:00         13
08/29/2013 01:00:00 08/29/2013 01:30:00          0
08/29/2013 01:30:00 08/29/2013 02:00:00          0
08/29/2013 02:00:00 08/29/2013 02:30:00          0
08/29/2013 02:30:00 08/29/2013 03:00:00          0
08/29/2013 03:00:00 08/29/2013 03:30:00          0
08/29/2013 03:30:00 08/29/2013 04:00:00          0
08/29/2013 04:00:00 08/29/2013 04:30:00          0
08/29/2013 04:30:00 08/29/2013 05:00:00          0
08/29/2013 05:00:00 08/29/2013 05:30:00          0
08/29/2013 05:30:00 08/29/2013 06:00:00          0
08/29/2013 06:00:00 08/29/2013 06:30:00          0
08/29/2013 06:30:00 08/29/2013 07:00:00          0
08/29/2013 07:00:00 08/29/2013 07:30:00          0
08/29/2013 07:30:00 08/29/2013 08:00:00          0
08/29/2013 08:00:00 08/29/2013 08:30:00          0
08/29/2013 08:30:00 08/29/2013 09:00:00          0
08/29/2013 09:00:00 08/29/2013 09:30:00          0
08/29/2013 09:30:00 08/29/2013 10:00:00          0
08/29/2013 10:00:00 08/29/2013 10:30:00          0
08/29/2013 10:30:00 08/29/2013 11:00:00          0
08/29/2013 11:00:00 08/29/2013 11:30:00          0
08/29/2013 11:30:00 08/29/2013 12:00:00          0
08/29/2013 12:00:00 08/29/2013 12:30:00          0
08/29/2013 12:30:00 08/29/2013 13:00:00          0
08/29/2013 13:00:00 08/29/2013 13:30:00          0
08/29/2013 13:30:00 08/29/2013 14:00:00          0
08/29/2013 14:00:00 08/29/2013 14:30:00          0
08/29/2013 14:30:00 08/29/2013 15:00:00          0
08/29/2013 15:00:00 08/29/2013 15:30:00          0
08/29/2013 15:30:00 08/29/2013 16:00:00          0
08/29/2013 16:00:00 08/29/2013 16:30:00          0
08/29/2013 16:30:00 08/29/2013 17:00:00          0
08/29/2013 17:00:00 08/29/2013 17:30:00          0
08/29/2013 17:30:00 08/29/2013 18:00:00          0
08/29/2013 18:00:00 08/29/2013 18:30:00          0
08/29/2013 18:30:00 08/29/2013 19:00:00          0
08/29/2013 19:00:00 08/29/2013 19:30:00          0
08/29/2013 19:30:00 08/29/2013 20:00:00          0
08/29/2013 20:00:00 08/29/2013 20:30:00          0
08/29/2013 20:30:00 08/29/2013 21:00:00          0
08/29/2013 21:00:00 08/29/2013 21:30:00          0
08/29/2013 21:30:00 08/29/2013 22:00:00          0
08/29/2013 22:00:00 08/29/2013 22:30:00          0
08/29/2013 22:30:00 08/29/2013 23:00:00          0
08/29/2013 23:00:00 08/29/2013 23:30:00          0
08/29/2013 23:30:00 08/30/2013 00:00:00          0
Regards.
Alberto

Similar Messages

  • Number of records being pulled from OLAP/ SQL in BPC 5.1

    Hello BPC gurus,
                         We are experience performance issues with EVDRE.basically the report errors out and the error log states " Decompressing request failed". We are in BPC 5.1
           We were trying to understand how many number of records the evdre is pulling from from OLAP / database  so that we can look into some fine tuning opportunities of the EVDRE. 
          In the BI world we have RSRT where in which we can view the number of records from database, number of records transferred. Is there any such feature in BPC, where in which we can information on record counts.
    We have turned on the error logs , but none of them give us an idea of the record count.
    Appreciate your help in advance.
    Thanks
    sai

    Hi Sorin,
                   Thank you very much for getting to me on my clarificaiton on the record count. As per your suggestion, we have already looked into this OSS note, and changed the entries in the table. After making these changes, the queries that normally execute in 1 min, now take 30 minutes to complete. Believe this was the observation also in some of the threads related to this issue. 
    You had mentioned that there might be an issue with the communication between application server  and BPC Client. or SQE generating MDX query.  Can you please give us some pointers on how to investigate this. Have turned on error logs evdataserver_debug.txt & EVDATASERVER_TRACE.txt on the file server,  but i believe there is an OSS note 1311019, that talks about these logs not workign with SP9.
    If you can guide us in the folllowing that would be helpful
    1  how to bebug this issue that we are currently facing.
    2. How does the concept of compressing / decompressing work in BPC.
    Thanks
    sai

  • Limiting the number of records to be pooled from the database in DB adapter

    Hi
    I am using Oracle SOA 11g and Jdeveloper 11.1.1.4
    My requirement is i need to poll on a database and process the records. I have a primary key on which i can do the polling.
    My challenge over here is, I need to pick up one and only one record per 1 minute.
    I tried to acheive this using the polling options
    Database Rows per Transaction =1
    Polling Frequency =60 Seconds
    But when i deploy and run this process it is picking up all the records based on the criteria but not a single record.
    Please help on how we can acheive the above requirement.
    Thanks
    Vamsi

    I guess you haven't changed the setting in your schema file.
    You need to set the Database rows per XML document to 1, you can see this setting in screen number 10, while configuring database adapter.
    Have you ?
    http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_db.htm#CHDEFACG
    *7) Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.*
    Thanks,
    Vijay

  • Reg Number of Records

    Hi all,
    i need to see number of records in the lead object currently..
    if its through reports how could the report be designed..
    any other ways

    Hi Uday,
    You can simply create a new report from the Leads Reporting Subject area. Add the column "# of Leads" from the Lead Metrics section. When you preview and/or run this report, it will show you the total number of leads in the system up to the minute.
    Regards,
    Cameron

  • How to find the number of records per months  in cube

    Hi,
      how to find the number of records per months for my all cubes?
      Can i use the ListCube transaction to find totl number f records per cube monthwise ?
    Jimmy

    Hi,
    Here is a program to generate no of records and list of ODS and Cubes in Active version.Schedule this program in background and create a cube to load this information and schedule to the data from the file generated by the program. Schedule this all per you requirement.
    1.Copy the code into your Z<programname> from Se38.
    2.change the FILENAME in CALL FUNCTION 'GUI_DOWNLOAD' in the program to the location from where you can pick the information to load data to cube(eg Application server).
    3.Save program.
    4.Schedule the program in background as required
    5.Create cube with infoobjects to hold no of records and Infoprovider name
    6.Load this cube based on event after the program job is done.
    Hence you can report on this cube to see no of records in  CUBE or ODS in your box.
    Please find the code below.
    Cheers,
    Kavitha Kamesh.
    types: begin of itabs ,
          tabname type dd02l-tabname,
          end of itabs.
    data: itab type itabs occurs 0 with header line.
    data: counter type i.
    data: begin of itab1 occurs 0,
    tabname type dd02l-tabname,
    counter type i,
    end of itab1.
    DATA: ITABTABNAME TYPE STRING.
    DATA: LENGTH TYPE I.
    DATA: OBJECT(30).
    data: str(6) type c.
    select  tabname from dd02l into table itab where ( tabname LIKE  '/BIC/F%' or tabname LIKE  '/BIC/A%00' )
    and TABCLASS = 'TRANSP' and AS4LOCAL = 'A'.
    loop at itab.
      select count(*) from (itab-tabname) into counter.
      str = itab-tabname.
      if str = '/BIC/F'.
    LENGTH  = STRLEN( ITAB-TABNAME ).
      SHIFT  itab-tabname BY 6 PLACES LEFT.
    ELSEIf  str = '/BIC/A'.
      SHIFT  itab-tabname BY 6 PLACES LEFT.
      LENGTH  = STRLEN( ITAB-TABNAME ).
    LENGTH = LENGTH - 2.
    endif.
      itab1-tabname = itab-tabname(LENGTH).
      append itab1.
      itab1-counter = counter.
      clear itab-tabname.
      clear:  COUNTER.
    endloop.
    *********** itab1
    loop at itab1.
    write:/ itab1-tabname, itab1-counter.
    endloop.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                    =
        FILENAME                        = 'c:records.xls'
        FILETYPE                        = 'ASC'
    *   APPEND                          = ' '
        WRITE_FIELD_SEPARATOR           = ','
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    * IMPORTING
    *   FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab1
    *   FIELDNAMES                      =
    * EXCEPTIONS
    *   FILE_WRITE_ERROR                = 1
    *   NO_BATCH                        = 2
    *   GUI_REFUSE_FILETRANSFER         = 3
    *   INVALID_TYPE                    = 4
    *   NO_AUTHORITY                    = 5
    *   UNKNOWN_ERROR                   = 6
    *   HEADER_NOT_ALLOWED              = 7
    *   SEPARATOR_NOT_ALLOWED           = 8
    *   FILESIZE_NOT_ALLOWED            = 9
    *   HEADER_TOO_LONG                 = 10
    *   DP_ERROR_CREATE                 = 11
    *   DP_ERROR_SEND                   = 12
    *   DP_ERROR_WRITE                  = 13
    *   UNKNOWN_DP_ERROR                = 14
    *   ACCESS_DENIED                   = 15
    *   DP_OUT_OF_MEMORY                = 16
    *   DISK_FULL                       = 17
    *   DP_TIMEOUT                      = 18
    *   FILE_NOT_FOUND                  = 19
    *   DATAPROVIDER_EXCEPTION          = 20
    *   CONTROL_FLUSH_ERROR             = 21
    *   OTHERS                          = 22
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • How to find the number of records in ods?

    how to find the number of records in ods?
    Pls suggest the solution apart going to the table of ods and seeing the number of records.
    Is there any program or function module to see the number of records in ods?
    For eg: SAP_INFOCUBE_DESIGNS is a program which gives the detail (number of records) of infocube.

    Hi,
    I was looking at this and found the following tables that may be of help.
    One of these tables will include a summary of the record count of all the tables in your system based on the last time each table had it's database statistics calculated:
    DBSTATTADA
    DBSTATTDB2
    DBSTATTDB4
    DBSTATTDB6
    DBSTATTINF
    DBSTATTMSS
    DBSTATTORA
    We run on an Oracle database so the table record counts can be taken from DBSTATTORA. Type in AZ in table selection field in SE16 to restrict the output to ODS (or DSO) tables only.
    The record count is at the time indicated in the timestamp field. Obviously this is not real time but should not be too out of date - if it is you may be having performance issues and should get your DBA / Basis to run a full refresh of DB stats.
    Hope this helps, alhtough not real time the table should give you a decent indication of the size of all your ODS objects (or any other table for that matter!)

  • 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

  • SQL help: return number of records for each day of last month.

    Hi: I have records in the database with a field in the table which contains the Unix epoch time for each record. Letz say the Table name is ED and the field utime contains the Unix epoch time.
    Is there a way to get a count of number of records for each day of the last one month? Essentially I want a query which returns a list of count (number of records for each day) with the utime field containing the Unix epoch time. If a particular day does not have any records I want the query to return 0 for that day. I have no clue where to start. Would I need another table which has the list of days?
    Thanks
    Ray

    Peter: thanks. That helps but not completely.
    When I run the query to include only records for July using a statement such as following
    ============
    SELECT /*+ FIRST_ROWS */ COUNT(ED.UTIMESTAMP), TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD') AS DATA
    FROM EVENT_DATA ED
    WHERE AGENT_ID = 160
    AND (TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY')+(ED.UTIMESTAMP/86400)), 'MM/YYYY') = TO_CHAR(SYSDATE-15, 'MM/YYYY'))
    GROUP BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD')
    ORDER BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD');
    =============
    I get the following
    COUNT(ED.UTIMESTAMP) DATA
    1 07/20
    1 07/21
    1 07/24
    2 07/25
    2 07/27
    2 07/28
    2 07/29
    1 07/30
    2 07/31
    Some dates donot have any records and so no output. Is there a way to show the missing dates with a COUNT value = 0?
    Thanks
    Ray

  • Hw to find total number of records

    Hi All,
    Can anyone help from these
    1. how to find total number of reports for a particular cube/ods... need step - step solution
    2. how to find total number of records for a particular Cube and ODS and Aggr's to till date.
    3.what is sandbox,mirror sys,instance of a sys..?
    4.what r TWS(Tivoli Workload Scheduler) jobs? how these r different to standard schedulers?
    Thanks in ADv
    Linda

    Hello Linda,
    As you have lots of answers on first 2 so i'll start from 3rd onward.
    3. Sandbox is mostly practice system where you can do all kind of R&D, mirror sys can be mirror image of any system depends on the organization and instance of system is again mirror image of one system.
    4. TWS is third party tool for scheduling which doesn't come along with SAP like standard scheduler as TWS has been prepared specially for this purpose so it has some more features than standard.
    Hope it helps.
    San.

  • How to find total number of records in a BDoc?

    Dear all,
    I have replicated about BP 1088 records from ISU into CRM system with block size 100. Technically on SMW01, for each successfully processed BDoc, there will be 100 records (corresponds to 100 block size). But due to some failed BDocs, not all "successfully" BDocs will have 100 records each, some may have only 1 record inside...or 30...or 88 for example. So, may i know how to find or is there a report i can look into to find the total number of records clearly shown for each of the successfully processed green status BDocs???
    Please help and points will be rewards!!
    Thank You
    Best Regards,
    CK

    I am just showing this to show how to get the rowcount along with the cursor, if the program has so much gap of between verifying the count(*) and opening the cursor.
    Justin actually covered this, he said, oracle has to spend some resources to build this functionality. As it is not most often required, it does not makes much sence to see it as a built-in feature. However, if we must see the rowcount when we open the cursor, here is a way, but it is little bit expensive.
    SQL> create table emp_crap as select * from emp where 1 = 2;
    Table created.
    SQL> declare
      2   v_cnt     number := 0;
      3   zero_rows         exception;
      4  begin
      5    for rec in (select * from (select rownum rn, e.ename from emp_crap e) order by 1 desc)
      6     loop
      7        if v_cnt = 0 then
      8           v_cnt := rec.rn;
      9        end if;
    10     end loop;
    11     if v_cnt = 0 then
    12        raise zero_rows;
    13     end if;
    14   exception
    15    when zero_rows then
    16      dbms_output.put_line('No rows');
    17   end;
    18  /
    No rows
    PL/SQL procedure successfully completed.
    -- Now, let us use the table, which has the data
    SQL> declare
      2   v_cnt     number := 0;
      3   zero_rows         exception;
      4  begin
      5    for rec in (select * from
      6          (select rownum rn, e.ename from emp e)
      7          order by 1 desc)
      8     loop
      9        if v_cnt = 0 then
    10           v_cnt := rec.rn;
    11           dbms_output.put_line(v_cnt);
    12        end if;
    13     end loop;
    14     if v_cnt = 0 then
    15        raise zero_rows;
    16     end if;
    17   exception
    18    when zero_rows then
    19      dbms_output.put_line('No rows');
    20   end;
    21  /
    14
    PL/SQL procedure successfully completed.Thx,
    Sri

  • How to limit the number of records in WebI Report

    Hi,
    I have a requirement where I need to display the WebI Report data only if the number if record is less than 65k.
    Incase if the records are more than 65k then the report should be blank and a text message needs to be displayed.
    The client dont want to set the number of records either in universe or at the edit query at the report. They want to limit once the report is executed.
    Please let me know if its possible to do it at the report level.
    Thanks in advance!!
    Best Regards
    SAP BO

    Optional prompts are not a problem.
    Assuming you first query uses the following SQL statement
    select a,b,c from t where x=y and z=@prompt(...)
    The query for checking the number of rows should use the following SQL code
    select count(*) from t where x=y and z=@prompt(...)
    The original query should be modified as follows
    select a,b,c from t where x=y and z=@prompt(...) AND (select count(*) from t where x=y and z=@prompt(...)) < 65000
    Regards,
    Stratos

  • CLIENT_TEXT_IO - Hanging on "PUT" for large number of records

    I have successfully used CLIENT_TEXT_IO but my users have run into an error where the Form hangs and spits out details such:
    "oracle.forms.net.HTTPNStream.doFlush"
    etc....
    This happens when the number of records in the datablock is high (ex: 70,000 recs). So my question is: Is there a limit on how many lines you can write to a file?
    I'm just creating a CSV file on the client's machine using CLIENT_TEXT_IO.PUT_LINE. It works fine on say a few thousand recs but after that it hangs.
    I'm on Oracle Application Server 10g, Release 9.0.4 on Windows Server 2003, and forms compiled using Oracle Developer Suite 9.0.4.
    Thanks,
    Gio

    Hello,
    When playing with huge data, it is better to generate the file on the A.S. then get it back to the client.
    <p>Read this article</p>
    Francois

  • Add number of records to a field

    I need to load data in BW ODS from flat file and want to populate one field ROWID which will hold record numbers starting from 1 if ODS is empty. This ROWID in ODS is used as Key field. I want to populate this ROWID based on number of records in flat file.
    If there are already records in ODS and say last record number is 10, next record number will be 11 and will populate rests one by one.
    So first I want to read ODS table if there are any records. If empty, ROWID will be populating from record 1 and if not empty, get the last ROWID and populate from next number.
    Help me with the code please?

    Hi,
    If the select count (*) is successfull then add 1 to the count then move it to the rowid column.
    SELECT COUNT(*) INTO V_COUNT FROM TABLENAME.
    IF SY-SUBRC NE 0.
    * If no records found then set the counter to 1.
      v_count = 1.
    ELSE.
    * If the record is found then set the row id of the table by adding 1.
      TABLENAME-ROWID = V_COUNT + 1.
    ENDIF.
    **If you want to insert multiple records within a loop.
    LOOP AT ITAB.
    * Increment the counter.
      V_COUNT = V_COUNT + 1.
    * Set the row id.
      TABLENAME-ROWID = V_COUNT.
    ENDLOOP.
    Hope this helps.
    Thanks
    Naren

  • How to calculate the number of records in Multiprovider

    Hi Experts
    I have created a report based on the multiprovider (Consist of Cube and ODS)
    I need count the number of records inside the multiprovider, how can i do it in the reporting level
    Regards
    Santosh

    Hi,
    You can use calculated key figure with replacement path variable.
    Follow This:
    1) From the context menu of the Key Figure directory, choose New Calculated Key Figure.
    2) From the context menu for the Formula Variable, choose New Variable.
    3) Choose the Processing type as Replacement Path.
    4) In the next screen, select the Characteristic Info Object based on which the number of documents is to be displayed in the report (For example: Document Number / Order Number).
    5) Choose Next.
    In the Replace Variable with drop down box, choose Attribute Value.
    In the Attribute drop down, select Characteristic Reference (Constant 1).
    6)Choose Next.
    On the Save Variable page, an overview of the settings made for the variable will be displayed.
    Confirm the entries and Choose Finish.
    7) If the Formula variable is directly assigned to the Calculated Key Figure, a warning Calculated Key Figure is not defined correctly will be displayed while executing the Query.
    8) Properties of Calculated Key Figure dialog box, assign a Technical name for the CKF.
    9) set the Time of Calculation to After Aggregation.
    Hope this will help you.
    Cheers,
    DK
    Edited by: Debasish Khaitan on May 14, 2009 1:03 PM

  • Data Load : Number of records count

    Hi Experts,
              I want to document number of records transferred to BW during an infopackage execution.
              I want to automate the process by running a report in background which will fetch a data from SAP tables about number of records been transfered by all my InfoPackage .
    I would like to know how should I proceed with.
             I want to know some System tables which contains same data as that of RSMO transaction displays to us.
    Kindly help with valuable replies.

    HI,
    inorder to get the record counts report you need to create a report based on below tables
    rsseldone, rsreqdone, rsldpiot, rsmonfact
    Check the below link which explain in detail with the report code as well.
    [Data load Quick Stats|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90215bba-9a46-2a10-07a7-c14e97bdb764]
    This doc also explains how to trigger a mail with the details to all.
    Regards
    KP

Maybe you are looking for

  • Using time capsule to share internet connection with a pc via ethernet

    Hi, I've recently acquired a time capsule and was wondering if i could use it to share a wireless internet connection via ethernet to my non-wireless (windows 7) pc? My current situation is that i have a wireless modem/router that shares my internet

  • How do I get the Toolbars and palletes to show/register my selections?

    Palettes and toolbar do not register the correct information ie.Font size, swatch selections etc. Example, I select a sentence or word that is 10 pt, I move to & select something that is 24 pt and it still shows 10pt. Example, I go to the 'tables' ta

  • Burning photos on to DVD from Photoshop Elements 12

    I have successfully copied photos from PSE12 on to a DVD.  I want to use it for a slideshow presentation.  Unfortunately all the vertical pictures come out horizontally on the DVD!  I don't have the option of rotating when I click on properties.  The

  • CREATE PDF & CONVERT TO EDITABLE

         ANYONE CARE TO EXPLAIN STEP BY STEP TO AN OLD 74 YR. OLD DUDE ( WHO IS GETTING DU,MBER ) BY THE Day how to create & convert a file using  adobe ??   i purchased the  $2 a month program & did one 3 months ago and it ran away & hid !!             

  • Regarding Transportation Cost

    Hi, I have a doubt regarding how the transportation cost is included or excluded in the Invntory. e.g Material Cost: 10 $ Transportation Cost: 1 $ Now if I calculate the cost of the material along with the Transportation cost the inventory value will