Query to get Weekly Report

Hello,
I wrote a query to get weekly report, which should start from Sunday to Saturday a typical week. for example the week is 04/03/2011 to 04/09/2011 i run the query on or Job on say on anyday of the week of 04/10/2011, 04.11.2011 etc.. here is my query, but this seems to work from the sysdate to - 7 days which doesn't get the sunday to sat requirement.. can someone please help..
select uid, psn, TO_char(date_in,'mm/dd/yyyy')
FROM TEST
WHERE uid like '%ST%'
and date_in > trunc(SYSDATE) -7
ORDER BY date_in ASC;
Thank you.

789287 wrote:
Centiful,
Thank youvery much for your help. it works now. This should work any day of this week i run will get previous week's data right? 'IW' means ISO calenadar?Yes IW in the TRUNC function means truncate the date passed to the first day of the ISO Week (Monday).
I made this as a procedure and created a job to run on a weekly basis. once the Job runs and gets the data into text file onto the server, i have to mail the text file to the management automatically through a dbms_scheduler. How can i send an email automatically through a Scheduler? could anyone give me an example please?Instead of creating the text file you could return the data and send it directly in a mail using UTL_MAIL
Another alternative would be to use DBMS_SCHEDULER to invoke an external executable that could send the mail for you.

Similar Messages

  • SQL Query to get statistics report

    Hi Experts,
    I need to get a report for CPU utilization,Memory Usage,Event Waits, Connection Spool and Shared Spool for a given query.
    Need some tips from you to get that report.
    Thanks,

    Its not something to trace my slow running sql query.
    I need to provide a report regarding Database Statistics on a specific process from front end PHP.
    Previously, i have provided you the different environment Oracle Version, here is the exact version in which i need to generate the report.
    BANNER                                                                         
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production   
    PL/SQL Release 11.1.0.7.0 - Production                                         
    CORE     11.1.0.7.0     Production                                                     
    TNS for Solaris: Version 11.1.0.7.0 - Production                               
    NLSRTL Version 11.1.0.7.0 - Production                                          This Database server is controlled by Client and having just limited access (not able to access the Trace Files).
    Can someone tell me to generate the requested report using some v$ Views.
    Thanks,
    Edited by: DharanV on Apr 15, 2010 8:01 PM
    added some more details to make it much clear

  • Query to  get  Week number  Pls help

    I need to get week number of the current year in the format 2008-W47 ( this is for sysdate
    when i try
    select to_CHAR(sysdate,'YYYY'||'-IW')
    FROM DUAL
    i get 2008-47
    but in the format 2008-W47
    Help
    s

    SQL> select to_CHAR(sysdate,'YYYY')||'-W'||to_char(sysdate,'IW') from dual
      2  /
    TO_CHAR(
    2008-W47

  • Steps of abap query--- to get the reports

    steps of abap query -
    to get the reports

    Hi Deva,
    For step by step procedure to create an ABAP query you can refer to the following links
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    http://allaboutsap.blogspot.com/2007/09/sap-query-step-by-step.html

  • Customer exit variable to get weekly report

    Hi All,
    I have a requirement as following. there are 2 user selection variables.
    Selection variables  are v1: start date: Period Range (d1-d2)
    V2: Period : Values should be 1month, 3 months, 6months (these values should be populated from Customer exit variable itself)
    The report layout shoud show:
    Actual sales by week (for period selected in v1)
    Plan sales by week (for period value selected in v2)
    Can you please reply with the abap?
    Quick replies are much apprciated.
    Thanks
    Suman

    Hello,
    You can try with the following way:
    1) Create a new infoobject with  master data tick on and load it via flat file with the needed values like 1 month, 2 months etc.
    2) Now include this infoobject in the MPRO along with the other infoprovider. If not using MPRO please create and use one.
    3) IN the MPRO include and assign this infobject in one of the dimension.
    4) Now in the query include this infoobject in the filter and create an user entry variable and in its default value include #
    5) Now include calmonth in the query and create a variable of type user exit not ready for input and include iit for calmonth.
    6) Now create a user exit for variable on calmonth at i_step = 2.
    7) The logic can be simply reading the value from the i_t_var_range table for variable on the new infobject and based on the selection write routine to populate the months needed.
    8) Here note that while writing routine please make sure you read i_t_var_range for all values NE #.
    9) The only disadvantage is that we need to always include # entry along with other entries.
    Hope it helps!!
    Regards,
    Shashank

  • Query to get direct report and anyone under them.

    Hello
    Does anyone have a query that would give me a supervisor and his/her direct reports and any direct reports of someone that reports to that supervisor?
    For an example if Kim reports to Jon and Jon reports to Doug and Doug reports to Steve.
    Example
    Steve's direct reports, would be Jon, Doug and Kim
    Jon's direct report, would be Kim.
    Any Idea's
    Thanks,
    KRE

    Please check previous threads -
    Re: How to find loop in Supervisor Hirarchy.
    Supervisor Hierarchy
    Re: Query for Supervisor Hierarchy for top most manager
    Cheers,
    VB

  • Query to get InfoObject(ReportObject) from specific Folder

    Hi,
    I am using XI Release 2.I am having one report object in two folders with the same name.
    example: I am having one report object named TestReport that exist in folder ALL as well as folder TEMPORARY in CMS.
    Following query i am using:
    "SELECT TOP 1 * FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Report'").append(" AND SI_INSTANCE=0 AND SI_NAME='").append(TestReport ).append("'");
    but it always returns the report object from folder ALL while i want to have report Object from folder TEMPORARY
    Reporrt Path: path://InfoObjects/Root Folder/Temporary/
    Can anyone help me out with the query to get the report object from specific folder?
    Thanks
    Prakhar Paharia
    Edited by: prakhar paharia on Mar 10, 2009 3:43 PM
    Edited by: prakhar paharia on Mar 10, 2009 3:44 PM
    Edited by: prakhar paharia on Mar 10, 2009 4:17 PM

    Hello Prakhar,
    You are querying the the CI_INFOOBJECTS table for crystal reports that have the name TestReport.
    If a crystal with name TestReport exists in folder ALL and another crystal with name TestReport exists in folder TEMPORARY , you should get two INFOOBJECTs with your query!
    Look at your query : 
    SELECT TOP 1   means select one entity.
    I guess this is the reason for your problem.
    bernd
    Edited by: BerndB on Mar 12, 2009 8:42 AM

  • Query help to get Matrix report

    Hi All,
    I have posted this query in Reports forum, didnt get replies, so im posting at Database general may be it could be the query problem.
    Account Main Heads
    Account_main_head_code, Main_head_description
    01 ADMINSTRATIVE
    02 OPERATIONAL
    Ledger_codes account_code,account_description,accound_main_head_code
    01 SALARIES 01
    02 PHONES 01
    03 FUEL 02
    Terminal_master
    Terminal_id,terminal_station_code
    1 HYD
    2 VJA
    3 NY
    4 WDC
    Petty_cash_voucher voucher_date,terminal_id,currency_code,account_code,amount
    30-jun-05 1 GBP 01 100
    30-jun-05 2 GBP 01 200
    30-jun-05 3 GBP 02 300
    30-jun-05 4 GBP 03 250
    Im looking for the MATRIX layout as follows :
    GBP (first group)
    ADMINISTRATIVE (secind group)
    .................HYD.....VJA....NY ....WDC
    Salaries.........100.....200.....0......0
    Phones............0.......0.....300.....0
    OPERATIONAL
    .................HYD.....VJA....NY....WDC
    Fuel..............0.......0.....0.....250
    My query is like this
    SELECT
    P.currency_code,
    T.terminal_town_code,
    P.account_code,
    L.account_description,
    MH.account_main_head_description,
    SUM(P.amount) total_amount
    FROM
    terminal_master T,
    petty_cash_voucher_master P,
    ledger_accounts L,
    account_main_heads MH
    WHERE
    T.terminal_id = P.account_to_terminal (+)
    AND
    L.account_code (+) = P.account_code
    AND
    MH.account_main_head_code (+) = L.account_main_head_code
    AND
    P.voucher_date (+) > = '30-jun-05'
    AND
    P.voucher_date (+) < = '30-jun-05'
    GROUP BY
    P.currency_code,
    T.terminal_town_code,
    P.account_code,
    L.account_description,
    SH.account_main_head_description.
    My current output is like this.
    right now with the the existing query im getting like this
    GBP (first group)
    ADMINISTRATIVE (second group)
    .................HYD.....VJA....NY ....WDC
    Salaries.........100.....200.....0......0
    Phones............0.......0.....300.....0
    OPERATIONAL
    .................WDC
    Fuel.............250
    While i need all the terminal at OPERATIONAL expenses also.

    you'll need an auxiliary calender table :
    SQL> drop table T_ACM ;
    SQL> drop table T_LC  ;
    SQL> drop table T_TM  ;
    SQL> drop table T_PCV ;
    SQL> drop table T_CAL ;
    SQL>
    SQL> create table T_ACM (acm_code varchar2(2) not null, text varchar2(20) not null) ;
    SQL> create unique index T_ACM_PK on T_ACM (acm_code) ;
    SQL> insert into T_ACM values ('01','ADMINISTRATIVE') ;
    SQL> insert into T_ACM values ('02','OPERATIONAL'   ) ;
    SQL>
    SQL>
    SQL> create table T_LC     (lc_code varchar2(2) not null, text varchar2(20) not null, acm_code varchar2(2) ) ;
    SQL> create unique index T_LC_PK on T_LC (lc_code) ;
    SQL> insert into T_LC values ('01' , 'SALARIES' , '01') ;
    SQL> insert into T_LC values ('02' , 'PHONES'     , '01') ;
    SQL> insert into T_LC values ('03' , 'FUEL'     , '02') ;
    SQL>
    SQL>
    SQL> create table T_TM (tm_id     number         not null, tm_code varchar2(3) ) ;
    SQL> create unique index T_TM_PK on T_TM (tm_id) ;
    SQL> insert into T_TM values (1, 'HYD' ) ;
    SQL> insert into T_TM values (2, 'VJA' ) ;
    SQL> insert into T_TM values (3, 'NY'  ) ;
    SQL> insert into T_TM values (4, 'WDC' ) ;
    SQL>
    SQL>
    SQL> create table T_PCV (v_date date not null, tm_id  varchar2(3) , cur_code varchar2(3), lc_code varchar2(2), amount number ) ;
    SQL> insert into T_PCV values (sysdate , 1, 'GBP', '01' , 100) ;
    SQL> insert into T_PCV values (sysdate , 2, 'GBP', '01' , 200) ;
    SQL> insert into T_PCV values (sysdate , 3, 'GBP', '02' , 300) ;
    SQL> insert into T_PCV values (sysdate , 4, 'GBP', '03' , 150) ;
    SQL>
    SQL> insert into T_PCV values (sysdate-1 , 1, 'GBP', '01' , 101) ;
    SQL> insert into T_PCV values (sysdate-1 , 2, 'GBP', '01' , 201) ;
    SQL> insert into T_PCV values (sysdate-1 , 3, 'GBP', '02' , 301) ;
    SQL> insert into T_PCV values (sysdate-1 , 4, 'GBP', '03' , 151) ;
    SQL>
    SQL> insert into T_PCV values (sysdate-2 , 1, 'GBP', '01' , 102) ;
    SQL> insert into T_PCV values (sysdate-2 , 2, 'GBP', '01' , 202) ;
    SQL> insert into T_PCV values (sysdate-2 , 3, 'GBP', '02' , 302) ;
    SQL> insert into T_PCV values (sysdate-2 , 4, 'GBP', '03' , 152) ;
    SQL>
    SQL> create table T_CAL (DAY date not null, WEEK number, MONTH number, YEAR number) ;
    SQL> create unique index T_CAL_PK on  T_CAL (DAY);
    SQL>
    SQL> DECLARE
      2    l_year number ;
      3  BEGIN
      4 
      5    l_year := 2005 ;
      6 
      7    FOR i in 1..365 LOOP
      8        insert into T_CAL (DAY,YEAR)
      9              select to_date(to_char(i) || ' ' || to_char(l_year) , 'DDD YYYY')
    10                 ,l_year
    11             from dual
    12        ;
    13    END LOOP ;
    14 
    15    commit ;
    16 
    17       update T_CAL
    18          set WEEK  = to_number(to_char(T_CAL.DAY,'WW'))
    19             ,MONTH = to_number(to_char(T_CAL.DAY,'MM'))
    20       ;
    21    commit ;
    22  END ;
    23  /
    SQL>
    SQL>
    SQL>
    SQL> commit ;
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> create or replace
      2   view v_test_2 as
      3  select
      4           E.DAY
      5          ,E.acm_text
      6          ,E.lc_text
      7          ,E.tm_code
      8          ,nvl(sum(F.amount),0) amount
      9    from
    10            (select A.text acm_text, B.lc_code, B.text lc_text, C.tm_id, C.tm_code , D.DAY
    11            from
    12                 T_ACM    A
    13                ,T_LC     B
    14                ,T_TM     C
    15                ,T_CAL    D
    16            where
    17                 A.acm_code = B.acm_code
    18            ) E
    19           ,(select trunc(v_date) DAY, tm_id, lc_code, sum(amount) amount
    20            from t_pcv
    21              group by trunc(v_date), tm_id, lc_code
    22            ) F
    23   where
    24            E.lc_code = F.lc_code (+)
    25       and  E.tm_id   = F.tm_id   (+)
    26       and  E.DAY     = F.DAY        (+)
    27   group by
    28           E.DAY
    29          ,E.acm_text
    30          ,E.lc_text
    31          ,E.tm_code
    32  ;
    SQL> select * from v_test_2
      2   where DAY >= to_date('01.07.2005','dd.mm.yyyy')
      3       and DAY <= to_date('02.07.2005','dd.mm.yyyy')
      4  ;
    DAY      ACM_TEXT             LC_TEXT              TM_     AMOUNT              
    01.07.05 ADMINISTRATIVE       PHONES               HYD          0              
    01.07.05 ADMINISTRATIVE       PHONES               NY         301              
    01.07.05 ADMINISTRATIVE       PHONES               VJA          0              
    01.07.05 ADMINISTRATIVE       PHONES               WDC          0              
    01.07.05 ADMINISTRATIVE       SALARIES             HYD        101              
    01.07.05 ADMINISTRATIVE       SALARIES             NY           0              
    01.07.05 ADMINISTRATIVE       SALARIES             VJA        201              
    01.07.05 ADMINISTRATIVE       SALARIES             WDC          0              
    01.07.05 OPERATIONAL          FUEL                 HYD          0              
    01.07.05 OPERATIONAL          FUEL                 NY           0              
    01.07.05 OPERATIONAL          FUEL                 VJA          0              
    01.07.05 OPERATIONAL          FUEL                 WDC        151              
    02.07.05 ADMINISTRATIVE       PHONES               HYD          0              
    02.07.05 ADMINISTRATIVE       PHONES               NY         300              
    02.07.05 ADMINISTRATIVE       PHONES               VJA          0              
    02.07.05 ADMINISTRATIVE       PHONES               WDC          0              
    02.07.05 ADMINISTRATIVE       SALARIES             HYD        100              
    02.07.05 ADMINISTRATIVE       SALARIES             NY           0              
    02.07.05 ADMINISTRATIVE       SALARIES             VJA        200              
    02.07.05 ADMINISTRATIVE       SALARIES             WDC          0              
    02.07.05 OPERATIONAL          FUEL                 HYD          0              
    02.07.05 OPERATIONAL          FUEL                 NY           0              
    02.07.05 OPERATIONAL          FUEL                 VJA          0              
    02.07.05 OPERATIONAL          FUEL                 WDC        150              
    SQL>
    SQL> select
      2           B.MONTH
      3          ,A.acm_text
      4          ,A.lc_text
      5          ,A.tm_code
      6          ,sum(amount) amount
      7    from
      8          V_TEST_2  A
      9         ,T_CAL     B
    10   where B.DAY   = A.DAY (+)
    11       and B.MONTH = 7
    12   group by
    13           B.MONTH
    14          ,A.acm_text
    15          ,A.lc_text
    16          ,A.tm_code
    17  ;
         MONTH ACM_TEXT             LC_TEXT              TM_     AMOUNT            
             7 ADMINISTRATIVE       PHONES               HYD          0            
             7 ADMINISTRATIVE       PHONES               NY         601            
             7 ADMINISTRATIVE       PHONES               VJA          0            
             7 ADMINISTRATIVE       PHONES               WDC          0            
             7 ADMINISTRATIVE       SALARIES             HYD        201            
             7 ADMINISTRATIVE       SALARIES             NY           0            
             7 ADMINISTRATIVE       SALARIES             VJA        401            
             7 ADMINISTRATIVE       SALARIES             WDC          0            
             7 OPERATIONAL          FUEL                 HYD          0            
             7 OPERATIONAL          FUEL                 NY           0            
             7 OPERATIONAL          FUEL                 VJA          0            
             7 OPERATIONAL          FUEL                 WDC        301            
    SQL>
    SQL>
    SQL> select
      2           B.MONTH
      3          ,A.acm_text
      4          ,A.lc_text
      5          ,A.tm_code
      6          ,sum(amount) amount
      7    from
      8          V_TEST_2  A
      9         ,T_CAL     B
    10   where B.DAY   = A.DAY (+)
    11       and B.MONTH = 6
    12   group by
    13           B.MONTH
    14          ,A.acm_text
    15          ,A.lc_text
    16          ,A.tm_code
    17  ;
         MONTH ACM_TEXT             LC_TEXT              TM_     AMOUNT            
             6 ADMINISTRATIVE       PHONES               HYD          0            
             6 ADMINISTRATIVE       PHONES               NY         302            
             6 ADMINISTRATIVE       PHONES               VJA          0            
             6 ADMINISTRATIVE       PHONES               WDC          0            
             6 ADMINISTRATIVE       SALARIES             HYD        102            
             6 ADMINISTRATIVE       SALARIES             NY           0            
             6 ADMINISTRATIVE       SALARIES             VJA        202            
             6 ADMINISTRATIVE       SALARIES             WDC          0            
             6 OPERATIONAL          FUEL                 HYD          0            
             6 OPERATIONAL          FUEL                 NY           0            
             6 OPERATIONAL          FUEL                 VJA          0            
             6 OPERATIONAL          FUEL                 WDC        152            
    SQL>

  • Query to get data for current week+13

    Hi Friends,
    I have two tables
    BACKLOG_WEEK_AFTER_ATP (LE)
    BACKLOG_ATP_GT_CW (RE)
    ** First I have to query whats the current week and year and it should come in this format ---- 2011-WK30
    columns in table BACKLOG_WEEK_AFTER_ATP are:
    ITEM_NUMBER      QUANTITY
    1N5418                 20
    1N5614                 30
    1N5806SM               10
    1N5811                  0
    2PFF6                  60columns in table BACKLOG_ATP_GT_CW are:
    ITEM_NUMBER     QUANTITY        YEAR_WEEK
    1N5418                30        2011-WK30
    1N5418                 5        2011-WK31
    1N5614                30        2011-WK32
    1N5806SM              30        2011-WK33
    1N5811                20        2011-WK32
    3EX473K1              20        2011-WK30My report should look like
    ITEM_NUMBER    2011-WK30  2011-WK31  2011-WK32  2011-WK33  ...............till 13th week
    1N5418                10         -5         -5         -5  ...............till 13t week
    1N5614                30         30          0          0  ................till 13th week
    1N5806SM              10         10         10         20  ................till 13th week
    1N5811                 0          0         20         20  ................till 13th week
    2PFF6                 60         60         60         60  ................till 13th week
    3EX473K1              20         20         20         20  ................till 13th weekTo get this report i have these conditions to keep in mind.
    1) If item_number not present in LE table and present in RE table then repeat what it is in RE table till 13th week
    2) If item_number not present in RE table and present in LE table then repeat what it is in LE table till 13th week
    3) If item_number present in LE and also present in RE table then do subtraction for RE - LE for that particular item_number till 13th week.
    4) If item_number is there in LE table but not present in RE table for current_week+1(today week comes as 29th week) then repeat the same which is there in LE table. If item is found in RE table for (example 32th week) then subtract RE -LE for that particular item_number
    Thanks in advance.
    Regards

    Hello,
    If you don't need the PIVOT display, then this may help you :
    with le as
    (select '1N5418' item_number, 20 quantity from dual union all
    select '1N5614' item_number, 30 quantity from dual union all
    select '1N5806SM' item_number, 10 quantity from dual union all
    select '1N5811' item_number, 0 quantity from dual union all
    select '2PFF6' item_number, 60 quantity from dual ),
    re as
    (select '1N5418' item_number, 30 quantity, '2011-WK30' year_week from dual union all
    select '1N5418' item_number, 5 quantity, '2011-WK31' year_week from dual union all
    select '1N5614' item_number, 30 quantity, '2011-WK32' year_week from dual union all
    select '1N5806SM' item_number, 30 quantity, '2011-WK33' year_week from dual union all
    select '1N5811' item_number, 20 quantity, '2011-WK32' year_week from dual union all
    select '3EX473K1' item_number, 20 quantity, '2011-WK30' year_week from dual
    row_gen as (
    select item_number, calc_year_week,
           row_number() over(partition by item_number order by calc_year_week) rn
    from
        (select le.item_number from le union select item_number from re) item,
        (select to_char(level*7+sysdate,'YYYY-"WK"WW') calc_year_week from dual connect by level<=13) week)
    select item_number, calc_year_week, calc_qty
    from row_gen, le, re
    where row_gen.item_number=le.item_number(+)
    and row_gen.item_number=re.item_number(+)
    and row_gen.calc_year_week=re.year_week(+)
    model
    partition by (row_gen.item_number)
    dimension by (rn)
    measures (calc_year_week, year_week, le.quantity le_qty,re.quantity re_qty,0 calc_qty )
    rules  (
    calc_qty[1]  =
        case when re_qty[cv()] is null then le_qty[cv()]
        when le_qty[cv()] is null then re_qty[cv()]
        else  re_qty[cv()]-le_qty[cv()]
    end,     
    calc_qty[rn>1] order by rn =
        case when re_qty[cv()] is null then calc_qty[cv()-1]
        else re_qty[cv()] - calc_qty[cv()-1]
        end           )
    order by 1,2;I am not sure this is the simplest way to do it, but the results seem to match your example.
    Regards,
    Sylvie
    Edited by: Troll35 on Jul 19, 2011 3:08 PM

  • Need to create report query to get latest open and last closed period for given application

    Hi All,
    I need to create a report query to get below result displayed in report output.
    1)   -   Application name
    2)   -    Ledger name
    -o/  -Operating Unit
    3)   -  Last Closed Period
    4)   -  Current Open Period
    5)   -  Date Closed – Last Closed Period
    6)   -  Date Open – Current Open Period
    I tr I tried to create the query below is the same. Please let me know if it looks fine.
    SELECT *
      FROM (SELECT fav.application_name ,
                   hou.name Operating_Unit_Name,
                   gl.name Ledger_name,
                   gl.latest_opened_period_name,
                   gps.period_name Period_Name,
                   DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
                   gps.last_update_date Last_status_modified_date
              FROM gl_period_statuses gps,
                   gl_sets_of_books   gsob,
                   fnd_application_vl fav,
                   hr_operating_units hou,
                   gl_ledgers         gl
             WHERE gps.period_name = gps.period_name
               AND gps.closing_status ='C'
               AND fav.application_short_name =
                   NVL('&p_application_short_name', fav.application_short_name)
               AND gps.application_id = fav.application_id
               AND gsob.set_of_books_id = gps.set_of_books_id
               AND hou.set_of_books_id = gps.set_of_books_id
               AND gl.ledger_id = gsob.set_of_books_id
               AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
               AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
             ORDER BY gps.last_update_date desc )WHERE ROWNUM = 1 
    UNION ALL
    SELECT *
      FROM (SELECT fav.application_name Application_Name,
                   hou.name Operating_Unit_Name,
                   gl.name Ledger_name,
                   gl.latest_opened_period_name,
                   gps.period_name Period_Name,
                   DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
                   gps.last_update_date Last_status_modified_date
              FROM gl_period_statuses gps,
                   gl_sets_of_books   gsob,
                   fnd_application_vl fav,
                   hr_operating_units hou,
                   gl_ledgers         gl
             WHERE gps.period_name = gps.period_name
               AND gps.closing_status = 'O'
               AND fav.application_short_name =
                   NVL('&p_application_short_name', fav.application_short_name)
               AND gps.application_id = fav.application_id
               AND gsob.set_of_books_id = gps.set_of_books_id
               AND hou.set_of_books_id = gps.set_of_books_id
               AND gl.ledger_id = gsob.set_of_books_id
               AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
               AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
             ORDER BY gps.last_update_date desc)
             WHERE ROWNUM = 1

    It is within the table I believe (I'm not a DBA or a developer) since I created a BLOB column and then used the file browse feature to allow users to attach a resume to the table in order to be able to perform a search of the attached documents.
    I'm just having a hard time pointing the link in the search results report to the document in the blob column.
    The information on that page is great if you're trying to create a link to the document on the initial report.
    But I created a query using Oracle Text to run a report that does a boolean search of the attached word documents in the table.
    When it displays the search results, it doesn't create a link to the document and I can't figure out how to do it.
    Here's a link the the instructions I used to create the initial search report with Oracle Text, mind you I only created the index and query, I didn't add in all the link data since they're using documents on websites and I'm using documents in a table.
    http://www.oracle.com/technology/products/database/application_express/pdf/apex_text_application_v1.6.pdf
    If you can help me with this I'd really appreciate it.
    Thanks again.
    Greg
    Edited by: gjones77 on Dec 2, 2008 8:14 AM

  • IR Dashboard report from new query not getting all Quick Filter selections

    I inherited an IR Dashboard .bqy and my user recently added a new Query, Result, Table, and Report section to it. I cannot get the report to dynamically filter based on the date chosen in the existing Quick Filters section. It seems to be filtering the Location properly (drop down in Quick Filters section), but not the date. Her result section refuses to show anything less than ALL dates from the query.
    The other reports/pivots already on the dashboard work fine with all QuickFilters.
    In my attempt to integrate her new report in to the dashboard I add a new hidden "dummy" pivot (based on the existing query btw, not the new query-could that be the issue? it's dummy though so i figured it was ok), reference this pivot in the Embedded Targets object I found by adding "Object~Pivot4|Type~9|Target~Casket Margin Summary" line,
    went to Dashboard Studio and was able to Associate this report in to the right frame, etc.
    In the script behind the QIQ date "Set Filters" button I saw this code for the existing "Result_Detail" section so I added a line for my new "Results_Merch Detail" section.
    var objServDate = ActiveDocument.Sections["Casket Margin"].Shapes["Service_Date^qiqlbx^showname^a"];
    if (objServDate.SelectedList.Count > 2){
         Alert("Please select only two dates");
         return;
    ActiveDocument.Sections.Item(txlMe.Text).Qiq_onControlClick(this.Parent,this)
    ActiveDocument.Sections["Results_Merch Detail"].Limits["Service Date"].Operator = 11
    ActiveDocument.Sections["Results_Detail"].Limits["Service Date"].Operator = 11;
    I tried it with and without an extra semi-colon at the end of my line. Is that the right way to tell it to apply it to more than 1 Result??
    Worked with this for hours now and can't find whatever else is hidden which tells the QIQfIlter Date to refresh this NEW query/result when chosen.
    I tried to make sure all Filter items exist in the new query's Request line, one was missing. i haven't gone back to Dash Studio since then and re-saved, does THAT matter? I saved the .BQY and re-processed, still no luck.
    can anyone help? I'm desperate for suggestions.
    Thank you!
    Karen

    This has been resolved. The main thing that kept it from working was I kept launching the Dashboard Studio after I was in Design mode so any time I got to the QIQ Filters setup screen it looked like cryptic code and there was nothing to alter or play with to try and force the filters to take effect, so I never changed anything.
    This time I launched the Dashboard Studio while accidentally in regular mode, blessing in disguise. on Step 1 of the wizard I chose QIQ Filter Properties from the configuration drop down list which pops up the Local Filters setup window, now in place of code syntax there was english-like words & action items for me to play around with so I chose my new result set from the drop down list and highlighted all the limits and clicked "Set Filters". Presto, that did it.
    Also I had to make sure all the columns referenced in the QIQ drop down lists and pick list was in my request line in the Query & Result section, repeat the above, and it's all working great now.
    Thanks,
    Karen

  • Query  for getting records  max  reported  timestamp and 2nd max report

    query for getting records in between
    max reported timestamp and 2nd max reported timestamp
    HERE IS ALL RESULT SET
    TIME DOMAIN
    30:jun:2006:20:08:45 TOMCAT
    30:jun:2006:20:08:45 TOMCAT
    30:jun:2006:20:07:04 TOMCAT
    30:jun:2006:20:07:04 TOMCAT
    30:jun:2006:20:07:24 TOMCAT
    30:jun:2006:20:07:24 TOMCAT
    30:jun:2006:20:07:45 TOMCAT
    30:jun:2006:20:07:45 TOMCAT
    30:jun:2006:20:08:05 TOMCAT
    30:jun:2006:20:07:04 TOMCAT
    30:jun:2006:20:08:05 TOMCAT
    PD_REPORTED_TIMESTAM PD_USER
    30:jun:2006:20:08:25 TOMCAT
    30:jun:2006:20:08:25 TOMCAT
    30:jun:2006:20:08:45 TOMCAT
    30:jun:2006:20:08:45 TOMCAT
    30:jun:2006:20:07:24 TOMCAT
    30:jun:2006:20:07:04 TOMCAT
    30:jun:2006:20:07:24 TOMCAT
    30:jun:2006:20:07:45 TOMCAT
    30:jun:2006:20:07:45 TOMCAT
    30:jun:2006:20:08:05 TOMCAT
    30:jun:2006:20:08:05 TOMCAT
    PD_REPORTED_TIMESTAM PD_USER
    30:jun:2006:20:08:25 TOMCAT
    30:jun:2006:20:08:25 TOMCAT
    QUERY RESULT TO COME
    TIME DOMAIN
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45
    Message was edited by:
    user517983

    Hi,
    can we write query like this.
    1 select pd_user,PD_REPORTED_TIMESTAMP
    2 from sp_process_detail_current spdc
    3 where host_id='DSCP02469'and pd_user='TOMCAT'
    4 and exists(
    5 select PD_REPORTED_TIMESTAMP from sp_process_detail_current
    6* having max(PD_REPORTED_TIMESTAMP)-spdc.PD_REPORTED_TIMESTAMP=0)
    SQL> /
    PD_USER PD_REPORTED_TIMESTAM
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45

  • How do I start getting weekly iTunes U report?

    I've read in the iTunes U administrators' guide (pgs. 92-93) about a weekly report that is emailed detailing user interaction with iTunes U content.
    My organization has an iTunes U site that originated many years ago. I am now the one charged with overseeing our multimedia offerings. How do I go about contacting Apple and getting the "owner" information updated so that I can begin receiving these weekly reports? Any suggestions?

    If you are referring to your Private iTunes U site not converted to the iTunes U Public Site Manager, then weekly reports are emailed to the site Administrator email address. Public iTunes U sites I beleive are all using the iTunes U Public Site Manager and weekly reports ceased some time ago but now there is access to usage reports from within the  iTunes U Public Site Manager or you can use the iTunes Store API to request Daily iTunes U Log Reports as documented in an updated iTunes U Administration Guide.
    I found the API challenging and convinced a collegue to develop a very basic command line app' Laurus to do the hard bit for me. I then import the downloaded data into a database and then do some SQL to replicate the Apple reports.The Laurus app' is not documented at all but if you are interested in using it I should be able to give you some instructions via email or the like.

  • Query to get the List of Reports on a Universe

    Hi All,
    I want to write a query to get all the Web I and Crystal Reports that access a particular universe.
    Can anyone suggest me where to start.
    This is in BO 3.1 against Oracle databse.

    There are a few ways to do this:
    -  The easiest would be to use a Relationship Query from the CMC. To do this, go to the Universes section on the CMC, right click on the relevant universe, select tools >> Check Relationships.
    - Use Query Builder. You will need more than one query to pull the information you need. You could try something like the below (for Webi)
    SELECT SI_NAME, SI_WEBI, SI_DATACONNECTION FROM CI_APPOBJECTS
    WHERE SI_KIND = 'universe' and SI_NAME = 'Universe Name'
    This will give you a list of Webi Reports by SI_ID.
    You'll need another query to list Webi report names:
    SELECT SI_NAME FROM CI_INFOOBJECTS WHERE SI_ID IN (SI_ID from query above)
    - This is trivial via Auditing / the Activity universe. This of course will only return reports that have already run.
    Best.
    Srinivas

  • Can we use ad hoc query to get a temporary report of payroll result?

    Hi,All
    can we use ad hoc query to get a temporary report of payroll result?or we have to get a report of payroll result by customizing and ABAP?
    and how can I customizing a report on the basis of standard SAP report for payroll?

    Hi
    As of my Knowledge You cannot get the payroll report through Adhoc query you have to go for ABAP Devlopment
    Thanks
    Mahantesh

Maybe you are looking for