Past query details

Hi,
i have one query and i have sql_id of it.but it was run few days back
I need to get complete details of that query like machine name from where query was run and os user.
I am not able to get details from v$session because sql_id no longer exist.
Please help.

depending on your version (and your Oracle licences) you may find something in v$active_session_history (http://docs.oracle.com/cd/E11882_01/server.112/e25513/dynviews_1007.htm#REFRN30299; not very likely if you look for operations that happened some days ago) or in the automatic workload repository (AWR; DBA_HIST_ACTIVE_SESS_HISTORY: http://docs.oracle.com/cd/E11882_01/server.112/e25513/statviews_3197.htm#REFRN23400).
Edited by: mpreiss on Sep 22, 2012 9:39 PM

Similar Messages

  • Query should fetch all the query details in the system.

    Hi All
    We  are looking for a query which will fetch all the query details in the system along with the user names either who has created the query or who has run it atleast once.
    If any of the queries are not used for a long time then we  can delete it with the user's/owner's approval.
    Is there anyway we can desing such query .
    Thanks
    Asim

    Hi,
    Thanks for the reply.
    My requirement is that we want to create a new query which should fetch the details information of already existing queries.
    Like who has created that query, how frequently the use it etc...
    Whenever we run the new query it should give information of all other existing queries.
    Thanks and Regards
    Asim

  • Where to see query details(urgent)

    Hi xperts,
    Can you please tell me where to see the runtime detaile of the query if we excute in the browser or in query analiser it is not aback ground job by default.Due points will be given.
    Thanks in advance,
    Dan

    Hello Dan,
    I am not sure about the BW release you are using, therefore, I would provide the solution for both the releases.
    BW 3.5 (NW04)
    In case, you are using BEx Analyzer or the browser for executing the query, you can see the query runtime statistics in the BW system only if the BW statistics for the InfoCube are activated on which the query is running.
    Therefore, please activate the BW statistics on all the Basic InfoCubes on which the query is running. You can do this from TCode: RSDDSTAT or from RSA1-> Tools -> BW Statistics for InfoProviders.
    Now, execute the query from BEx or the portal and after executing login to the BW system (ABAP system) and go to Transaction SE16.
    In transaction SE16, enter the table name as (Table Name = RSDDSTAT)and in the QueryID field enter the technical name of the "query" and then press execute.
    Now, you will see all the runtime statistics for the query, like the total runtime, DB time, OLAP time and the frontend time.
    The other way to see the query details is to run the same query in the "Query Monitor" (TCode : RSRT) with the option "execute and debug" and in the options select "display runtime statistics". After you execute the query on the output screen, just go back and you will see the query statistics for the current exection of the query.
    BI 7.0 (NW 7.0)
    Same things need to be followed here also.
    The difference is that you can activate the BI statistics on a query also in case of BI 7.0.
    Therefore, from "RSA1 -> Tools -> Settings for BI statistics" or from TCode: RSDDSTAT, activate the statistics on the query, you are referring to.
    Now, after running the query in BEx Web Analyzer or BEx Excel addin, you can again go to SE16 and here now, you need to enter the table name as "RSDDSTAT_OLAP" to see the new BI query runtime statistics.
    For getting the details of the DM time, you can also use the RSDDSTAT_DM table.
    The other option of RSRT is also valid in this case.
    I hope, I have answered your query.
    Please let me know in case of any doubts.
    Regards,
    Yash Vardhan

  • Copy Paste Query Variable

    Hi,
    (1) Can we copy n paste query variable which is difined using customer exit???
    (2) can we change description of the variable only for a particular query? Only for a particular query that description should appear n it should not appear for rest of the queries wherever that variable is used...
    Thanks,
    Geetanjali

    1. You can have only one variable technical names,  you can't copy and past it, you have to define another one.
    2. And also you can't change the discription of the variable for only one query without affecting the others.
    too bad, both are no.
    thanks.
    Wond

  • Clicking on an email address on a webpage, opens outlook express, but does not create a new mail, which it used to. annoying as it then means cutting & pasting the details

    As I said above, clicking on an email address on a webpage, opens outlook express which is my default email client. In the past it used to also open a new mail, ready for me to type the message but now it does not. It works if I load internet explorer as the browser but does not in firefox. I prefer firefox, so can someone help me resolve this. Its so annoying to have to open a new mail then cut & paste the email details.

    I posted this reply elsewhere in the support forum but I'll copy it here for you, as follows....
    I had the same problem. Initially thought I needed a string (code) to run the "Create new e-mail" command for Outlook but I didn't. I did a few things that eventually made it work, but I don't know for certain which one it was so here goes.
    1.) Go to Control Panel and click on Internet Properties. Go to the Programs tab and double-check that Outlook Express is your default e-mail client. (This is probably for IE).
    2. Close Outlook Express. Select the RUN command from the Start Menu and type the following: <msimn /reg>. Only type the info between the brackets. Click the OK button and wait about 5 seconds. Nothing will happen on screen but the information is being silently written to the registry.
    3. Open Outlook Express and go to the Tools Menu. Select Options. On the General tab, look down to the Default Messaging Programs. More than likely, the top option will say that "This application is NOT the default Mail handler" Click the button next to it that says "Make Default". This should trigger an available option in Firefox, below, if it was not already available.
    4. In Firefox, go to the Tools menu. Select Options. Click on Applications. Under the column, "Content Type" look for the mailto function. In the column Action, select "Use Outlook Express (default)" if it is not already selected. "(default)" must be part of the phrase. Somehow there is code behind this option that will bring up a new e-mail in Outlook that otherwise does not work if Outlook is selected manually. (To choose Outlook manually, you will indeed have to find the string code somewhere.)

  • Select (query) details by passing parameters through a calender

    Hi All,
    I have a scenario like below;
    i have a report and it returns 1000s of details which is not necessary @ all.
    what i want to do is, place a calender in top of the report and select date range (probably 2 calenders)
    and query the data accordingly by clicking a button or something.
    I know i can do this using default filter... but initially i have to pass select * from table; query for that. it returns unnecessary data.
    ----scenario in brief----
    user login to the page
    nothing comes until enter data range
    once he pick the date range.... after click on the button
    then returns the related data according to the date range...
    i think you got my question.
    can anybody give me a hand to solve this problem.
    It will be a great help.....
    Thanks in advance
    Max
    ------------------------------

    Hey Jeff,
    I got a problem again. when i try to query the data using a db link... i cant fetch the data using this data time picker... when click the button.. it doesnt fetch the data.
    but when i pass the query through the sql workshop. then i get the actual result... dont understand why the same thing does not apply in both places.....
    if i hard coded the date... then it works....
    here is my query...
    SELECT
    ATN.ATN_TRANSACTION_DATE RECEIPT_DATE,
    --CD.CDL_CHEQUE_NUMBER CHEQUE_NUMBER,
    ATN.ATN_VOUCHER_NUMBER RECEIPT_NO ,
    ATN.ATN_RECEIPT_PAYMENT_MODE PAY_MODE,
    ATN.ATN_JOURNAL_REFERENCE_NUMBER PROPOSAL_NUMBER,
    ATN.ATN_TOTAL_AMOUNT ATN_AMOUNT,
    CD.CDL_CHEQUE_AMOUNT CD_AMOUNT,
    ACT.ACC_GL_CODE GL_CODE,
    ATN.ATN_CREATED_BY USER_C,
    DECODE(ATN.ATN_RECEIPT_PAYMENT_MODE,'C',ATN.ATN_TOTAL_AMOUNT) CASH,
    DECODE(ATN.ATN_RECEIPT_PAYMENT_MODE,'B',ATN.ATN_TOTAL_AMOUNT) IBT,
    DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000002','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) HNB_Green_path_1,
    DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000005','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) HNB_Green_path_2,
    DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000006','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) HNB_Green_path_3,
    DECODE(ATN.ATN_RECEIPT_PAYMENT_MODE,'R',ATN.ATN_TOTAL_AMOUNT) Credit_Card,
    DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000008','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) HNB_Kollupitiya,
    DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000009','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) Commercial_Bank,
    DECODE((DECODE(ACT.ACC_GL_CODE,'CF20000010','Q')),'Q',ATN.ATN_TOTAL_AMOUNT) HNB_Green_path_USD
    FROM T_ACCOUNTING_TRANSACTION@racprod ATN
    ,T_ACCOUNTING_TRN_DETAIL@racprod ATD
    ,T_ACCOUNT@racprod ACT
    ,T_CHEQUE_DETAIL@racprod CD
    WHERE ATN.ATN_ACCOUNTING_TRANSACTION_ID =ATD.ATD_ATN_ACCOUNTING_TRN_ID
    AND ATD.ATD_ACC_ACCOUNT_ID=ACT.ACC_ACCOUNT_ID
    AND ATN.ATN_ACCOUNTING_TRANSACTION_ID=CD.CDL_ATN_ACCOUNTING_TRN_ID
    AND ATN.ATN_TRANSACTION_DATE >=to_date(:P4_FROM_DATE,'dd/mm/yyyy')
    AND ATN.ATN_TRANSACTION_DATE <=to_date(:P4_TO_DATE,'dd/mm/yyyy')
    AND ATN.ATN_VOUCHER_TYPE IN ('RV','SR')
    AND ATN.ATN_ACCOUNTING_TRN_CODE IN ('L1000','S001','S002','S003','S004','S005','S006','S007','S008','S009','S010','S011','S012','S013','S014'
    ,'L1021','L1031','L1032','L1033','L1034','L1035','L1036','L1037','L1038','L1039','L1040')
    AND substr(ATN.ATN_VOUCHER_NUMBER,9,3)=(select branch from user_login where username=:app_user)
    AND ATD.ATD_DR_CR_INDICATOR='DR'
    AND ATN.ATN_ATN_ACCOUNTING_TRN_ID IS NULL
    ORDER BY ATN.ATN_VOUCHER_NUMBER
    can u please suggest me a solution...???
    Thanks again,
    Max

  • URL Parameterizing for BI Query Detail Drill Down via Xcelsius

    Hi Guys,
    I am In the process of building an Xcelsius dashboard using BI/BW as my source system, working on a "Details" URL button to allow the user to drill directly into the source BI queries with their current combo box selections. 
    I am trying to build a URL to pass a value to both a variable and to filter a characteristic. I want to pass a value to a 0fiscper variable and exclude an employee number. 
    I have been able to get each URL to work independently, but not working together. If I leave out either the variable part or the filter part it works, but it doesn't work with both the filter portion and characteristic filter section. 
    I followed other threads and used Web application designer (WAD) instructions to view the XHTML I will have to parametrize for my URL.
    This is how I have flattened/parametrized it
    Variable part:
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=010/2010&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=BCURFPER&
    data provider part
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&
    BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&
    characteristic filter part
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0EMPLOYEE&
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=!201
    So my complete URL is:
    http://serverinfo?
    QUERY=ABCQUERY&
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=010/2010&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=BCURFPER&
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&
    BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0EMPLOYEE&
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=!201
    Then it gives me the following error when I attempt to run this...
    " The metadata of "CMD" "SET_VARIABLES_STATE" are incorrect for parameter "CHARACTERISTICS_SELECTIONS"
    If I set the debug=x flag to see what is generated in the error this is the info I get:
    The parameter "CHARACTERISTICS_SELECTIONS" in the metadata of "CMD" "SET_VARIABLES_STATE is not correctly defined:
    <parameterList>
      <param name="BI_COMMAND_TYPE" value="SET_VARIABLES_STATE"/>
      <param name="CHARACTERISTICS_SELECTIONS">
        <param name="CHARACTERISTIC_SELECTIONS" index="1">
          <param name="CHARACTERISTIC" value="0EMPLOYEE"/>
          <param name="SELECTIONS">
            <param name="SELECTION" modification_type="delete_if_value_not_equal" index="1">
              <param name="SELECTION_INPUT_STRING" value="!201"/>
            </param>
          </param>
        </param>
      </param>
      <param name="TARGET_DATA_PROVIDER_REF_LIST">
        <param name="TARGET_DATA_PROVIDER_REF" value="DP_1" index="1"/>
      </param>
      <param name="TARGET_VARIABLE_CONTAINER_REF" value="DEFAULT"/>
      <param name="VARIABLE_VALUES">
        <param name="VARIABLE_VALUE" index="1">
          <param name="VARIABLE" value="BCURFPER"/>
          <param name="VARIABLE_TYPE" value="VARIABLE_INPUT_STRING" modification_type="delete_if_value_not_equal">
            <param name="VARIABLE_INPUT_STRING" value="010/2010"/>
          </param>
        </param>
      </param>
    </parameterList>
    Thanks for looking!
    -Gary

    Hi Gary,
    We came across the following issue.Colud you please provide the solution which you used to resolve it.
    " The metadata of "CMD" "SET_ITEM_PARAMETERS" are incorrect for parameter "BUTTON_LIST".
    Thanks,
    Anji

  • Run-Time Error '6' Overflow within BEx Analyzer after copy/paste query

    Hi all,
    User is getting a "Run-time error '6' overflow" message which is caused after copying any query in a 'query pack' to any free row/column within the same sheet (BEx Analyzer). This "query pack" has multiple queries within one sheet and covers 1800 rows so there is enough free space left for copying one of the queries to another position in the same sheet.
    Microsoft Office Excel SP2 is used which is part of MS Office professional edition 2003. The BW version is 3.0.
    Please let me know if more details are required or above mentioned error message is recognized and can be explained.
    Thanks and kind regards,
    Raymond Flaton

    Hi VRV,
      This error is caused whenever there is memory issue. If your query is built on a cube which has a BWA index then this problem can be related to the issue with the BWA server. Check your BASIS team to check if there is memory issue presently in the BWA server.
    Sometimes the issue is temporary, where the several users accesing the reports to fetch data from BWA lead to this type of error as the BWA gets overloaded. Try exiting the report and run it after some time again.
    Alternatively you can also try restricitng the selection for fetching the data in the report as suggested.
    Thanks

  • Need Query Details in BI Backend

    Hi all,
    I need to know the Characteristics, Key Figures, Variables, Filters, Calculated & Restricted Key figures used in a query.  The problem is Front end tools are not opening here, so i couldnt check it up there.  Is there any way that we can all of the query objects in the BI Backend system?
    I tried in RSRT but i could only see the number of Char. & KF but couldnt find the name of them.  I looked into Metadata repository, there i could find the Variables used in the query but the other details are not available.  I also tried looking in Translation and could trace out the Calc. & Res. KF used.  Now, i need to know the Characteristics & Key figures, Filters used and other details of the query. 
    Can somebody help me in telling me where i could find all the details about a query in the Backend?
    Thanks for ur time.
    Regards
    Murali

    Hi
    Is 'RRMX' t-code  working? If yes it will open BEx Anlyser for you & you can do anything there in change global view.
    I hope this is what you want.

  • Want to know query details like user, no.of executions etc

    Dear Experts,
    Based on the Query technical name want  to know the details like: No.of executions, Executed by, execution date etc for a period of 3years i.e from 2009 to Till date.
    it is very urgent reuirement, please help. Thanks in Advance!
    Best Regards,
    Sunil Kumar.B

    Hi Sunil,
    if you are working with BW 3.5 you can look in table RSDDSTAT in BI 7.0 it is RSDDSTAT_OLAP.
    Make a selection on the info cube and the OLAP Statistic Object which is the query ID and execute. Then you should see how often the query was executed, by whom and which date/time.
    in field Query ID you type in the tech name of the query
    Regards
    KP

  • Cude for Query details

    Hi ,
    I want to know if there is any std cube provided by sap where in i can get the details of the query ( how long it take to porcess , user used it... etc.....)
    pls help.
    thank you.

    Hi,
    Try the following cubes which contain technical infos:
    0BWTCFC1     BW Technical Content FC1
    0BWTCFC2     BW Technical Content 2     
    0BWTC_C01     BW Statistics (1.2)     
    0BWTC_C02     BW Statistics -
    0BWTC_C03     BW Statistics –
    0BWTC_C04     BW Statistics - Aggregates     
    0BWTC_C05     BW Statistics -
    0BWTC_C06     BW Data Slice     
    0BWTC_C07     Requests in the InfoCube     
    0BWTC_C08     BW Metadata     
    0BWTC_C09     BW Statistics: Condensing InfoCubes     
    0BWTC_C11     BW Statistics: Deleting Data from InfoCubes
    Hope this helps
    Assign points if useful
    Regards,
    venkat

  • Problem in query detail block

    hello all,
    i have a form having master and detail block. in master we have store_cd and location code(primary key in master table),
    based on that detail recrds fetch in detail block. perfectly fine. but when i query within detail block records then it show no record found. please tell me what can be wrong.
    detail table primary key is (store_cd, location_code and storage_co) , in realtion i mentioned
    masterblock.store_cd=detailblock.store_cd and masterblock.location_cd=detailblock.location_cd
    Thanks
    yash

    yes, there are records in detail table... table structure(master and detail block)
    SQL> desc ivt_store_mst
    Name Null? Type
    STORE_CD NOT NULL VARCHAR2(3)
    STORE_DESC NOT NULL VARCHAR2(25)
    LVL_REF_CD NOT NULL VARCHAR2(6)
    STORE_TYPE VARCHAR2(2)
    Primary key(store_cd,lvl_ref_cd)
    SQL> desc ivt_storg_mst;
    Name Null? Type
    STORE_CD NOT NULL VARCHAR2(3)
    STORAGE_SRL_NO NOT NULL NUMBER(10)
    STORAGE_CD VARCHAR2(10)
    ITEM_CD NOT NULL VARCHAR2(10)
    BAY_NO VARCHAR2(10)
    SHELF_NO VARCHAR2(10)
    ROW_NO VARCHAR2(10)
    TIER_NO VARCHAR2(10)
    BIN_CARD_NO VARCHAR2(10)
    INSERT_DT DATE
    GRN_NO VARCHAR2(12)
    GRN_FIN_YR_CD VARCHAR2(8)
    PLEVEL_REF_CD NOT NULL VARCHAR2(6)
    PGRN_LEVEL_REF_CD VARCHAR2(6)
    Primary key(store_cd,storage_cd, plevel_ref_cd)
    relation property is: noo-isolated
    deferred: false
    autoquery: false
    block join condition based on detail_blk1.stor_cd=masteblk.store_cd
    when i query from master block , ALL detail blocks ITEMS are displaying. but when i query again among detail block items then, no record found base on query field(detail blk: item_cd which is base table field).
    when i query in detail block for all records then Every time only one item display with same item_cd...
    if further some info required, plz mention

  • Datawarehouse query detail report result doesn't match summary report.

    Hello,
    In our DW, we run a detail report query ( like below No. 1) , while in the summary report, in which the query is partially based on aggregated table T_AGG_UNC_GROSS (like below No.2), the query result doesn' match the query result of the details report. (supposed to match exactly)
    To pick out the problem why summary report (like below NO.3) doesn't match details report. I put two filters in the details query with the filter is "year 2007", filter location is "California")
    I can get 295 selected.
    while I put above two filters in summary report, get no row selected.
    I suspect aggregation table has some problem (wrong aggregated).
    Is there any method I can pick out the problem behind?
    thanks a lot in advance.
    --1.detail report
    select D1.c14 as c1,
    D1.c13 as c2,
    D1.c12 as c3,
    D1.c11 as c4,
    D1.c10 as c5,
    D1.c15 as c6,
    D1.c9 as c7,
    D1.c8 as c8,
    D1.c7 as c9,
    D1.c6 as c10,
    D1.c5 as c11,
    D1.c16 as c12,
    D1.c17 as c13,
    D1.c18 as c14,
    D1.c19 as c15,
    D1.c4 as c16,
    D1.c3 as c17,
    D1.c20 as c18,
    D1.c2 as c19,
    D1.c21 as c20,
    D1.c22 as c21,
    D1.c1 as c22
    from
    (select /*+ full(T278878) full(T144662) full(T144546) full(T144557) full(T144665) full(T155155) */ sum(T144442.FINAL_BILL_AMOUNT) as c1,
    sum(T144400.WRITE_OFF_AMOUNT) as c2,
    case when T144416.FMCI_IND = 'Y' then 'Yes-fMCI' else 'No-fMCI' end as c3,
    T144442.IS_FIOS_FLAG as c4,
    T314105.DATE_DESC as c5,
    T144442.CYCLES_DELINQUENT as c6,
    T144590.DATE_DESC as c7,
    T144564.DATE_DESC as c8,
    T144557.LOB_CODE as c9,
    case when T144442.IS_NEVER_PAY_FLAG = 1 then 'Yes-NP' else 'No-NP' end as c10,
    T144416.CLASS_OF_SERVICE as c11,
    T144416.ACCOUNT_NAME as c12,
    T144416.BTN as c13,
    T144416.ACCOUNT_NUMBER as c14,
    T144634.ACCOUNT_STATUS as c15,
    T144687.CSG_ID as c16,
    T441666.DISCONNECT_REASON_DESC as c17,
    T144612.LOB_CODE as c18,
    T144612.STATE_CODE as c19,
    T144640.DATE_DESC as c20,
    T144586.PRIMARY_CIC_CATEGORY as c21,
    T144586.SECONDARY_CIC_DESC as c22
    from
    V_D_STATE T144612 /* V_D_STATE_UNCGRO */ ,
    D_DISCONNECT_REASON T441666 /* D_DISCONNECT_REASON_UNCG */ ,
    D_CUSTOMER_SERVICES_GROUP T144687 /* D_CUSTOMER_SERVICES_GROUP_UNCGRO */ ,
    V_D_ACCOUNT_STATUS_FINAL T144634 /* V_D_ACCOUNT_STATUS_UNCGRO */ ,
    D_DATE T144640 /* D_DATE_UNCGRO */ ,
    V_D_CARRIER_CODES T144586 /* V_D_CARRIER_CODES_UNCGRO */ ,
    F_UNCOLLECTIBLES T144400 /* F_UNCOLLECTIBLES_UNCGRO */ ,
    D_ACCOUNT T144416 /* D_ACCOUNT_UNCGRO */ ,
    D_ACCOUNT_DETAIL T144442 /* D_ACCOUNT_DETAIL_UNCGRO */ ,
    D_LINE_OF_BUSINESS T144557 /* D_LINE_OF_BUSINESS_UNCGRO */ ,
    D_DATE T144564 /* D_DATE_UNCGRO_CONNECT */ ,
    D_DATE T144590 /* D_DATE_UNCGRO_FINAL */ ,
    D_DATE T314105 /* D_DATE_UNCGRO_DISCONNECT */
    where ( T144400.ORGANIZATION_ID = T144612.ORGANIZATION_ID and T144416.ACCOUNT_STATUS_ID = T144634.ACCOUNT_STATUS_ID and T144400.WRITE_OFF_DATE = T144640.DATE_ID and T144400.CIC_CODE_ID = T144586.CIC_CODE_ID and T144416.CUSTOMER_SERVICE_GROUP = T144687.CSG_CD and T144400.ACCOUNT_ID = T144442.ACCOUNT_ID and T144400.ACCOUNT_ID = T144416.ACCOUNT_ID and T144400.DISCONNECT_DATE = T314105.DATE_ID and T144400.WRITEOFF_REFERRAL_IND = 'WRO' and T144416.DISCONNECT_REASON = T441666.DISCONNECT_REASON and T144612.U_STATE_DESC = 'California - BUSINESS' and T144640.YEAR_DESC = 'Year 2007' and T441666.DISCONNECT_REASON_DESC <> 'G' and T144416.FINAL_BILL_DATE = T144590.DATE_ID and T144416.CONNECTION_DATE = T144564.DATE_ID and T144416.LOB_ID = T144557.LOB_ID and T441666.DISCONNECT_REASON_DESC <> 'H' )
    group by T144416.ACCOUNT_NAME, T144416.ACCOUNT_NUMBER, T144416.BTN, T144416.CLASS_OF_SERVICE, T144442.IS_FIOS_FLAG, T144442.CYCLES_DELINQUENT, T144557.LOB_CODE, T144564.DATE_DESC, T144586.PRIMARY_CIC_CATEGORY, T144586.SECONDARY_CIC_DESC, T144590.DATE_DESC, T144612.LOB_CODE, T144612.STATE_CODE, T144634.ACCOUNT_STATUS, T144640.DATE_DESC, T144687.CSG_ID, T314105.DATE_DESC, T441666.DISCONNECT_REASON_DESC, case when T144416.FMCI_IND = 'Y' then 'Yes-fMCI' else 'No-fMCI' end , case when T144442.IS_NEVER_PAY_FLAG = 1 then 'Yes-NP' else 'No-NP' end
    ) D1;
    295 rows selected.
    --2. aggregation table T_AGG_UNC_GROSS
    create table T_AGG_UNC_GROSS parallel nologging as
    SELECT a.account_id,a.ORGANIZATION_ID,a.UNC_LOB_ID,
    MAX (a.WRITEOFF_REFERRAL_IND) AS WRITEOFF_REFERRAL_IND,
    MAX (a.WRITE_OFF_DATE) AS WRITE_OFF_DATE,
    COUNT (1) AS NO_OF_UNC,
    MAX(a.DISCONNECT_DATE) as DISCONNECT_DATE,
    sum(a.WRITE_OFF_AMOUNT) as WRITE_OFF_AMOUNT
    FROM f_uncollectibles a
    GROUP BY a.account_id,a.ORGANIZATION_ID,a.UNC_LOB_ID;
    ---3. sumarry resport (query)
    select SUBSTR (f.WRITE_OFF_DATE, 5, 2)
    || '/'
    || SUBSTR (f.WRITE_OFF_DATE, 7, 2)
    || '/'
    || SUBSTR (f.WRITE_OFF_DATE, 0, 4)
    writeoff_date,
    'ALL CIC',
    o.U_STATE_DESC,
    s.U_ACCOUNT_STATUS,
    rl.RISK_LEVEL,
    d.Amount_Range_ID || ' - WR',
    f.WRITEOFF_REFERRAL_IND,
    fi.fios_flag_desc,
    DR.DISCONNECT_REASON || '-' || DR.DISCONNECT_REASON_DESC,
    b.BEHAVIOR_SCORE || ' - B',
    cs.csg_cd || ' - CG',
    CASE WHEN d.IS_NEVER_PAY_FLAG = 1 THEN 'Yes-NP' ELSE 'No-NP' END
    AS Neverpay_Ind,
    CASE WHEN u.FMCI_IND = 'Y' THEN 'Yes-fMCI' ELSE 'No-fMCI' END
    AS FMCI_IND,
    lob.DESCRIPTION,
    COUNT (f.Account_id) No_of_Accounts,
    SUM (d.NO_DENIAL_NOTICES) NO_DENIAL_NOTICES,
    SUM (d.CYCLES_DELINQUENT) CYCLES_DELINQUENT,
    sum(f.WRITE_OFF_AMOUNT) WRITE_OFF_AMOUNT ,
    sum(d.FINAL_BILL_AMOUNT) FINAL_BILL_AMOUNT
    FROM t_agg_unc_gross f,
    d_account u,
    d_account_detail d,
    D_DISCONNECT_REASON DR,
    d_writeoff_amount_range a,
    v_d_account_status_final s,
    D_BEHAVIOR_RANGE b,
    v_d_state o,
    d_Fios_Indicator fi,
    d_risk_level rl,
    d_customer_services_group cs,
    D_UNCOLLECTIBELS_LOB lob,
    D_DATE
    WHERE f.account_id = u.account_id
    AND u.account_id = d.account_id
    AND d.Amount_Range_ID = a.wo_range_id
    AND d.IS_FIOS_FLAG = fi.FIOS_FLAG
    AND u.Account_Status_ID = S.ACCOUNT_STATUS_ID
    AND u.RISK_LEVEL_ID = rl.risk_level_id
    AND o.organization_id = f.organization_id
    AND dr.DISCONNECT_REASON = u.DISCONNECT_REASON
    AND d.BEHAVIOR_SCORE12 = b.BEHAVIOR_SCORE
    AND u.CUSTOMER_SERVICE_GROUP = cs.csg_cd
    AND Dr.disconnect_reason NOT IN ('H', 'G')
    AND lob.LOB_UNC_ID =f.UNC_LOB_ID
    AND o.U_STATE_DESC = 'California - BUSINESS'
    AND D_DATE.YEAR_DESC = 'Year 2007'
    and  u.FINAL_BILL_DATE = D_DATE.DATE_ID
    --and u.CONNECTION_DATE = D_DATE.DATE_ID
    GROUP BY SUBSTR (f.WRITE_OFF_DATE, 5, 2)
    || '/'
    || SUBSTR (f.WRITE_OFF_DATE, 7, 2)
    || '/'
    || SUBSTR (f.WRITE_OFF_DATE, 0, 4),
    'ALL CIC',
    o.U_STATE_DESC,
    s.U_ACCOUNT_STATUS,
    rl.RISK_LEVEL,
    d.Amount_Range_ID || ' - WR',
    f.WRITEOFF_REFERRAL_IND,
    fi.fios_flag_desc,
    DR.DISCONNECT_REASON || '-' || DR.DISCONNECT_REASON_DESC,
    b.BEHAVIOR_SCORE || ' - B',
    cs.csg_cd || ' - CG',
    lob.DESCRIPTION,
    CASE WHEN d.IS_NEVER_PAY_FLAG = 1 THEN 'Yes-NP' ELSE 'No-NP' END,
    CASE WHEN u.FMCI_IND = 'Y' THEN 'Yes-fMCI' ELSE 'No-fMCI' END;
    no row selected.
    Edited by: ROY123 on Jul 23, 2010 12:17 PM

    fixed.

  • How to get the procedure/query details for the corresponding transaction id

    Hi,
    Is it possible to know the transaction details like (procedure/query) from the correcponding local transaction ID? (for eg:10.10.50935)
    I am working on ORA-01591 issue (lock held by in-doubt distributed transaction) and got the details of in-doubt transactions from dba_2pc_pending view. Further I would like to get additional details about the procedure name and query who is triggering the issue.
    Thanks

    Hi Sybrand,
    The response is not of much help. Can you please tell me in more detail.
    Suppose a transaction is completed long back (say 5 days ago) and I have a transaction id with me. I would like to know the correcponding procedure/query associated with that transaction id.
    Is it really possible to find out old transaction details from any view?

  • Querying Detail Master form

    Hai All,
    Can anyone suggest me how to get the Find window option based on the Detail block.
    Presently I am creating a view based on the required column from the Master and the detail block, creating a find window based on this view, from that I am tracking the header Id and getting the required master detail information.
    Is there any othere way to directly query the detail block from the find window and get the Master Detail Relation.
    Thanks In Advance........

    hello
    here is the solution,i hope this might help u.
    go to the code of your button and change write the following
    go_block('name of your master block');
    execute_query(no_validate);
    and in the object navigator make the first item in the master
    block that it should be displayed in the canvas and it must be a
    navigable item too.not a display item.
    thank you
    Zeeshan Ahmad

Maybe you are looking for

  • G/L account cannot record in the business transaction.

    Dear Experts, When i am using cash journal (FBCJ), some G/L account cannot record in the business transaction. (error msg: you cannot enter tax code in business transaction). I want to know how to edit the business transaction to disable the tax code

  • Change layout for report

    Hi, I am having trouble selecting the 2nd layout as my default layout for this particular report. What could be the issue? Thanks, Regards. Aziz

  • How to display elapsed time on TPC-2006 (Pocket PC 2003) as mm:ss?

    The small attached PDA vi is a simple "egg timer" that measures elapsed time in minutes and seconds.  I've tried every formatting trick I can think of, but cannot get my TPC-2006 to display the elapsed time as mm:ss.  It always displays single digit

  • Index size increased after import

    hi i mentioned already the index creation problem when i am trying to create index using script after import of table.So droped the table and created table using script and index also without data,then i started to import at tablelevel with indexes=n

  • How to run code in sandbox solution with full trust proxy

    Hi, i just want to add a item to list from a sandbox web part. User don't have permission to insert item into list. Spsecurity and Spusertiken both classes are not available in SharePoint online/Office 365. Please, tell me how to do this?