Rows per hour

Dear All,
I have a table with 2 rows and one has varchar type data and the other is the time stamp (04/02/2013 19:44:40).
Now I want to write a query to count number of rows per hour in the table with date ...strcutre is as follows :
ddata varchar2(20)
ddate date with timestamp ;
Require the output as follows :
March 28th 12 AM - 20
March 28th 1 AM - 40
March 28th 2 AM - 40
where March 28th 12 AM is the date with time
and 20 - number of rows in that date and in that hour..
Please advise..

Hi,
936074 wrote:
Dear All,
I have a table with 2 rows and one has varchar type data and the other is the time stamp (04/02/2013 19:44:40).
Now I want to write a query to count number of rows per hour in the table with date ...strcutre is as follows :
Whenever you have a problem, post CREATE TABLE and INSERT statements for a little sample data, and the results you want from that data.
>
ddata varchar2(20)
ddate date with timestamp ;What is this? DATE and TIMESTAMP are 2 different datatypes.
If ddate is a DATE, then it is not a TIMESTAMP.
If ddate is a TIMESTAMP, then it is not a DATE.
Require the output as follows :
March 28th 12 AM - 20
March 28th 1 AM - 40
March 28th 2 AM - 40
where March 28th 12 AM is the date with time
and 20 - number of rows in that date and in that hour..
Please advise..Here's one way:
SELECT    TRUNC (ddate, 'HH')           AS hour
,       COUNT (*)                AS cnt
FROM       table_x
GROUP BY  TRUNC (ddate, 'HH')
ORDER BY  TRUNC (ddate, 'HH')     -- Or hour
;TRUNC (ddate) will return a DATE, regardless of whether ddate is a DATE or a TIMESTAMP.

Similar Messages

  • Q: Count concurrent sessions per hours in a specified interval

    Hi,
    I have this table wich contains SESSIONID, CREATEDATE, LASTCHECKDATE, EXPIREDATE, PARTNERID
    We need to make a query that would return the number of max concurent session per hours for the interval specified.
    For example, for last week, on a per hour bases, or day bases, the top concurent session for each hour or day depending on the report.
    can do the number of new session on each hour with this query;
    SELECT TO_CHAR(createdate, 'YYYY/MM/DD HH24') ||'h ' start_time, COUNT( SESSIONID ) new_sessions, name || ' {' || partnerid || '}' as Partner
    FROM uws
    WHERE expiredate IS NOT NULL
    and partnerid=25
    and TO_CHAR(createdate,'YYYY/MM') = '2010/05'
    group by TO_CHAR(createdate, 'YYYY/MM/DD HH24') ||'h ', name || ' {' || partnerid || '}'
    ORDER BY 1 DESC;
    I think I should use MAX(count(sessionid)) and probably some DECODE when c1 between createdate and lastcheckdate...
    This would need to run on sqlplus from a shell script if possible and even chart it on Google Charts.
    Any help appreciated, note that I am not an Oracle expert..
    Edited by: user11954725 on Jul 19, 2010 5:55 PM

    Thanks Frank,
    I think we are very close to the solution I am looking for now;
    Here is the script you gave me (with little modifications) and the output;
    WITH     all_hrs          AS
         SELECT     min_hr + ((LEVEL - 1) / 24)     AS period
         ,     min_hr + (LEVEL / 24)     AS next_period
         FROM     (
                   SELECT TRUNC (MIN (createdate), 'HH')     AS min_hr
                   ,     TRUNC (MAX (LASTHEARTBEATDATE), 'HH')     AS max_hr
                   FROM     userwebsession
    where createdate <= TO_DATE('07-MAY-2010 00.00.00','DD-MON-RR HH24.MI.SS')
    and LASTHEARTBEATDATE >= TO_DATE('07-MAY-2010 23.59.59','DD-MON-RR HH24.MI.SS')
         CONNECT BY     LEVEL <= 1 + (24 * (max_hr - min_hr))
    SELECT     TO_DATE(a.period,'DD-MON-YY hh24') "Period"
    ,     COUNT (u.userwebsessionid)     AS sessions
    FROM          all_hrs     a
    LEFT OUTER JOIN     userwebsession     u     ON     a.period     <= u.LASTHEARTBEATDATE
                        AND     u.createdate     <= a.next_period
    group by a.period
    ORDER BY a.period
                   SELECT TRUNC (MIN (createdate), 'HH')     AS min_hr
                   ,     TRUNC (MAX (LASTHEARTBEATDATE), 'HH')     AS max_hr
                   FROM     SPEAKESL.userwebsession
    where createdate <= TO_DATE('07-MAY-2010 00.00.00','DD-MON-RR HH24.MI.SS')
    and LASTHEARTBEATDATE >= TO_DATE('07-MAY-2010 23.59.59','DD-MON-RR HH24.MI.SS');
    produce output;
    Period SESSIONS
    19-APR-10 15
    19-APR-10 12
    19-APR-10 15
    19-APR-10 18
    19-APR-10 6
    19-APR-10 7
    19-APR-10 6
    19-APR-10 16
    19-APR-10 18
    19-APR-10 21
    19-APR-10 19
    19-APR-10 24
    19-APR-10 15
    19-APR-10 7
    19-APR-10 10
    19-APR-10 6
    19-APR-10 9
    19-APR-10 7
    19-APR-10 6
    20-APR-10 5
    20-APR-10 5
    20-APR-10 6
    20-APR-10 7
    20-APR-10 7
    20-APR-10 13
    20-APR-10 7
    20-APR-10 6
    20-APR-10 4
    20-APR-10 8
    20-APR-10 8
    20-APR-10 6
    20-APR-10 14
    20-APR-10 7
    20-APR-10 5
    20-APR-10 14
    20-APR-10 9
    20-APR-10 9
    20-APR-10 7
    20-APR-10 5
    20-APR-10 4
    20-APR-10 5
    20-APR-10 3
    20-APR-10 4
    21-APR-10 4
    21-APR-10 5
    21-APR-10 5
    21-APR-10 5
    21-APR-10 5
    21-APR-10 5
    21-APR-10 6
    21-APR-10 7
    21-APR-10 8
    21-APR-10 14
    21-APR-10 7
    21-APR-10 8
    21-APR-10 4
    21-APR-10 6
    21-APR-10 10
    21-APR-10 26
    21-APR-10 14
    21-APR-10 10
    21-APR-10 12
    21-APR-10 6
    21-APR-10 7
    21-APR-10 6
    21-APR-10 5
    21-APR-10 6
    22-APR-10 7
    22-APR-10 7
    22-APR-10 7
    22-APR-10 6
    22-APR-10 7
    22-APR-10 8
    22-APR-10 9
    22-APR-10 5
    22-APR-10 21
    22-APR-10 7
    22-APR-10 34
    22-APR-10 29
    22-APR-10 29
    22-APR-10 10
    22-APR-10 21
    22-APR-10 17
    22-APR-10 50
    22-APR-10 43
    22-APR-10 43
    22-APR-10 26
    22-APR-10 13
    22-APR-10 16
    22-APR-10 15
    22-APR-10 35
    23-APR-10 6
    23-APR-10 3
    23-APR-10 4
    23-APR-10 4
    23-APR-10 2
    23-APR-10 3
    23-APR-10 2
    23-APR-10 2
    23-APR-10 4
    23-APR-10 11
    23-APR-10 6
    23-APR-10 14
    23-APR-10 16
    23-APR-10 20
    23-APR-10 11
    23-APR-10 20
    23-APR-10 43
    23-APR-10 30
    23-APR-10 46
    23-APR-10 41
    23-APR-10 26
    23-APR-10 50
    23-APR-10 51
    23-APR-10 66
    24-APR-10 4
    24-APR-10 2
    24-APR-10 2
    24-APR-10 2
    24-APR-10 2
    24-APR-10 2
    24-APR-10 2
    24-APR-10 2
    24-APR-10 2
    24-APR-10 2
    24-APR-10 5
    24-APR-10 5
    24-APR-10 3
    24-APR-10 2
    24-APR-10 3
    24-APR-10 5
    24-APR-10 6
    24-APR-10 5
    24-APR-10 4
    24-APR-10 3
    24-APR-10 4
    24-APR-10 4
    24-APR-10 2
    24-APR-10 2
    25-APR-10 2
    25-APR-10 2
    25-APR-10 2
    25-APR-10 2
    25-APR-10 2
    25-APR-10 2
    25-APR-10 3
    25-APR-10 3
    25-APR-10 4
    25-APR-10 4
    25-APR-10 4
    25-APR-10 3
    25-APR-10 2
    25-APR-10 2
    25-APR-10 5
    25-APR-10 6
    25-APR-10 4
    25-APR-10 5
    25-APR-10 4
    25-APR-10 5
    25-APR-10 6
    25-APR-10 5
    25-APR-10 3
    25-APR-10 3
    09-MAY-10 7
    09-MAY-10 8
    09-MAY-10 8
    09-MAY-10 6
    09-MAY-10 8
    09-MAY-10 8
    09-MAY-10 5
    09-MAY-10 5
    09-MAY-10 5
    09-MAY-10 5
    09-MAY-10 5
    09-MAY-10 5
    09-MAY-10 5
    09-MAY-10 5
    09-MAY-10 5
    10-MAY-10 7
    10-MAY-10 6
    10-MAY-10 6
    10-MAY-10 7
    10-MAY-10 5
    10-MAY-10 5
    10-MAY-10 5
    10-MAY-10 5
    10-MAY-10 6
    10-MAY-10 12
    10-MAY-10 12
    10-MAY-10 20
    10-MAY-10 12
    10-MAY-10 13
    10-MAY-10 14
    10-MAY-10 17
    10-MAY-10 12
    10-MAY-10 15
    10-MAY-10 14
    10-MAY-10 12
    10-MAY-10 8
    10-MAY-10 8
    10-MAY-10 7
    10-MAY-10 7
    11-MAY-10 7
    11-MAY-10 7
    11-MAY-10 8
    11-MAY-10 8
    11-MAY-10 7
    11-MAY-10 30
    11-MAY-10 37
    11-MAY-10 43
    11-MAY-10 22
    11-MAY-10 14
    11-MAY-10 17
    11-MAY-10 19
    11-MAY-10 26
    11-MAY-10 20
    11-MAY-10 20
    11-MAY-10 30
    11-MAY-10 14
    11-MAY-10 18
    11-MAY-10 11
    11-MAY-10 12
    11-MAY-10 8
    11-MAY-10 8
    11-MAY-10 10
    11-MAY-10 8
    12-MAY-10 14
    12-MAY-10 12
    12-MAY-10 75
    12-MAY-10 51
    12-MAY-10 38
    12-MAY-10 39
    12-MAY-10 22
    12-MAY-10 17
    12-MAY-10 13
    12-MAY-10 12
    12-MAY-10 11
    12-MAY-10 17
    12-MAY-10 30
    12-MAY-10 28
    12-MAY-10 23
    12-MAY-10 20
    12-MAY-10 18
    12-MAY-10 12
    12-MAY-10 15
    12-MAY-10 16
    12-MAY-10 14
    12-MAY-10 28
    569 rows selected
    MIN_HR MAX_HR
    19-APR-10 12-MAY-10
    Now the output seem to produce the concurrent sessions as needed but the date range show is not exactly.
    I expect the output to display only for the range specified in parameter, which if for this example only one day.
    Probably if we ask for more that few days, we would like to display the MAX number of concurrent session for one day and the average (optional) also for that day and this for all days in the period.
    So for example based on the above output this next level report would output as follow (for period of 19-APR-10 to 27-APR-10;
    19-APR-10 24
    20-APR-10 14
    21-APR-10 26
    22-APR-10 50
    23-APR-10 66
    24-APR-10 6
    25-APR-10 6
    26-APR-10 105
    27-APR-10 44

  • How to set number of rows in "Rows Per Page Selector" in Interactive Report

    Hi Guys,
    Is there any way to set the number of rows in "Rows Per Page Selector" in Interactive Report. By default it is set to 15.
    I know one way is to change the number of rows when you are running the report and then set that as 'Default Report Setting'.
    If anybody is aware of any other way, please let me know.
    Cheers,
    Ashish Agarwal
    http://www.dbcon.com.sg

    Hi Pavel,
    can you please specify your question more clearly. If you are on NW 7.0 you can determine a number of colums for your filter item with following command:
    COLUMNS
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/85/08e241aa8e9d39e10000000a155106/content.htm
    If you meant the amount of rows within the analysis item you can use following command within your analysis item:
    BLOCK_ROWS_SIZE   (numbers of rows displayed at once)
    BLOCK_ROWS_STEP_SIZE  (numbers of rows to be scrolled for one step)
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/76/489d39d342de00e10000000a11402f/content.htm
    Brgds,
    Marcel
    Edited by: Marcel Landsfried on Feb 10, 2009 7:45 PM
    Edited due to wrong url

  • How to set the number of rows per page dynamically

    Hello all,
    i urgent need the option to set the number of rows per page dynamically.
    I've got a parameter.
    In dependence of the value of this paramter i want to set the number of rows per page of a repeating frame.
    The Reports Builder version i use is 10.1.2.0.2
    I defined a report trigger.
    My code so far:
    function R_G_BEMERKUNGFormatTrigger return boolean is
    begin
    if :vYN_Display_one_per_page = 'Y' then
    --what i've to write right here??
    return (TRUE);
    else
         return (TRUE);
    end if;
    return (TRUE);
    end;
    Can anyone help me please??
    Best regards
    Florian

    Do you just need to change back and forth between 1 and some other number? If so, you can create two identical layouts, one with the "number of rows per page" preperty (on the repeating frame) set to 1 and the other layout set to whatever. You would have to have duplicate layouts for each group you wanted to do this with. Your format trigger on the outermost master group frame where num of rows was 1 would look like:
    function M_G_ename_GRPFRFormatTrigger return boolean is
    begin
      if :vYN_Display_one_per_page = 'Y'  then
        return (TRUE);
      else
        return (FALSE);
      end if;
    end;Your format trigger on the outermost master group frame where num of rows was whatever would look like:
    function M_G_ename_GRPFR1FormatTrigger return boolean is
    begin
      if :vYN_Display_one_per_page = 'N'  then
        return (TRUE);
      else
        return (FALSE);
      end if;
      return (TRUE);
    end;

  • How I show only 20 rows per pages in a rtf report in BI Publisher 11g

    I'm making a report and i want show only 20 rows per pages in a formatt RTF. I get this with anything as a xls, xslt....
    I'm a new user....please . Any idea..???
    Thank for all.
    Edited by: 844565 on Mar 15, 2011 7:34 AM

    Instead of doing that take the url CURRENT_SERVER_URL(pre-definde BI Publsiher variable) by declaring like below
    <?param@begin:CURRENT_SERVER_URL?>
    Then subsequently add the extra patameters eg. region like below
    {$CURRENT_SERVER_URL}Data/Country.xdo&p_region={REGION} <- get this REGION value from XML
    Cheers,
    ND
    Use the "helpful" or "correct" buttons to award points to replies.

  • Hacking application id equals() to allow more than one row per "primary key"

    I have a read only entity whose primary key is not the real primary key
    on the underlying table. The result is that I get more than one row per
    "primary key". This is what I want. However KODO will not allow me do
    it, because I am storing the collection in a HashSet() and the equals()
    method on the application id object ensures that this set contains no
    duplicates (as defined by the application id). At least thats how it
    seems to behave.
    So, I have hacked the equals() method to do this:
    public boolean equals (Object ob)
    if (this == ob)
    return true;
    // Doing this because we expect more than one row from
    // REF_CODES for the same domain/shortCode combination.
    // This is ok to do (I guess?) as long as we are only
    // doing selects using this class.
    return false;
    Will this hack have any side effects? Is there another option? Like
    using a list collection? Is so, which collections are supported?
    Thanks,
    Mike.

    The "primary key" I am using it already a compound key of two columns.
    The real key on the underlying table is a three column key. But the
    problem is that the table represents two different application level
    entities. I could deal with it when I was hand-writing SQL (I could do
    a distinct for example) but now I am relying on foreign key
    relationships since I moved to JDO. Not sure what to do. Best solution
    is to rework the table, but there is a lot of legacy code (that other
    teams use and maintain) relying on this table. I guess I'll use the
    weekend for inspiration ;-)
    Steve Kim wrote:
    This sounds like a dangerous operation. Even if this works now, I
    cannot promise future compatibility... and in fact may result in bad
    data (for example in caching both at the PM and PMF level) Is there no
    other field that you can reference as part of the primary key? Primary
    Keys can be multi columned (e.g. last_name, soc_sec_number)
    Mike Hogan wrote:
    I have a read only entity whose primary key is not the real primary
    key on the underlying table. The result is that I get more than one
    row per "primary key". This is what I want. However KODO will not
    allow me do it, because I am storing the collection in a HashSet() and
    the equals() method on the application id object ensures that this set
    contains no duplicates (as defined by the application id). At least
    thats how it seems to behave.
    So, I have hacked the equals() method to do this:
    public boolean equals (Object ob)
    if (this == ob)
    return true;
    // Doing this because we expect more than one row from
    // REF_CODES for the same domain/shortCode combination.
    // This is ok to do (I guess?) as long as we are only
    // doing selects using this class.
    return false;
    Will this hack have any side effects? Is there another option? Like
    using a list collection? Is so, which collections are supported?
    Thanks,
    Mike.

  • Writing large xmltype data to UTL_FILE and setting max row per file

    Hey Gurus,
    I am trying to create a procedure (in Oracle 9i) that writes out xml data I have created into several xml files (file would probably be to large for one xml file output...I am doing this for 270,000 rows of data), setting the max rows to 1000 rows per file. I know one would have to create a looping contsruct to do this but I am just not adept enough in PL/SQL to figure it out at the moment.
    So essentially their would be some sort of loop construct and substr process that creates a file after looping through 1000 rows and then continues the count and creates a another file until all 270 xml files are created. Simple enough right...lol? Well I've tried doing this and haven't gotten anywhere. My pl/sql coding skills are too elementary I am guessing. I've only been doing this for about three months and could use the assistance of a more experienced person here.
    Here are the particulars...
    This is the xmltype view code that I used to create the xml data.
    select XMLELEMENT("macess_exp_import_export_file",
    XMLELEMENT("file_header",
    XMLELEMENT("file_information")),
    XMLELEMENT("items",
    XMLELEMENT("documents",
    (SELECT XMLAGG(XMLELEMENT("document",
    XMLELEMENT("external_reference"),
    XMLELEMENT("processing_instructions",
    XMLELEMENT("update", name)),
    XMLELEMENT("filing_instructions",
    XMLELEMENT("folder_ids",
    XMLELEMENT("folder",
    XMLATTRIBUTES(folder_id AS "id", folder_type_id AS "folder_type_id")))),
    XMLELEMENT("document_header",
    XMLELEMENT("document_type",
    XMLATTRIBUTES(document_type AS "id")),
    XMLELEMENT("document_id", document_id),
    XMLELEMENT("document_description", document_description),
    XMLELEMENT("document_date",
    XMLATTRIBUTES(name AS "name"), document_date),
    XMLELEMENT("document_properties")),
    XMLELEMENT("document_data",
    XMLELEMENT("internal_file",
    XMLELEMENT("document_file_path", document_file_path),
    XMLELEMENT("document_extension", document_extension)
    ))))from macess_import_base WHERE rownum < 270000))))AS result
    from macess_import_base WHERE rownum < 270000;
    This is the Macess_Import_Base table that I am creating xml data from
    create table MACESS_IMPORT_BASE
    MACESS_EXP_IMPORT_EXPORT_FILE VARCHAR2(100),
    FILE_HEADER VARCHAR2(20),
    ITEMS VARCHAR2(20),
    DOCUMENTS VARCHAR2(20),
    DOCUMENT VARCHAR2(20),
    EXTERNAL_REFERENCE VARCHAR2(20),
    PROCESSING_INSTRUCTIONS VARCHAR2(20),
    PATENT VARCHAR2(20),
    FILING_INSTRUCTIONS VARCHAR2(20),
    FOLDER_IDS VARCHAR2(20),
    FOLDER_ID VARCHAR2(20),
    FOLDER_TYPE_ID NUMBER(20),
    DOCUMENT_HEADER VARCHAR2(20),
    DOCUMENT_PROPERTIES VARCHAR2(20),
    DOCUMENT_DATA VARCHAR2(20),
    INTERNAL_FILE VARCHAR2(20),
    NAME VARCHAR2(20),
    DOCUMENT_TYPE VARCHAR2(40),
    DOCUMENT_ID VARCHAR2(64),
    DOCUMENT_DESCRIPTION VARCHAR2(200),
    DOCUMENT_DATE VARCHAR2(100),
    DOCUMENT_FILE_PATH VARCHAR2(200),
    DOCUMENT_EXTENSION VARCHAR2(200)
    Directory name to write output to "DIR_PATH"
    DIRECTORY PATH is "\app\cdg\cov"
    Regards,
    Chris

    I also would like to use UTL_FILE to achieve this functionality in the procedure.

  • Limit rows per page, include spacer and format last row on page break

    Hello,
    I am new to BI and would like some help with an issue I don't seem to be able to resolve?
    I have a table that uses two xml group elements (2nd nested inside first) to produce my detail lines.
    Example:-
    First for-each loop runs over shipto details and within this another for-each loop runs over items related to that shipto, all of which results in multiple detail lines.
    I need to limit the number of rows per page and should the data roll over to the next page I need to place a horizontal closing border on the first page's table (only using column borders).
    Also when the data does not fill the page I need to add spacer rows to the page limit?
    I have tried using examples found in these forums, position(), counters etc… but due to having the second detail loop I’m unable to get these working or I’m doing something wrong?
    Your help would be greatly appreciated.

    Hi BIPuser, thanks for the links.
    I have tried some of the examples which I can get working with a single level of detail lines. However when I add the second level of detail lines the position() function seems to fail as my rowlimit appears to be ignored.
    I am also unable to get the $lpp example working because the outer detail loop may only have one xml element and therefore BI assumes only one line is to be printed when in fact the inner xml element detail loop may have further multiple lines. I need to effectively count the outer & inner loops as one to determine the number of lines being processed.
    Example of xml - My table for detail lines needs to include both ShipTo & item number lines grouped as shown, thereby counting & outputting 7 lines in this instance.
    <INVOICE>
    <On_Ship_To_S23> Outer loop
    <On_itm_num_shr_row_S21> Inner Loop
    <On_itm_num_shr_row_S21>
    <On_itm_num_shr_row_S21>
    </On_Ship_To_S23>
    <On_Ship_To_S23>
    <On_itm_num_shr_row_S21>
    <On_itm_num_shr_row_S21>
    </On_Ship_To_S23>
    </INVOICE>

  • NEXT button on report portlet shows 10 rows-maximum rows per page=9999

    I created a report with the DB Provider portlet. I set the maximum rows per page to 9999 when displayed as a portlet and as a full page. I put the portlet on a page and it only shows 10 rows and then the next button.
    If there are exactly 10 rows I get the next button. If I click it the next page loads with no data. If there are less than 10 rows there is no button.
    If I create a new portlet it does not do this. I'm only having the problem with one portlet now but I've seen it in the past. I usually just build the portlet again but I would like to know how to fix it.
    I can't customize the portlet because of bug #3467032.

    Select customize and set the number of rows to 9999. I'm guessing that it's currently set to 10.

  • Problem with number of rows per page ....

    Hi,
    I have a updatable report .This is a dynamic report which can have more than 100 columns depending on the table name .I have set number of rows =15 in layout and pagination .Its displaying 15 rows per page .My requirement is 50 rows per page .So i changed to 50 in layout and pagination .Its displaying 50 rows per page .But when i select some button in that page or move to other tab i get "page not found "error .If i replace back to 15 rows per page ,everything works fine ...Dont know why this is happening ..Please help..
    Thanks in advance ....

    Hello,
    You can use Maximum Records per page property of Repeating
    Frame.
    Adi

  • Rows Per Page doesn't affect the number of records displayed

    I just updated from 3.2 to 4.0 this morning. When I change the Rows Per Page value in the action menu the report doesn't change and the number of records displayed stays at 10. The report has ~6000 records. I edited the report attributes and add the rows selector to the IR search bar. This doesn't change the behavior either. I noticed that if I change the rows per page in the action menu then the drop down select list is updated, but the report still doesn't change from 10. I tried paging to the next set of results and it still remains at 10.
    Has anyone else experienced this problem?
    Tony

    Yes, Tony, I've seen this in several versions of APEX. In most cases, simply starting a new session was enough to force APEX to refresh the page and grab the new set of pagination directives. If that doesn't work, please give more info like: what type of report you are doing and what the Pagination values are. Please note the following:
    Report Template
    Pagination Scheme
    Enable Partial Page Refresh
    Display Position
    Number of Rows/Number of Rows Item
    Maximum Row Count

  • Rows per Page for PIVOT view.

    Hi,
    Is there any way we can show limited no of rows in pivot. Rows per Page for PIVOT view.
    on the click on next one should move to the next page.
    Thanks

    Pagination in Pivot Solves your problem at UI Level only.
    Below is the link that guide you how to implement Pagination in Pivot:
    [http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/]
    Hope it helps you..
    -Vency

  • Rows Per Page option in Pivot view.

    Hi,
    If our report is returning more no of rows and if it is in table view , we have and option in table edit view "Rows per page". Do we have same "Rows per page" option available in Pivot table view.Because i have a report which is returning more than 150 rows and i want only 10 rows to be displayed and then scroll.
    Regards,
    Som.

    Currently, we do not have that for Pivot tables. You can use another approach to show the pagination. I have an example here http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • DBAdapter polling with logical delete x distrib polling x DB rows per trans

    Hi all.
    I'm trying to configure a DBAdapter with "logical delete" polling strategy, distributed polling (cluster environment) and a defined number of "Database Rows per Transaction".
    When I check the box "Distributed Polling", the SQL generated gets appended by "FOR UPDATE NOWAIT"
    However, when I set a value for "Database Rows per Transaction" the "FOR UPDATE NOWAIT" sql clause disappear.
    Is this a bug, or some limitation related to the "logical delete" strategy???
    Thanks
    Denis

    Hi All,
    Actually I'm also facing the same problem.
    Step I follwed:
    1) Created a job_table in database
    create talbe job_table(id, job_name, job_desc, job_status)
    2)created a bpel process to test the Inbound distributed polling.
    3)Configure the DBAdapter for polling.
    a)update a field in the job_table with logical delete.
    b)select the field name form the drop down
    c) change the read value-->Inprogress and unRead value--->Ready
    d) dont change the value for Reserved value
    e) select the check box for "distributed polling".
    f) the query will be appended with "For update NoWait."
    g)click next and then finish.
    4) Then i followed the below steps.
    To enable pessimistic locking, run through the wizard once to create an inbound polling query. In the Applications Navigator window, expand Application Sources, then TopLink, and click TopLink Mappings. In the Structure window, click the table name. In Diagram View, click the following tabs: TopLink Mappings, Queries, Named Queries, Options; then the Advanced… button, and then Pessimistic Locking and Acquire Locks. You see the message, "Set Refresh Identity Map Results?" If a query uses pessimistic locking, it must refresh the identity map results. Click OK when you see the message, "Would you like us to set Refresh Identity Map Results and Refresh Remote Identity Map Results to true?Ó Run the wizard again to regenerate everything. In the new toplink_mappings.xml file, you see something like this for the query: <lock-mode>1</lock-mode>.
    5) lock-mose is not changed to 1 in toplink_mappingss.xml
    Can we edit the toplink_mappings.xml manually.
    If yes, what allt he values Ineed to change in toplink_mappings.xml file, so that it will not pick the same record for the multiple times in clustered environment.
    Please help me out this is urgent.
    Thanking you in advance.

  • Please help, how to send mails faster / send more mails per hour

    hello,
    in my application i am using mail sender class i have created to send mail to the users to participate in a survey. following is the code for it. i would like to know if there is anything wrong in it coz it takes to much time to send the mails it is taking 2 minustes to send 6 mails i.e 360 mails per hour only.
    following is how i instantiate the mail sender class and then generate a http link string dynamically as it is different for all the user.
    //////////class where mail sender is instantiated////////////////////
    try
    setConnection();
    st=con.createStatement();
    rs=st.executeQuery("select * from "+CNAME+"_campaign");                         
    String SurveyT = new String();
    while(rs.next())
         SurveyT = rs.getString(2);
    rs.close();
    rs=st.executeQuery("select * from "+CNAME+"_user");     
    ss = new MailSender();
    while(rs.next())
         String userid = rs.getString("userid");
         String password = rs.getString("password");
    StringBuffer message = new StringBuffer(BodyText.getText().trim());
    if(SurveyT.equals("invitational") || SurveyT.equals("single"))
                                            message.append( "\n" + "http://"+IPadd.getText().trim()+"/"+CNAME+"/servlet/login?username="+userid+"&passw="+password);
                                            ss.send(FromField.getText().trim(),userid,SmtpServerID.getText().trim(),MailSub.getText().trim(),message.toString());
    else if(SurveyT.equals("general"))
    message.append( "\n" + "http://"+IPadd.getText().trim()+"/"+CNAME+"/Index.html");
    ss.send(FromField.getText().trim(),userid,SmtpServerID.getText().trim(),MailSub.getText().trim(),message.toString());
    st.close();
    this.dispose();
    catch(SQLException sqlex)
    JOptionPane.showMessageDialog(null,sqlex.getMessage());
    //Mail Sender class/////////////////
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import javax.swing.*;
    public class MailSender
         String sentAddr,fromAddr,smtpServer,body,subject;
         public MailSender()
         //function send to send the mail
    public void send(String from,String to,String smtps,String subj,String messagetext)
              fromAddr=new String(from);
              sentAddr=new String(to);
              smtpServer=new String(smtps);
              body=new String(messagetext);
              subject=new String(subj);
              try
                   Properties props = System.getProperties();
                   props.put("mail.smtp.host",smtpServer);
         Session session = Session.getDefaultInstance(props,null);
    Message msg = new MimeMessage(session);
                   msg.setFrom(new InternetAddress(fromAddr));
    msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(sentAddr,false));
         msg.setSubject(subject);
         msg.setText(body);
    msg.setHeader("Survey","MailCheck");
    msg.setSentDate(new Date());
         Transport.send(msg);
         catch(MessagingException mex)
              JOptionPane.showMessageDialog(null,mex.getMessage());
    }

    Lots of variables here....Also my maths says only 180 per hour.... i.e. three a minute.
    1) you are using a database to get info from. What is the average response time of the DB server? Looks like you are doing one SQL then reading the result table but does the initial SQL take a while?
    2) how much data are you passing on to the SMTP server and how fast/slow is the link to that SMTP server? Work out the absolute max amount of data you can transfer over the link then get your average message size and work out a VERY theoretical Max number of messages a minute. Note that real life might approach 80% of this taking TCP/IP and SMTP overheads into account.
    3) What sort of load is the SMTP server under? If it's busy you will be only getting a fraction of whatever bandwidth is available. Depending on its design it may be trying to deliver the first message you sent it while you are still pumping more messages down to it. SMTP servers may limit the number of connections per minute from another machine in order to defeat a denial of service attack. Your code makes a connection per email so this may have relevence here.
    4) Raw horsepower always helps. When I write stuff to do things like this there is no nice GUI screen etc. Just basic Java that if it has to will write a log if something goes wrong. Maybe just maybe a counter on STD out to show it is still actually doing something. Keep the number of classes used down to the bare minimum. In the old days we used to spend days paring code to the bone - a skill somewhat lost these days.
    Hope this gives you some help in finding the bottleneck.
    Cheers,
    SH

Maybe you are looking for

  • Workbook is not Executing in a Role

    Hello Experts,                     I have created a Workbook in BW3.5 version.  My security team were able to assign the workbook to this particular Role called "Sales" in the Dev system.  But when I try to execute the workbook, I am getting the foll

  • Unable to transfer contacts on palm desktop (windows) to ipod nano

    My friend has a PC with all her contacts within Palm desktop. She now wants to transfer the contacts into her iPod nano. I am lost! It is my understanding that a vcard needs to be created, but I am unsure how to do this on the PC. Can anyone assist?

  • Can't download a purchased album in iTunes (Some Kind of Trouble)

    Hello Community, I'm not able to download a purchased album in the iTunes Store, on the album page there are some titles where it says that I have purchased it before, but i can't download those titles. An then there are some titles on wich only the

  • How to retrieve ABAP query field metedata using SAP JCO?

    How can I retrieve all field details (such as field name, field description, output length field type) using SAP JCO for an ABAP Query? I have query name, user group, query area and infoset name with me. Thanks

  • Unable to connect to mail server

    Something changed in the last 24 hours. Yesterday I was able to send and receive mail using Apple Mail and my POP account. Today I cannot get to the mail server. I have been on the phone with my ISP: Completely unhelpful, will not help with supportin