WITH clause in reports

Just a quick question about Reports 10g, does it support queries using the WITH clause? i.e.
WITH alias as (subquery)
SELECT col1, col2...
FROM aliasI can't find anything on the documentation on the OTN site. Reports 9iR2 croaks with this unfortunately.
Regards,
Steve Rooney

That is what I have had to do. I wanted to use the WITH clause because subquery has to be done twice so that I can perform some arithmetic on the result sets. Using the WITH construct I only need to define subquery once and re-use the result set; as a result the version using the WITH clause runs twice as fast in SQL*Plus as the way I have implemented the inline views.
Thanks anyway.
Regards,
Steve Rooney

Similar Messages

  • Report with multiplying columns  and WITH clause

    Hello
    I saw sth strange in my report. I assume that it could happens very often.
    I have report with few columns which two of them ar most complicated (many joins subqueries aggreagations on joined values etc.) These two columns (i.e C3,C4) should be multiplied (C3*C4).
    When i do pure report without multiplying only columns C1,C2,C3,C4 everything is ok - duration about 15 sec. but... when I put next column on report which multiply these columns (in Answers C5=C3*C4)
    I wait 3-4 minutes and my database hungs :(. After investigation I saw that in first case to databese goes pure "SELECT" statement it means:
    "Select ... as C1, ... as C2, max(...) as C3, sum(xxx)... C4 from yyy,sss,ttt WHERE aaa"
    but in second case BI uses WITH clause it means:
    WITH SAWITH0 AS
    ( Select ... as C1, ... as C2, max(...) as C3, sum(xxx)... C4 from yyy,sss,ttt WHERE aaa )
    SELECT SAWITH0.C1 as C1,
    SAWITH0.C2 as C2,
         SAWITH0.C3 as C3,
         SAWITH0.C4 as C4,
         SAWITH0.C3*SAWITH0.C4 as C5 FROM SSS
    and this statement is long runninq query and kills my database :(.
    I checked that SQL like this:
    Select ... as C1, ... as C2, max(...) as C3, sum(xxx)... C4, max(...)*sum(xxx)... As C5 from yyy,sss,ttt WHERE aaa" -
    runs few times faster than that above
    I know that I can do this multiply in business model layer but sometimes users can multiply(or other operations) on columns in reports without my knowledge and it kills my db :(. Where is bug? Why SQLs with WITH clause takes so much db time?
    Thank you for each kind of help

    WITH clause or Subquery Factoring allows the set of data to be reused multiple times within the SQL. Oracle will usually materialize the data into a temporary table (you will see it if you take an explain plan of the SQL).
    I would be surprised if it was the actual WITH clause that was causing the performance issue, however you can test this by turning the WITH clause feature off. Go to the Physical model, right mouse click on your Database > Properties > Features Tab, scroll down to WITH_CLAUSE_SUPPORTED and switch it off.
    I'd be interested to know if you do see actual improvement.
    Good Luck.

  • WITH Clause query doesn't work in Oracle Reports.

    Hi Gurus,
    I'm using a WITH clause query and need to build a report using the same query.
    But when i'm trying to build a report, query is giving error as "WITH clause table or view doesn't exists".
    But the same query perfectly works in sql prompt.
    Oracle Reports doesn't supports WITH clause query?
    Please suggest.
    Thanks,
    Onkar

    I ran into a similar problem before and worked around it by moving the query to a pipelined function in the database as described at WITH clause unexpectedly causes ORA-00942 in Reports Builder
    Hope this helps.

  • WITH clause unexpectedly causes ORA-00942 in Reports Builder

    I'm posting this in the hope that:
    a) My workaround might help someone if they ever run into the same problem, and/or,
    b) Someone might have a better workaround.
    The problem is that I get unexpected ORA-00942 (table or view does not exist) errors when I try to set the SQL Query Statement property of a Query object in Reports Builder to certain SELECT statements that contain a WITH clause (aka subquery factoring clause).
    For example, the following SELECT statement executes as expected in SQL*Plus...
    SQL> WITH
      2      SUB_QUERY AS
      3      (
      4          SELECT
      5              1 AS X
      6          FROM
      7              DUAL
      8      )
      9  SELECT
    10      INLINE_VIEW.X
    11  FROM   
    12      (
    13          SELECT
    14              NESTED_INLINE_VIEW.X
    15          FROM
    16              (
    17                  SELECT
    18                      SUB_QUERY.X
    19                  FROM
    20                      SUB_QUERY
    21              ) NESTED_INLINE_VIEW
    22      ) INLINE_VIEW;
             X
             1...but when I try to use it as the SQL Query Statement for a Query object in Reports Builder, I get the following error:
    ORA-00942: table or view does not exist
    ==>SUB_QUERY
    My Reports Builder version is 10.1.2.0.2 version and my database version is 10.2.0.3.0.
    The "real" query I have been trying to use is much more complex than this -- this is just the simplest statement I have been able to come up with that causes the problem. In fact, I have some queries that have a similar structure (a WITH clause subquery referenced inside a nested inline view, along with some other things), but strangely do not cause the problem.
    I spent some time researching the problem on Google and Metalink but did not come up with any satisfactory answers. The problem sounds similar to bug 3896963, but bug 3896963 involved UNION ALL, and is supposedly fixed in my version(s).
    I tried various ways of restructuring my "real" query, but with no success -- it's going to be hard to get rid of the WITH clauses. As a "wild guess", I tried various hints (MATERIALIZE, NO_PUSH_PRED, NO_MERGE), again with no success.
    I ended up working around the problem by creating a database package with a function that returns a REF CURSOR based on the query, and then used that in a REF CURSOR query in Reports Builder. It might not be a very elegant workaround, but it works. I just wish I had "given up" and tried it sooner -- I might have saved myself some grief.

    Well, for what it's worth, I didn't end up using a REF CURSOR query after all because...
    If I ran a REP file based on a REF CURSOR query against a different database, or if I ran the REP file after the database package had been dropped and re-created, it failed with the following error:
    REP-8: Run time error in the PL/SQL development environment (DE).
    PDE-PSD001 Could not resolve reference to <Unknown Program Unit> while loading <Unknown> <Unknown>.
    REP-0008: Unexpected memory error while initializing preferences.
    It seems that Reports "binds" the REP file to the timestamp of the database package that defines the REF CURSOR type in order to validate the package at run time. If the timestamp is different, running the REP file will fail with this error. This is apparently bug 1275333 and is described in Metalink Note 272936.1.
    The bug reference and Metalink Note offerred the following workarounds:
    1. Export the database schema that contains the package from one database and import it into the other.
    In some versions, import and export preserve the timestamp, so this would avoid the problem. I didn't try this because it would not be a practical workaround in my situation (upgrade vs. new install).
    2. Recompile the package and manually set the timestamp using the seemingly undocumented ALTER PACKAGE...COMPILE BODY REUSE SETTINGS TIMESTAMP... syntax.
    I didn't try this because I didn't like the idea of having to: a) rely on an undocumented feature, and, b) manually keep track and maintain the timestamps of all the affected packages across several databases (e.g., development, test, and production).
    3. Put the package into a Reports library or into the report itself.
    This didn't work for me because Reports does not understand WITH clauses in PL/SQL. For example, with the example query in my previous post, I get an error like this:
    Error 103 at line {line defining name of factored subquery}, column {first column in line defining name of factored subquery}
    Encountered the symbol "SUB_QUERY" when expecting one of the following:
    &lt;a SQL statement&gt;
    4. Use an RDF file instead of a REP file.
    I didn't use this workaround because I wanted to protect the design of the report by using a REP file instead of an RDF file.
    So instead, I:
    1. Created a database package containing a pipelined function that returned the results of the WITH clause query that Reports did not "understand".
    2. Used an SQL query in my report of the form
    SELECT * FROM TABLE(MY_PACKAGE.MY_PIPELINED_FUNCTION(arg1, arg2, ...))
    I can drop and re-create the package and run the REP file against another database both without leading to the REP-8 error.

  • Error in writing WITH CLAUSE

    i am writing these SQL Lines in my stored procedure i am using with clause i am getting error when i perform
    inner join
    With  WardItemsDtl as ( SELECT WardItemDtl_ID,
    WardTransID,
    wdDtl.ItemID,
    SUM(ItemQty) ItemQty,
    ReceivedWardID as WardID
    FROM LL_WardItems_Details wdDtl
    WHERE isposted = 0
    GROUP BY wdDtl.ItemID,WardItemDtl_ID,ReceivedWardID,WardTransID
    ORDER BY WardItemDtl_ID )
    , PartyItemsDtl AS ( SELECT WardItemDtl_ID,
    ItemID,
    SUM(IssueItemQty) IssueItemQty
    FROM LL_PartyItems_Details
    GROUP BY WardItemDtl_ID,ItemID
    ORDER BY WardItemDtl_ID )
    SELECT wdDt.WardTransID,
    wdDt.ItemID,
    itmt.ItemCode,
    itmt.ItemDescription,
    wdDt.ItemQty as TotalItemQty,
    NVL(pDtl.IssueItemQty, 0) as IssueQtyToParty,
    wdDt.WardID,
    wdmt.Ward_Name
    from WardItemsDtl wdDt,PartyItemsDtl pDtl
    inner join LLItemMst itmt
    on itmt.ItemID=wdDt.ItemID -----error in this line
    inner join ward_mst wdmt -- error in this line
    on wdmt.Ward_ID=wdDt.WardID
    error
    Error report:
    SQL Error: ORA-00904: "WDDT"."ITEMID": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    WITH WARDITEMSDTL AS
      (SELECT WARDITEMDTL_ID,
        WARDTRANSID,
        WDDTL.ITEMID,
        SUM(ITEMQTY) ITEMQTY,
        RECEIVEDWARDID AS WARDID
      FROM LL_WARDITEMS_DETAILS WDDTL
      WHERE ISPOSTED = 0
      GROUP BY WDDTL.ITEMID,
        WARDITEMDTL_ID,
        RECEIVEDWARDID,
        WARDTRANSID
      ORDER BY WARDITEMDTL_ID
      PARTYITEMSDTL AS
      (SELECT WARDITEMDTL_ID,
        ITEMID,
        SUM(ISSUEITEMQTY) ISSUEITEMQTY
      FROM LL_PARTYITEMS_DETAILS
      GROUP BY WARDITEMDTL_ID,
        ITEMID
      ORDER BY WARDITEMDTL_ID
    SELECT WDDT.WARDTRANSID,
      WDDT.ITEMID,
      ITMT.ITEMCODE,
      ITMT.ITEMDESCRIPTION,
      WDDT.ITEMQTY              AS TOTALITEMQTY,
      NVL(PDTL.ISSUEITEMQTY, 0) AS ISSUEQTYTOPARTY,
      WDDT.WARDID,
      WDMT.WARD_NAME
    FROM WARDITEMSDTL WDDT,
      PARTYITEMSDTL PDTL,
    LLITEMMST ITMT,
    WARD_MST WDMT     
    WHERE ITMT.ITEMID=WDDT.ITEMID
    AND  WDMT.WARD_ID=WDDT.WARDID ;AND WHERE YOUR JOIN PARTYITEMSDTL PDTL

  • With clause within proc

    Hi Gurus
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    I am trying to create a procedure that I would run occasionally for reporting purposes, the procedure is going to populate test_stats table, which then will be accessed through Excel.
    Following code gives out an error. I think it is regarding WITH clause...
    ERROR line 10, col 12, ending_line 10, ending_col 12, Found 'x', Expecting: ( or SELECT VALUES
    1. Is wrapping up all insert statements into one proc a good idea? Other options?
    2. I have checked the oracle docs and I didnt see any restriction regarding the use of WITH within proc. What is the cause of the error?
    test_stats has only one column NUMBER.
    CREATE OR REPLACE PROCEDURE test_stats_1
    IS
    BEGIN
       INSERT INTO test_stats
          WITH x AS
               (SELECT count(*) cnt
                  FROM DUAL) --some complex query
          SELECT cnt
            FROM x;
    END;
    / Thanks
    T

    zx8754 wrote:
    My client version is:
    DEFINE _SQLPLUS_RELEASE = "1002000400" (CHAR)It is higher value than yours, does this mean mine is newer?
    btw, that INSERT statement on its own without proc works fine.
    Edited by: zx8754 on 02-Jul-2010 03:10What is your exact database version? The client version shouldn't matter.
    I had a similiar problem once in oracle 9.2.0.3. The SQL syntax inside PL was slightly behind the normal SQL syntax. This lead to the effect that I could run a specific SQL statement in SQL*PLUS but not from inside a package. At this time it had been the order clause of the XMLAGG function. This was a bug and was fixed in a later version (9.2.0.4 or 9.2.0.8).
    Maybe you have a similiar issue, also I thought that this versioning conflict was fixed in Oracle 10.x.
    btw it works for me:
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 2 16:57:54 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    xxx@yyy> CREATE OR REPLACE PROCEDURE test_stats_1
      2  IS
      3  BEGIN
      4     INSERT INTO test_stats
      5  WITH x AS
      6             (SELECT count(*) cnt
      7                FROM DUAL) --some complex query
      8        SELECT cnt
      9          FROM x;
    10  END;
    11  /
    Procedure created.
    xxx@yyy> Edited by: Sven W. on Jul 2, 2010 4:59 PM

  • Adding dynamic 'start with' clause in Hierarchial query in Discoverer 4i

    I have created a custom folder based upon the following hierarchial guery:
    SELECT supervisor_name, level
    FROM xxhr084_hr_emps_v
    START WITH supervisor_name = 'TEST SUPER'
    CONNECT BY prior person_id = supervisor_id
    ORDER SIBLINGS by supervisor_name
    I want the 'START WITH' value to be based upon a parameter i.e. the User enters the value of supervisor name at runtime.
    However, I can't use a parameter within the custom folder and I can't generate the 'start with' condition in my workbook.
    Anyone have a solution for populating the start with clause at run-time?
    Thanks,
    Kevin

    Can you create the custom folder without a condition on supervisor_name - i.e. without the supervisor_name = 'X' starts with clause - in the EUL, and then define the condition on the supervisor_name field within the report?
    SELECT supervisor_name, level
    FROM xxhr084_hr_emps_v
    CONNECT BY prior person_id = supervisor_id
    ORDER SIBLINGS by supervisor_name
    You can then restrict the results that the hierarchical query returns (from the custom folder) within the report, by adding a condition on supervisor_name.
    Hope that makes some sense.

  • 'CONNECT BY PRIOR..START WITH'  clause  Usage

    Hi All,
    Could you please let me know the usage of 'connect by prior...start with' clause.
    I only know that it helps for hierarchial retrival,but not aware of details.
    Can someone provide the use with example for the same.
    On searching on the net,I have seen numerous examples but none of them could explain it properly and everywhere the same SCOTT/TIGER schemas EMP and MGR table's example is given which is not enough explanatory.
    Thanks in advance...
    Aashish S.

    suppose u need to get all employees in a company in a hirerchical manner
    ie presdent then mgrs
    then employeess reporting to them
    this can be done using connect by prior and start by
    select empname from emp
    connect by prior empno=mgrno
    start with mgrno is null

  • Avoiding WITH clause when querying Multiple Facts

    OBIEE 10.1.3.4
    We have a report which requires that we query multiple facts, which share the same Item dimension.
    When we run the report, the BI Server generates a query using the WITH clause -
    WITH SAWITH0 ( SELECT.............)
    SAWITH1( SELECT .............)
    SELECT .........
    FROM SAWITH0 FULL OUTER JOIN SAWITH1
    The above query errors out with ORA-918 Column Ambiguously Defined. I cannot find any issue in the query that has been generated.
    The query does fail from SQL Plus with the same ORA error. But each of the select statements executed properly and the complete statement executes when I replace the FULL OUTER JOIN with INNER JOIN.
    I can only assume that this is a bug in Oracle Database.
    Now at times I have seen OBIEE generate separate queries when querying multiple facts and then combine the data together in memory.
    Is there a way that I can force OBIEE to avoid using WITH clause and run separate SELECT statements ? How does the BI Server choose between using a WITH clause or running separate queries ?
    Any help would be appreciated.

    I do not have a multi-dimensional data source.
    My connection pool seems fine to me, I am not sure I need to do anything with the connection pool.
    Hi Turribeach,
    I understand that BI Server uses WITH clause for multiple facts. But I have also seen it issue separate queries against the database.
    So what I am looking to understand under what situation does it issue separate queries i.e. No WITH clause ?
    Thanks

  • ABAP 'WITH' Clause

    Does ABAP have something like a WITH clause?
    Other languages allow me to something like ...
    WITH myrec DO
    {do some processing}
    ENDWITH
    I find that I am ...
    wa-field1 = 'newdata1'.
    wa-field1 = 'newdata2'.
    wa-field99 = 'newdata99'.
    ... seems very labourious

    For example.........
    report zrich_0001.
    data: begin of xstruc,
          fld1(10) type c,
          fld2(10) type c,
          fld3(10) type c,
          fld4(10) type c,
          fld5(10) type c,
          end of xstruc.
    data: istr type table of string with header line.
    field-symbols: <fs> .
    istr = 'Value A'.  append istr.
    istr = 'Value B'.  append istr.
    istr = 'Value C'.  append istr.
    istr = 'Value D'.  append istr.
    istr = 'Value E'.  append istr.
    loop at istr.
      assign component sy-tabix of structure xstruc to <fs>.
      if sy-subrc <> 0.
        exit.
      endif.
      <fs> = istr.
    endloop.
    write:/ xstruc-fld1,
            xstruc-fld2,
            xstruc-fld3,
            xstruc-fld4,
            xstruc-fld5.
    Regards,
    Rich Heilman

  • Help with WITH clause

    I have a complicated summary report that I am trying to put together. Using the WITH clause is substantially reducing the query time. Here's what I have (it works):
    with ldsntons as
    (select c.DATE_INDEX, j.FACTORY_ID, s.SHORT_NM||' ('||j.STATION_ID||') '||j.PILE_CODE_ALT_FLAG as STN_NM,
           COUNT(j.LOAD_JOB_ID) as LDS,
        CASE SUM(w.SPOT_WEIGHT)
           WHEN 0 THEN SUM(j.MAN_SPOT_WT)
           ELSE SUM(w.SPOT_WEIGHT)
         END TONS
      from TC c, TC_LOAD_JOBS j, SPOT_WEIGHTS w, STATIONS s
    where c.TC_ID = j.TC_ID
       and FN_STN_KEY(j.FACTORY_ID, j.STATION_ID) = s.KEY_ID
       and j.LOAD_RATE_ID = w.LOAD_RATE_ID
       and c.DATE_INDEX = w.DATE_INDEX
       and c.DATE_INDEX BETWEEN to_date(:P2053_DT,'MM/DD/YYYY') AND to_date(:P2053_DT,'MM/DD/YYYY') +15  -- Optional filter
    group by c.DATE_INDEX, j.FACTORY_ID, j.STATION_ID, s.SHORT_NM, j.PILE_CODE_ALT_FLAG)
    SELECT STN_NM as STN,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')    THEN LDS  END), 0) D01LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')    THEN TONS END), 0) D01TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+1  THEN LDS  END), 0) D02LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+1  THEN TONS END), 0) D02TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+2  THEN LDS  END), 0) D03LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+2  THEN TONS END), 0) D03TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+3  THEN LDS  END), 0) D04LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+3  THEN TONS END), 0) D04TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+4  THEN LDS  END), 0) D05LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+4  THEN TONS END), 0) D05TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+5  THEN LDS  END), 0) D06LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+5  THEN TONS END), 0) D06TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+6  THEN LDS  END), 0) D07LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+6  THEN TONS END), 0) D07TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+7  THEN LDS  END), 0) D08LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+7  THEN TONS END), 0) D08TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+8  THEN LDS  END), 0) D09LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+8  THEN TONS END), 0) D09TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+9  THEN LDS  END), 0) D10LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+9  THEN TONS END), 0) D10TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+10 THEN LDS  END), 0) D11LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+10 THEN TONS END), 0) D11TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+11 THEN LDS  END), 0) D12LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+11 THEN TONS END), 0) D12TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+12 THEN LDS  END), 0) D13LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+12 THEN TONS END), 0) D13TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+13 THEN LDS  END), 0) D14LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+13 THEN TONS END), 0) D14TNS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+14 THEN LDS  END), 0) D15LDS,
    NVL(SUM(CASE WHEN DATE_INDEX = to_date(:P2053_DT,'MM/DD/YYYY')+14 THEN TONS END), 0) D15TNS,
    SUM(LDS),
    SUM(TONS)
      FROM ldsntons
    WHERE FACTORY_ID = :P2053_ORG_ID
    GROUP BY STN_NMBasically the report lists a location with daily activity in columns for 15 days from that location. What I need to add are subtotals at the end of the line. I tried duplicating my WITH clause to pull the subtotals, but I kept getting an incorrect join that was listing all the amounts regardless of the date, which isn't correct.
    The other kicker is that I can get it to work fine if I restrict the initial WITH statement to include a WHERE clause (-- Optional filter) that filters it down to only data within the range, but the requestor wants to see all the locations regardless of whether they haul during the time period or not.
    Your help is greatly appreciated.

    This report is a cross-tab of data compiled from 4-5 other tables. I understand what you are asking, but I can't possibly post that much information. This is an aggregation of hundreds of employee timecards per day having dozens of loads; even to get a representative set you would need several hundred lines. The report lists the loads and tons for each of the 15 days on the report by virtue of the case statement. What I need is a sub-total (by line) of those 15 days into one field at the end of the line. It's not that hard to do in a spreadsheet, but we're trying to skip the need to export to csv and do manual manipulations after the fact.
    This is what I want the report to look like:
    STATION     DAY1LOADS   DAY1TONS   DAY2LOADS   DAY2TONS ...  DAY15LOADS   DAY15TONS   SUBTTLLOADS   SUBTTLTONS
    Ada            10           300          12        350             5         150       40        1200SUBTTLTONS = DAY1TONS + DAY2TONS + DAY3TONS, etc.
    I was hoping there was a simpler way of doing it than adding the individual columns into an aggregate. I can develop the query I need, I just need help with joining it in to the base query. This query gets me the subtotals:
    select s.SHORT_NM||' ('||j.STATION_ID||') '||j.PILE_CODE_ALT_FLAG as STN_NM,
           COUNT(j.LOAD_JOB_ID) as LDS,
        CASE SUM(w.SPOT_WEIGHT)
           WHEN 0 THEN SUM(j.MAN_SPOT_WT)
           ELSE SUM(w.SPOT_WEIGHT)
         END TONS
      from TC c, TC_LOAD_JOBS j, SPOT_WEIGHTS w, STATIONS s
    where c.TC_ID = j.TC_ID
       and FN_STN_KEY(j.FACTORY_ID, j.STATION_ID) = s.KEY_ID
       and j.LOAD_RATE_ID = w.LOAD_RATE_ID
       and c.DATE_INDEX = w.DATE_INDEX
       and j.FACTORY_ID = :P2053_ORG_ID
       and c.DATE_INDEX BETWEEN to_date(:P2053_DT,'MM/DD/YYYY') AND to_date(:P2053_DT,'MM/DD/YYYY') +15
    group by s.SHORT_NM||' ('||j.STATION_ID||') '||j.PILE_CODE_ALT_FLAG

  • WITH CLAUSES - need advice

    Recently we found that the server converts all the request to 'with clauses' format in the physical query even if the request does not contain any subquery. I am bit concerned on this as some article suggest that there is a limitation in using with clauses and it can return unexpected results. Could this change in behavior cause some problem?

    Hi all,
    We are currently using ORACLE 10g.
    For ex the original query for a specific report would look like
    select distinct D1.c1 as c1,
    D1.c2 as c2
    from
    (select distinct T41994.NAME as c1,
    T41994.LOC as c2
    from
    (SELECT
    A.*,
    ORA62102.F_UTC2LOCAL(A.CREATED_TS,'(GMT-08:00) Pacific Time (US & Canada); Tijuana') AS CREATED_LCL,
    ORA62102.F_UTC2LOCAL(A.LAST_UPD,'(GMT-08:00) Pacific Time (US & Canada); Tijuana') AS LAST_UPD_LCL,
    ORA62102.F_UTC2LOCAL(A.REFERENCE_START_DT,'(GMT-08:00) Pacific Time (US & Canada); Tijuana') AS REFERENCE_START_DT_LCL,
    ORA62102.F_UTC2LOCAL(A.INDEXED_DATE_0,'(GMT-08:00) Pacific Time (US & Canada); Tijuana') AS INDEXED_DATE_0_LCL
    FROM ORA62102.S_ORG_EXT A) T41994
    where ( T41994.BU_ID = '1-D3DGK' and T41994.DELETED_STATE = 'N' )
    ) D1
    Now the query is changed to the following format
    WITH
    SAWITH0 AS (select distinct T41994.NAME as c1,
    T41994.LOC as c2
    from
    (SELECT
    A.*,
    ORA62105.F_UTC2LOCAL(A.CREATED_TS,'(GMT-08:00) Pacific Time (US & Canada); Tijuana') AS CREATED_LCL,
    ORA62105.F_UTC2LOCAL(A.LAST_UPD,'(GMT-08:00) Pacific Time (US & Canada); Tijuana') AS LAST_UPD_LCL,
    ORA62105.F_UTC2LOCAL(A.REFERENCE_START_DT,'(GMT-08:00) Pacific Time (US & Canada); Tijuana') AS REFERENCE_START_DT_LCL,
    ORA62105.F_UTC2LOCAL(A.INDEXED_DATE_0,'(GMT-08:00) Pacific Time (US & Canada); Tijuana') AS INDEXED_DATE_0_LCL
    FROM ORA62105.S_ORG_EXT A) T41994
    where ( T41994.BU_ID = '1-D3DGK' and T41994.DELETED_STATE = 'N' ) )
    select distinct SAWITH0.c1 as c1,
    SAWITH0.c2 as c2
    from
    SAWITH0
    Even if I select 2 columns from a table , the select clause in the physical query in OBI server contains 'with clause'.
    -Uma

  • I just installed Lion on my mac and now Safari will not open.  Keep getting this message:  Safari quit unexpectedly, it gives me an optionto reopen or just click ok.  I click reopen and it gives me the same message, with a long report of information.

    I just installed Lion on my mac and now Safari will not open.  Keep getting this message:  Safari quit unexpectedly, it gives me an optionto reopen or just click ok.  I click reopen and it gives me the same message, with a long report of information.  Ran disk permissions repair and still does the same.  I can't even figure out how to copy the report into this question.  Please help!

    Process:    
    Safari [209]
    Path:       
    /Applications/Safari.app/Contents/MacOS/Safari
    Identifier: 
    com.apple.Safari
    Version:    
    5.1.6 (7534.56.5)
    Build Info: 
    WebBrowser-7534056005000000~6
    Code Type:  
    X86-64 (Native)
    Parent Process:  launchd [140]
    Date/Time:  
    2012-08-17 09:39:19.212 -0500
    OS Version: 
    Mac OS X 10.7.4 (11E53)
    Report Version:  9
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Application Specific Information:
    objc[209]: garbage collection is OFF
    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: (index >= 0) && (index < [_itemArray count])'
    *** First throw call stack:
    0   CoreFoundation                 
    0x00007fff9428ef56 __exceptionPreprocess + 198
    1   libobjc.A.dylib                
    0x00007fff904fed5e objc_exception_throw + 43
    2   CoreFoundation                 
    0x00007fff9428ed8a +[NSException raise:format:arguments:] + 106
    3   Foundation                     
    0x00007fff8f2d771f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
    4   AppKit                         
    0x00007fff953a4cdf -[NSMenu itemAtIndex:] + 165
    5   AppKit                         
    0x00007fff953a4e38 -[NSMenu removeItemAtIndex:] + 63
    6   Safari                         
    0x000000010cb99c2e -[AppController awakeFromNib] + 387
    7   CoreFoundation                 
    0x00007fff94285fb1 -[NSObject performSelector:] + 49
    8   CoreFoundation                 
    0x00007fff94285f32 -[NSSet makeObjectsPerformSelector:] + 274
    9   AppKit                         
    0x00007fff9538c9ff -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1245
    10  AppKit                         
    0x00007fff95382f73 loadNib + 322
    11  AppKit                         
    0x00007fff95382470 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217
    12  AppKit                         
    0x00007fff9538238b +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141
    13  AppKit                         
    0x00007fff953822ce +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364
    14  AppKit                         
    0x00007fff955f306f NSApplicationMain + 398
    15  Safari                         
    0x000000010cd9c806 SafariMain + 166
    16  Safari                         
    0x000000010cb82f24 Safari + 3876
    terminate called throwing an exception
    abort() called
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   libsystem_kernel.dylib   
    0x00007fff97a6bce2 __pthread_kill + 10
    1   libsystem_c.dylib        
    0x00007fff963557d2 pthread_kill + 95
    2   libsystem_c.dylib        
    0x00007fff96346a7a abort + 143
    3   libc++abi.dylib          
    0x00007fff901d27bc abort_message + 214
    4   libc++abi.dylib          
    0x00007fff901cffcf default_terminate() + 28
    5   libobjc.A.dylib          
    0x00007fff904ff1b9 _objc_terminate + 94
    6   libc++abi.dylib          
    0x00007fff901d0001 safe_handler_caller(void (*)()) + 11
    7   libc++abi.dylib          
    0x00007fff901d005c std::terminate() + 16
    8   libc++abi.dylib          
    0x00007fff901d1152 __cxa_throw + 114
    9   libobjc.A.dylib          
    0x00007fff904fee7a objc_exception_throw + 327
    10  com.apple.CoreFoundation 
    0x00007fff9428ed8a +[NSException raise:format:arguments:] + 106
    11  com.apple.Foundation     
    0x00007fff8f2d771f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
    12  com.apple.AppKit         
    0x00007fff953a4cdf -[NSMenu itemAtIndex:] + 165
    13  com.apple.AppKit         
    0x00007fff953a4e38 -[NSMenu removeItemAtIndex:] + 63
    14  com.apple.Safari.framework
    0x000000010cb99c2e -[AppController awakeFromNib] + 387
    15  com.apple.CoreFoundation 
    0x00007fff94285fb1 -[NSObject performSelector:] + 49
    16  com.apple.CoreFoundation 
    0x00007fff94285f32 -[NSSet makeObjectsPerformSelector:] + 274
    17  com.apple.AppKit         
    0x00007fff9538c9ff -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1245
    18  com.apple.AppKit         
    0x00007fff95382f73 loadNib + 322
    19  com.apple.AppKit         
    0x00007fff95382470 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217
    20  com.apple.AppKit         
    0x00007fff9538238b +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141
    21  com.apple.AppKit         
    0x00007fff953822ce +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364
    22  com.apple.AppKit         
    0x00007fff955f306f NSApplicationMain + 398
    23  com.apple.Safari.framework
    0x000000010cd9c806 SafariMain + 166
    24  com.apple.Safari         
    0x000000010cb82f24 0x10cb82000 + 3876
    Thread 1:: Dispatch queue: com.apple.libdispatch-manager
    0   libsystem_kernel.dylib   
    0x00007fff97a6c7e6 kevent + 10
    1   libdispatch.dylib        
    0x00007fff9076578a _dispatch_mgr_invoke + 923
    2   libdispatch.dylib        
    0x00007fff9076431a _dispatch_mgr_thread + 54
    Thread 2:: Dispatch queue: com.apple.CFURLCACHE_work_queue
    0   libsystem_kernel.dylib   
    0x00007fff97a6c5b6 fsync + 10
    1   libsqlite3.dylib         
    0x00007fff92026e38 unixSync + 72
    2   libsqlite3.dylib         
    0x00007fff92034991 syncJournal + 705
    3   libsqlite3.dylib         
    0x00007fff92025a1e sqlite3PagerCommitPhaseOne + 1262
    4   libsqlite3.dylib         
    0x00007fff9201111e sqlite3BtreeCommitPhaseOne + 478
    5   libsqlite3.dylib         
    0x00007fff92010735 vdbeCommit + 981
    6   libsqlite3.dylib         
    0x00007fff91fd355a sqlite3VdbeHalt + 4442
    7   libsqlite3.dylib         
    0x00007fff920051a6 sqlite3VdbeExec + 51958
    8   libsqlite3.dylib         
    0x00007fff91ff7a5b sqlite3_step + 1883
    9   libsqlite3.dylib         
    0x00007fff91fbafb5 sqlite3_exec + 533
    10  com.apple.CFNetwork      
    0x00007fff925f666c __CFURLCache::PostDatabaseOpenPragmaExecute() + 48
    11  com.apple.CFNetwork      
    0x00007fff925f6542 __CFURLCache::OpenDatabase() + 196
    12  com.apple.CFNetwork      
    0x00007fff925f6040 ProcessCacheTasks(__CFURLCache*, bool) + 265
    13  com.apple.CFNetwork      
    0x00007fff925f5a72 _ZL24_CFURLCacheTimerCallbackPv + 662
    14  libdispatch.dylib        
    0x00007fff90763a86 _dispatch_call_block_and_release + 18
    15  libdispatch.dylib        
    0x00007fff907652d6 _dispatch_queue_drain + 264
    16  libdispatch.dylib        
    0x00007fff90765132 _dispatch_queue_invoke + 54
    17  libdispatch.dylib        
    0x00007fff9076492c _dispatch_worker_thread2 + 198
    18  libsystem_c.dylib        
    0x00007fff963553da _pthread_wqthread + 316
    19  libsystem_c.dylib        
    0x00007fff96356b85 start_wqthread + 13
    Thread 3:
    0   libsystem_kernel.dylib   
    0x00007fff97a6c192 __workq_kernreturn + 10
    1   libsystem_c.dylib        
    0x00007fff96355594 _pthread_wqthread + 758
    2   libsystem_c.dylib        
    0x00007fff96356b85 start_wqthread + 13
    Thread 4:: WebCore: IconDatabase
    0   libsystem_kernel.dylib   
    0x00007fff97a6ca8e pread + 10
    1   libsqlite3.dylib         
    0x00007fff91fb8ce5 unixRead + 69
    2   libsqlite3.dylib         
    0x00007fff91fda4f6 readDbPage + 102
    3   libsqlite3.dylib         
    0x00007fff91fd8c9b sqlite3PagerAcquire + 315
    4   libsqlite3.dylib         
    0x00007fff92007872 moveToChild + 146
    5   libsqlite3.dylib         
    0x00007fff92009b68 sqlite3BtreeNext + 600
    6   libsqlite3.dylib         
    0x00007fff92002909 sqlite3VdbeExec + 41561
    7   libsqlite3.dylib         
    0x00007fff91ff7a5b sqlite3_step + 1883
    8   com.apple.WebCore        
    0x000000010dc35eff WebCore::SQLiteStatement::step() + 63
    9   com.apple.WebCore        
    0x000000010dc366cc WebCore::IconDatabase::performURLImport() + 908
    10  com.apple.WebCore        
    0x000000010dc34d3b WebCore::IconDatabase::iconDatabaseSyncThread() + 475
    11  com.apple.JavaScriptCore 
    0x000000010d57811f _ZN3WTFL19wtfThreadEntryPointEPv + 15
    12  libsystem_c.dylib        
    0x00007fff963538bf _pthread_start + 335
    13  libsystem_c.dylib        
    0x00007fff96356b75 thread_start + 13
    Thread 5:: CoreAnimation render server
    0   libsystem_kernel.dylib   
    0x00007fff97a6a67a mach_msg_trap + 10
    1   libsystem_kernel.dylib   
    0x00007fff97a69d71 mach_msg + 73
    2   com.apple.QuartzCore     
    0x00007fff94fb12d9 CA::Render::Server::server_thread(void*) + 184
    3   com.apple.QuartzCore     
    0x00007fff94fb1219 thread_fun + 24
    4   libsystem_c.dylib        
    0x00007fff963538bf _pthread_start + 335
    5   libsystem_c.dylib        
    0x00007fff96356b75 thread_start + 13
    Thread 0 crashed with X86 Thread State (64-bit):
      rax: 0x0000000000000000  rbx: 0x0000000000000006  rcx: 0x00007fff6c780418  rdx: 0x0000000000000000
      rdi: 0x000000000000060b  rsi: 0x0000000000000006  rbp: 0x00007fff6c780440  rsp: 0x00007fff6c780418
       r8: 0x00007fff7e6cffb8   r9: 0x00007fff6c77fea8  r10: 0x00007fff97a6bd0a  r11: 0xffffff80002da8d0
      r12: 0x00007fe41260e3d0  r13: 0x000000000000000d  r14: 0x00007fff7e6d2960  r15: 0x00007fff6c780590
      rip: 0x00007fff97a6bce2  rfl: 0x0000000000000246  cr2: 0x0000000110792000
    Logical CPU: 0
    Binary Images:
    0x10cb82000 -   
    0x10cb82fff  com.apple.Safari (5.1.6 - 7534.56.5) <C1A60C3B-9DA6-3FE7-87BA-6B09016A39A9> /Applications/Safari.app/Contents/MacOS/Safari
    0x10cb8d000 -   
    0x10d027ff7  com.apple.Safari.framework (7536 - 7536.25) <C95F0D4E-6984-3D2F-B0BA-5D12A164EAC8> /System/Library/StagedFrameworks/Safari/Safari.framework/Safari
    0x10d345000 -   
    0x10d5d4fff  com.apple.JavaScriptCore (7536 - 7536.24) <C613502E-BC98-3269-A25C-4BDB2D87590B> /System/Library/StagedFrameworks/Safari/JavaScriptCore.framework/JavaScriptCore
    0x10d683000 -   
    0x10d805ff7  com.apple.WebKit (7536 - 7536.25) <8D171955-A1CA-31AA-B701-B9D4F760B10B> /System/Library/StagedFrameworks/Safari/WebKit.framework/WebKit
    0x10d8f6000 -   
    0x10dacffff  com.apple.WebKit2 (7536 - 7536.25) <15991DAF-D0C9-3D65-A96B-AF7428ADCC4E> /System/Library/StagedFrameworks/Safari/WebKit2.framework/WebKit2
    0x10dc31000 -   
    0x10ebd6ff7  com.apple.WebCore (7536 - 7536.24) <F2C26660-05D7-34A7-9158-9C3D21BEB32F> /System/Library/StagedFrameworks/Safari/WebCore.framework/WebCore
    0x7fff6c782000 -
    0x7fff6c7b6baf  dyld (195.6 - ???) <C58DAD8A-4B00-3676-8637-93D6FDE73147> /usr/lib/dyld
    0x7fff8e14e000 -
    0x7fff8e17bfe7  libSystem.B.dylib (159.1.0 - compatibility 1.0.0) <DA79E5BA-BBA3-3768-AAD8-B34BA877EF03> /usr/lib/libSystem.B.dylib
    0x7fff8e17c000 -
    0x7fff8e643fff  FaceCoreLight (1.4.7 - compatibility 1.0.0) <BDD0E1DE-CF33-3AF8-B33B-4D1574CCC19D> /System/Library/PrivateFrameworks/FaceCoreLight.framework/Versions/A/FaceCoreLi ght
    0x7fff8e73a000 -
    0x7fff8e742fff  libsystem_dnssd.dylib (??? - ???) <D9BB1F87-A42B-3CBC-9DC2-FC07FCEF0016> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff8e745000 -
    0x7fff8e7b8fff  libstdc++.6.dylib (52.0.0 - compatibility 7.0.0) <6BDD43E4-A4B1-379E-9ED5-8C713653DFF2> /usr/lib/libstdc++.6.dylib
    0x7fff8efd1000 -
    0x7fff8f006fff  com.apple.securityinterface (5.0 - 55022.4) <09EC371E-0B6E-3849-A6C9-F8E9DB17BBCD> /System/Library/Frameworks/SecurityInterface.framework/Versions/A/SecurityInter face
    0x7fff8f1de000 -
    0x7fff8f207ff7  com.apple.framework.Apple80211 (7.2.1 - 721.3) <4BA49D6F-373B-3F4E-A2B3-453C2ED66318> /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211
    0x7fff8f20c000 -
    0x7fff8f525fff  com.apple.Foundation (6.7.2 - 833.25) <22AAC369-B63C-3C55-8AC6-C3ECBA44DA7B> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    0x7fff8f526000 -
    0x7fff8f53cfff  libGL.dylib (??? - ???) <6A473BF9-4D35-34C6-9F8B-86B68091A9AF> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
    0x7fff8f586000 -
    0x7fff8f58afff  libmathCommon.A.dylib (2026.0.0 - compatibility 1.0.0) <FF83AFF7-42B2-306E-90AF-D539C51A4542> /usr/lib/system/libmathCommon.A.dylib
    0x7fff8f58b000 -
    0x7fff8f7fefff  com.apple.CoreImage (7.98 - 1.0.1) <73485E4E-1407-3913-AB3C-B54986A3E01C> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage .framework/Versions/A/CoreImage
    0x7fff8f7ff000 -
    0x7fff8f800fff  libdnsinfo.dylib (395.11.0 - compatibility 1.0.0) <853BAAA5-270F-3FDC-B025-D448DB72E1C3> /usr/lib/system/libdnsinfo.dylib
    0x7fff8f801000 -
    0x7fff8f805fff  libdyld.dylib (195.6.0 - compatibility 1.0.0) <FFC59565-64BD-3B37-90A4-E2C3A422CFC1> /usr/lib/system/libdyld.dylib
    0x7fff8ff9f000 -
    0x7fff901c9fe7  com.apple.CoreData (104.1 - 358.14) <6BB64605-8DA7-337D-A2AB-A3346A421CBD> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
    0x7fff901ca000 -
    0x7fff901d5ff7  libc++abi.dylib (14.0.0 - compatibility 1.0.0) <8FF3D766-D678-36F6-84AC-423C878E6D14> /usr/lib/libc++abi.dylib
    0x7fff901fe000 -
    0x7fff904e7ff7  com.apple.security (7.0 - 55148.1) <E9C46204-1336-3D90-BC67-5162FC7079D2> /System/Library/Frameworks/Security.framework/Versions/A/Security
    0x7fff904e8000 -
    0x7fff905cce5f  libobjc.A.dylib (228.0.0 - compatibility 1.0.0) <871E688B-CF57-3BC7-80D6-F6476DFF109B> /usr/lib/libobjc.A.dylib
    0x7fff905ce000 -
    0x7fff90630ff7  com.apple.Symbolication (1.3 - 91) <0945ACAF-AA0A-3D01-9960-72B51722EC1F> /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolicat ion
    0x7fff90631000 -
    0x7fff90657fff  com.apple.framework.familycontrols (3.0 - 300) <93828BC1-3D83-3A93-99A5-F0E7951AFC6C> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyCon trols
    0x7fff9074f000 -
    0x7fff9075fff7  com.apple.opengl (1.7.7 - 1.7.7) <0CA11278-746C-353A-923B-BCC0047190C3> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
    0x7fff90760000 -
    0x7fff90761ff7  libsystem_blocks.dylib (53.0.0 - compatibility 1.0.0) <8BCA214A-8992-34B2-A8B9-B74DEACA1869> /usr/lib/system/libsystem_blocks.dylib
    0x7fff90762000 -
    0x7fff90770fff  libdispatch.dylib (187.9.0 - compatibility 1.0.0) <1D5BE322-A9B9-3BCE-8FAC-076FB07CF54A> /usr/lib/system/libdispatch.dylib
    0x7fff90ac5000 -
    0x7fff90acbfff  libmacho.dylib (800.0.0 - compatibility 1.0.0) <165514D7-1BFA-38EF-A151-676DCD21FB64> /usr/lib/system/libmacho.dylib
    0x7fff90acc000 -
    0x7fff90ad3fff  libcopyfile.dylib (85.1.0 - compatibility 1.0.0) <0AB51EE2-E914-358C-AC19-47BC024BDAE7> /usr/lib/system/libcopyfile.dylib
    0x7fff90ad4000 -
    0x7fff90ad9fff  libpam.2.dylib (3.0.0 - compatibility 3.0.0) <D952F17B-200A-3A23-B9B2-7C1F7AC19189> /usr/lib/libpam.2.dylib
    0x7fff90ada000 -
    0x7fff90b70ff7  libvMisc.dylib (325.4.0 - compatibility 1.0.0) <642D8D54-F9F5-3FBB-A96C-EEFE94C6278B> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libvMisc.dylib
    0x7fff90b9a000 -
    0x7fff90b9cfff  libquarantine.dylib (36.6.0 - compatibility 1.0.0) <0EBF714B-4B69-3E1F-9A7D-6BBC2AACB310> /usr/lib/system/libquarantine.dylib
    0x7fff90b9d000 -
    0x7fff90b9dfff  com.apple.vecLib (3.7 - vecLib 3.7) <9A58105C-B36E-35B5-812C-4ED693F2618F> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
    0x7fff90b9e000 -
    0x7fff90caafff  libcrypto.0.9.8.dylib (44.0.0 - compatibility 0.9.8) <3A8E1F89-5E26-3C8B-B538-81F5D61DBF8A> /usr/lib/libcrypto.0.9.8.dylib
    0x7fff90e97000 -
    0x7fff90f9cfff  libFontParser.dylib (??? - ???) <759645F2-8CB1-358C-AF41-BA3797CD0F60> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/libFontParser.dylib
    0x7fff91011000 -
    0x7fff9101eff7  libbz2.1.0.dylib (1.0.5 - compatibility 1.0.0) <DFAB8CA8-CC9D-3F58-8C12-CE120442AACD> /usr/lib/libbz2.1.0.dylib
    0x7fff9101f000 -
    0x7fff91024ff7  libsystem_network.dylib (??? - ???) <5DE7024E-1D2D-34A2-80F4-08326331A75B> /usr/lib/system/libsystem_network.dylib
    0x7fff91025000 -
    0x7fff91095fff  com.apple.datadetectorscore (3.0 - 179.4) <9C01D16F-75A9-3BDD-B91A-F0F32261A2E7> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDe tectorsCore
    0x7fff91096000 -
    0x7fff91149ff7  com.apple.CoreText (220.20.0 - ???) <0E979362-15E4-3955-BF54-B5961361D1CC> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreText.framework/Versions/A/CoreText
    0x7fff9118f000 -
    0x7fff91284fff  libiconv.2.dylib (7.0.0 - compatibility 7.0.0) <5C40E880-0706-378F-B864-3C2BD922D926> /usr/lib/libiconv.2.dylib
    0x7fff91961000 -
    0x7fff919a2fff  com.apple.QD (3.40 - ???) <47674D2C-BE88-388E-B1B0-03F08BFFE5FD> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ QD.framework/Versions/A/QD
    0x7fff919a3000 -
    0x7fff919aefff  com.apple.CommonAuth (2.2 - 2.0) <77E6F0D0-85B6-30B5-B99C-F57104DD2EBA> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
    0x7fff919af000 -
    0x7fff91a54fff  com.apple.ink.framework (1.4 - 110) <F93B76B3-E57C-3805-B20D-03717A3F91DD> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework /Versions/A/Ink
    0x7fff91a55000 -
    0x7fff91a79fff  com.apple.Kerberos (1.0 - 1) <1F826BCE-DA8F-381D-9C4C-A36AA0EA1CB9> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
    0x7fff91a7a000 -
    0x7fff91a85ff7  com.apple.speech.recognition.framework (4.0.21 - 4.0.21) <6540EAF2-E3BF-3D2E-B4C1-F106180D6F20> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecogni tion.framework/Versions/A/SpeechRecognition
    0x7fff91a86000 -
    0x7fff91a95fff  libxar.1.dylib (??? - ???) <58B07AA0-BC12-36E3-94FC-C252719A1BDF> /usr/lib/libxar.1.dylib
    0x7fff91c21000 -
    0x7fff91c36fff  com.apple.speech.synthesis.framework (4.0.74 - 4.0.74) <C061ECBB-7061-3A43-8A18-90633F943295> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ SpeechSynthesis.framework/Versions/A/SpeechSynthesis
    0x7fff91c37000 -
    0x7fff91c41ff7  liblaunch.dylib (392.38.0 - compatibility 1.0.0) <6ECB7F19-B384-32C1-8652-2463C1CF4815> /usr/lib/system/liblaunch.dylib
    0x7fff91c42000 -
    0x7fff91c59fff  com.apple.MultitouchSupport.framework (231.4 - 231.4) <10A978D1-8781-33F0-BE45-60C9171F7278> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/Multit ouchSupport
    0x7fff91c5a000 -
    0x7fff91f86ff7  com.apple.HIToolbox (1.9 - ???) <B7D2A06B-7BE5-3355-BF7D-8139100B9B97> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fra mework/Versions/A/HIToolbox
    0x7fff91fb0000 -
    0x7fff920b7fe7  libsqlite3.dylib (9.6.0 - compatibility 9.0.0) <EE02BB01-64C9-304D-9719-A35F5CD6D04C> /usr/lib/libsqlite3.dylib
    0x7fff92383000 -
    0x7fff923b3ff7  com.apple.DictionaryServices (1.2.1 - 158.2) <3FC86118-7553-38F7-8916-B329D2E94476> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Diction aryServices.framework/Versions/A/DictionaryServices
    0x7fff92432000 -
    0x7fff92433ff7  libremovefile.dylib (21.1.0 - compatibility 1.0.0) <739E6C83-AA52-3C6C-A680-B37FE2888A04> /usr/lib/system/libremovefile.dylib
    0x7fff9250b000 -
    0x7fff92510fff  com.apple.OpenDirectory (10.7 - 146) <7960A302-F9AC-3F72-838E-3A382032DCA6> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
    0x7fff92515000 -
    0x7fff92554fff  com.apple.AE (527.7 - 527.7) <B82F7ABC-AC8B-3507-B029-969DD5CA813D> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.fram ework/Versions/A/AE
    0x7fff9258d000 -
    0x7fff925b1fff  com.apple.RemoteViewServices (1.4 - 44.1) <EA3837DF-A3A3-37FF-AE11-D50048D5F21A> /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/Remot eViewServices
    0x7fff925b9000 -
    0x7fff925cfff7  com.apple.ImageCapture (7.0.1 - 7.0.1) <BF4EC1CC-C998-3529-A69F-765774C66A6F> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture. framework/Versions/A/ImageCapture
    0x7fff925f0000 -
    0x7fff925f2fff  com.apple.TrustEvaluationAgent (2.0 - 1) <1F31CAFF-C1C6-33D3-94E9-11B721761DDF> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/Tru stEvaluationAgent
    0x7fff925f3000 -
    0x7fff9275afff  com.apple.CFNetwork (520.4.3 - 520.4.3) <31D7A595-375E-341A-8E97-21E73CC62E4A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwo rk.framework/Versions/A/CFNetwork
    0x7fff9280e000 -
    0x7fff92910fff  libxml2.2.dylib (10.3.0 - compatibility 10.0.0) <AFBB22B7-07AE-3F2E-B88C-70BEEBFB8A86> /usr/lib/libxml2.2.dylib
    0x7fff92923000 -
    0x7fff9298cfff  com.apple.coreui (1.2.2 - 165.10) <F427BF39-3E01-3DC6-A63D-BFC50FE6C72E> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
    0x7fff9298d000 -
    0x7fff929c7fe7  com.apple.DebugSymbols (2.1 - 87) <ED2B177C-4146-3715-91DF-D99A8ED5449A> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbol s
    0x7fff92a22000 -
    0x7fff92a2bff7  libsystem_notify.dylib (80.1.0 - compatibility 1.0.0) <A4D651E3-D1C6-3934-AD49-7A104FD14596> /usr/lib/system/libsystem_notify.dylib
    0x7fff92a2c000 -
    0x7fff92ab1ff7  com.apple.Heimdal (2.2 - 2.0) <FF0BD9A4-6FB0-31E3-ABFB-563FBBEC45FC> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
    0x7fff92ab2000 -
    0x7fff92ac6ff7  com.apple.LangAnalysis (1.7.0 - 1.7.0) <04C31EF0-912A-3004-A08F-CEC27030E0B2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LangAnalysis.framework/Versions/A/LangAnalysis
    0x7fff92ac7000 -
    0x7fff92acaff7  com.apple.securityhi (4.0 - 1) <D0ABB03B-CEF9-39E0-A139-AA9484DBBC07> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.fr amework/Versions/A/SecurityHI
    0x7fff92acb000 -
    0x7fff92b14ff7  com.apple.framework.CoreWLAN (2.1.2 - 212.2) <5E421E2D-50EA-340E-A5EE-C848DD6FC34F> /System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN
    0x7fff92ba6000 -
    0x7fff92bfefff  libTIFF.dylib (??? - ???) <A0FF68DE-2935-30E7-B61C-4D9D70E14AD0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libTIFF.dylib
    0x7fff92d0b000 -
    0x7fff92d1eff7  libCRFSuite.dylib (??? - ???) <0B76941F-218E-30C8-B6DE-E15919F8DBEB> /usr/lib/libCRFSuite.dylib
    0x7fff92ed8000 -
    0x7fff92f7afff  com.apple.securityfoundation (5.0 - 55116) <A9311EF6-B7F7-3DA5-84E8-21BC9B2C3C69> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoun dation
    0x7fff9317e000 -
    0x7fff931daff7  com.apple.HIServices (1.21 - ???) <9645CFA8-63BE-3A0D-A636-56D9827E6C8C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ HIServices.framework/Versions/A/HIServices
    0x7fff931db000 -
    0x7fff93b78c9f  com.apple.CoreGraphics (1.600.0 - ???) <1DB9C92C-DFA8-36ED-B513-998134462148> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/CoreGraphics
    0x7fff93bf5000 -
    0x7fff93c02fff  com.apple.CrashReporterSupport (10.7.4 - 352) <9C16B49C-CF02-38F9-A7CD-969C140D3961> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/Cra shReporterSupport
    0x7fff93c03000 -
    0x7fff93c30ff7  com.apple.opencl (1.50.69 - 1.50.69) <57939F7D-3626-30E2-883D-8A7CCB3F8763> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
    0x7fff93ca6000 -
    0x7fff93ca7ff7  libsystem_sandbox.dylib (??? - ???) <96D38E74-F18F-3CCB-A20B-E8E3ADC4E166> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff93cd4000 -
    0x7fff93d4afff  libc++.1.dylib (28.1.0 - compatibility 1.0.0) <DA22E4D6-7F20-3BEA-9B89-2FBA735C2EE1> /usr/lib/libc++.1.dylib
    0x7fff941dd000 -
    0x7fff941eafff  libCSync.A.dylib (600.0.0 - compatibility 64.0.0) <528BAA66-C38C-3093-84B5-92A7832CE7BC> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
    0x7fff941eb000 -
    0x7fff943bfff7  com.apple.CoreFoundation (6.7.2 - 635.21) <62A3402E-A4E7-391F-AD20-1EF20236CE1B> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7fff943c0000 -
    0x7fff94402ff7  libcommonCrypto.dylib (55010.0.0 - compatibility 1.0.0) <BB770C22-8C57-365A-8716-4A3C36AE7BFB> /usr/lib/system/libcommonCrypto.dylib
    0x7fff94403000 -
    0x7fff94451fff  libauto.dylib (??? - ???) <D8AC8458-DDD0-3939-8B96-B6CED81613EF> /usr/lib/libauto.dylib
    0x7fff94452000 -
    0x7fff944ecff7  com.apple.SearchKit (1.4.0 - 1.4.0) <4E70C394-773E-3A4B-A93C-59A88ABA9509> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchK it.framework/Versions/A/SearchKit
    0x7fff944ed000 -
    0x7fff944eefff  libunc.dylib (24.0.0 - compatibility 1.0.0) <337960EE-0A85-3DD0-A760-7134CF4C0AFF> /usr/lib/system/libunc.dylib
    0x7fff944fe000 -
    0x7fff94500ff7  com.apple.print.framework.Print (7.4 - 247.3) <626C58D5-2841-3329-8C32-9F4A8353F3E7> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framewo rk/Versions/A/Print
    0x7fff94501000 -
    0x7fff9492efff  libLAPACK.dylib (??? - ???) <4F2E1055-2207-340B-BB45-E4F16171EE0D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libLAPACK.dylib
    0x7fff9495d000 -
    0x7fff94f41fff  libBLAS.dylib (??? - ???) <C34F6D88-187F-33DC-8A68-C0C9D1FA36DF> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libBLAS.dylib
    0x7fff94f42000 -
    0x7fff94f42fff  com.apple.Accelerate (1.7 - Accelerate 1.7) <82DDF6F5-FBC3-323D-B71D-CF7ABC5CF568> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
    0x7fff94f43000 -
    0x7fff94faeff7  com.apple.framework.IOKit (2.0 - ???) <6C604894-7F61-3130-8499-20791D14577F> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
    0x7fff94faf000 -
    0x7fff9514eff7  com.apple.QuartzCore (1.7 - 270.4) <97E20A5F-652B-3E85-8C46-DCB777248ECD> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
    0x7fff9514f000 -
    0x7fff95154fff  libcompiler_rt.dylib (6.0.0 - compatibility 1.0.0) <98ECD5F6-E85C-32A5-98CD-8911230CB66A> /usr/lib/system/libcompiler_rt.dylib
    0x7fff951a2000 -
    0x7fff951a5fff  libCoreVMClient.dylib (??? - ???) <934D0D11-C34F-3C06-A352-21BB8FFE9774> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClien t.dylib
    0x7fff951c3000 -
    0x7fff951d2ff7  libxar-nossl.dylib (??? - ???) <A6ABBFB9-E4ED-38AD-BBBB-F9958B9CEFB5> /usr/lib/libxar-nossl.dylib
    0x7fff951e9000 -
    0x7fff952c8ff7  com.apple.ImageIO.framework (3.1.2 - 3.1.2) <FFA7532B-336A-3F0B-9AB9-2A35B56ED887> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/ImageIO
    0x7fff952c9000 -
    0x7fff952e9fff  libPng.dylib (??? - ???) <F4D84592-C450-3076-88E9-8E6517C7EF33> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libPng.dylib
    0x7fff95329000 -
    0x7fff95329fff  com.apple.Cocoa (6.6 - ???) <7EC4D759-B2A6-3A99-AC75-809FED1500C6> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
    0x7fff9532a000 -
    0x7fff95330fff  IOSurface (??? - ???) <77C6757B-D357-3E34-9424-48F962B5CC9C> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
    0x7fff95331000 -
    0x7fff95371ff7  libcups.2.dylib (2.9.0 - compatibility 2.0.0) <5328C0AB-F169-3786-A3EC-9E82E960CAAF> /usr/lib/libcups.2.dylib
    0x7fff95372000 -
    0x7fff95f78ff7  com.apple.AppKit (6.7.3 - 1138.47) <CAF5783F-F80B-30E7-929F-BBA6D96C5C44> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
    0x7fff962dc000 -
    0x7fff96304fff  com.apple.PerformanceAnalysis (1.11 - 11) <8D4C6382-DD92-37A2-BCFC-E89951320848> /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/Perf ormanceAnalysis
    0x7fff96305000 -
    0x7fff963e2fef  libsystem_c.dylib (763.13.0 - compatibility 1.0.0) <41B43515-2806-3FBC-ACF1-A16F35B7E290> /usr/lib/system/libsystem_c.dylib
    0x7fff963e3000 -
    0x7fff963e7ff7  com.apple.CommonPanels (1.2.5 - 94) <37C6540B-F8D1-355A-806C-F93D8FB522AB> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels. framework/Versions/A/CommonPanels
    0x7fff963e8000 -
    0x7fff964ccfff  com.apple.CoreServices.OSServices (478.46 - 478.46) <70BEE269-8F4D-3FDC-B1AD-A591C0CB37E5> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServi ces.framework/Versions/A/OSServices
    0x7fff965a1000 -
    0x7fff965e0ff7  libGLImage.dylib (??? - ???) <49BB4404-68F1-3839-A5C9-983405B59F52> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dyl ib
    0x7fff965e1000 -
    0x7fff96717fff  com.apple.vImage (5.1 - 5.1) <A08B7582-67BC-3EED-813A-4833645964A7> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.fr amework/Versions/A/vImage
    0x7fff96718000 -
    0x7fff96741fff  libJPEG.dylib (??? - ???) <64D079F9-256A-323B-A837-84628B172F21> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libJPEG.dylib
    0x7fff9690a000 -
    0x7fff96985ff7  com.apple.print.framework.PrintCore (7.1 - 366.3) <C5F39A82-0E77-3AD6-906A-20DD2EE8D374> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ PrintCore.framework/Versions/A/PrintCore
    0x7fff96986000 -
    0x7fff969eeff7  com.apple.audio.CoreAudio (4.0.2 - 4.0.2) <C6703B2E-62F2-37C4-A4DE-28AF9C81CB44> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
    0x7fff969ef000 -
    0x7fff96a31fff  com.apple.corelocation (330.12 - 330.12) <CFDF7694-382A-30A8-8347-505BA0CAF312> /System/Library/Frameworks/CoreLocation.framework/Versions/A/CoreLocation
    0x7fff96a3c000 -
    0x7fff96b49fff  libJP2.dylib (??? - ???) <5BE8CFA7-00C2-3BDE-BC20-5FF6DC18B415> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libJP2.dylib
    0x7fff96cd5000 -
    0x7fff96cdbfff  com.apple.DiskArbitration (2.4.1 - 2.4.1) <CEA34337-63DE-302E-81AA-10D717E1F699> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
    0x7fff96cdc000 -
    0x7fff96ceeff7  libbsm.0.dylib (??? - ???) <349BB16F-75FA-363F-8D98-7A9C3FA90A0D> /usr/lib/libbsm.0.dylib
    0x7fff97014000 -
    0x7fff9701afff  libGFXShared.dylib (??? - ???) <8A61FA67-EB3C-319D-AE3C-64936FB26BAC> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.d ylib
    0x7fff9701d000 -
    0x7fff97024fff  com.apple.NetFS (4.0 - 4.0) <433EEE54-E383-3505-9154-45B909FD3AF0> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
    0x7fff97025000 -
    0x7fff97058ff7  com.apple.GSS (2.2 - 2.0) <971395D0-B9D0-3FDE-B23F-6F9D0A2FB95F> /System/Library/Frameworks/GSS.framework/Versions/A/GSS
    0x7fff971a8000 -
    0x7fff9722bfef  com.apple.Metadata (10.7.0 - 627.32) <38735923-2EB5-3133-BE36-BDD65A7E47DB> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadat a.framework/Versions/A/Metadata
    0x7fff97a0a000 -
    0x7fff97a0cfff  libCVMSPluginSupport.dylib (??? - ???) <1C73D331-6F6C-3872-A011-1C41FBF49F2A> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginS upport.dylib
    0x7fff97a0d000 -
    0x7fff97a0dfff  com.apple.Carbon (153 - 153) <16EA5662-5C2C-3267-B419-66669AE536D7> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
    0x7fff97a55000 -
    0x7fff97a75fff  libsystem_kernel.dylib (1699.26.8 - compatibility 1.0.0) <1DDC0B0F-DB2A-34D6-895D-E5B2B5618946> /usr/lib/system/libsystem_kernel.dylib
    0x7fff97aa7000 -
    0x7fff97aa7fff  com.apple.ApplicationServices (41 - 41) <89B6AD5B-5C75-3E83-8C2B-AA7F4C55E400> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Application Services
    0x7fff97ac9000 -
    0x7fff97ae6ff7  com.apple.openscripting (1.3.3 - ???) <BDCCCBA9-F440-30BD-8378-FAB5AF685A5D> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting .framework/Versions/A/OpenScripting
    0x7fff97ae7000 -
    0x7fff97b39ff7  libGLU.dylib (??? - ???) <E2EF0336-3A5F-3532-AEB0-6CCF04851B72> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
    0x7fff97b3a000 -
    0x7fff97c01ff7  com.apple.ColorSync (4.7.4 - 4.7.4) <590AFCDA-F10E-31FE-9B01-DA5FFE74C2BB> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ColorSync.framework/Versions/A/ColorSync
    0x7fff97cca000 -
    0x7fff97d1eff7  com.apple.ScalableUserInterface (1.0 - 1) <33563775-C662-313D-B7FA-3D575A9F3D41> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/ScalableU serInterface.framework/Versions/A/ScalableUserInterface
    0x7fff97d8f000 -
    0x7fff97d8ffff  com.apple.audio.units.AudioUnit (1.7.2 - 1.7.2) <04C10813-CCE5-3333-8C72-E8E35E417B3B> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
    0x7fff97d90000 -
    0x7fff97e06fff  com.apple.CoreSymbolication (2.2 - 73.2) <126415E3-3A35-315B-B4B7-507CDBED0D58> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSy mbolication
    0x7fff97e07000 -
    0x7fff97e53ff7  com.apple.SystemConfiguration (1.11.3 - 1.11) <0A7F1982-B4EA-3424-A0C7-FE46C6224F03> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfi guration
    0x7fff980bb000 -
    0x7fff980e4fff  com.apple.CoreVideo (1.7 - 70.3) <9A9D4058-9935-3B0A-B1A6-27EB78D02249> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
    0x7fff9835c000 -
    0x7fff9835cfff  libkeymgr.dylib (23.0.0 - compatibility 1.0.0) <61EFED6A-A407-301E-B454-CD18314F0075> /usr/lib/system/libkeymgr.dylib
    0x7fff9835d000 -
    0x7fff98388ff7  libxslt.1.dylib (3.24.0 - compatibility 3.0.0) <E71220D3-8015-38EC-B97D-7FDB383C2BDC> /usr/lib/libxslt.1.dylib
    0x7fff986c8000 -
    0x7fff986e5fff  libxpc.dylib (77.19.0 - compatibility 1.0.0) <9F57891B-D7EF-3050-BEDD-21E7C6668248> /usr/lib/system/libxpc.dylib
    0x7fff987b4000 -
    0x7fff988cdfff  com.apple.DesktopServices (1.6.3 - 1.6.3) <20812ECE-CACC-3D44-8108-025EF6B45C14> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Desk topServicesPriv
    0x7fff988ce000 -
    0x7fff9896fff7  com.apple.LaunchServices (480.33 - 480.33) <45EF2044-3396-3910-9B5B-C8F7777D5F56> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchS ervices.framework/Versions/A/LaunchServices
    0x7fff98970000 -
    0x7fff9897eff7  libkxld.dylib (??? - ???) <C2FC894F-3716-32C3-967E-6AD5E2697045> /usr/lib/system/libkxld.dylib
    0x7fff9897f000 -
    0x7fff98a03ff7  com.apple.ApplicationServices.ATS (317.11.0 - ???) <082DEAFE-8A93-3AF2-B4E5-30012E725929> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/ATS
    0x7fff98a04000 -
    0x7fff98a0bff7  com.apple.CommerceCore (1.0 - 17) <3894FE48-EDCE-30E9-9796-E2F959D92704> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/C ommerceCore.framework/Versions/A/CommerceCore
    0x7fff98b29000 -
    0x7fff98b48fff  libresolv.9.dylib (46.1.0 - compatibility 1.0.0) <0635C52D-DD53-3721-A488-4C6E95607A74> /usr/lib/libresolv.9.dylib
    0x7fff98b5c000 -
    0x7fff98cb5fff  com.apple.audio.toolbox.AudioToolbox (1.7.2 - 1.7.2) <0AD8197C-1BA9-30CD-98F1-4CA2C6559BA8> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
    0x7fff98d90000 -
    0x7fff98dcbfff  libsystem_info.dylib (??? - ???) <35F90252-2AE1-32C5-8D34-782C614D9639> /usr/lib/system/libsystem_info.dylib
    0x7fff98dcc000 -
    0x7fff98e0cfff  libtidy.A.dylib (??? - ???) <E500CDB9-C010-3B1A-B995-774EE64F39BE> /usr/lib/libtidy.A.dylib
    0x7fff98e0e000 -
    0x7fff992b3fff  com.apple.RawCamera.bundle (3.12.0 - 615) <10CCCC87-4A1E-3343-BF09-1C6640B56F45> /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera
    0x7fff993f7000 -
    0x7fff9940efff  com.apple.CFOpenDirectory (10.7 - 146) <BBB7C97E-7B46-3286-9128-32B5D16B5CBE> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpen Directory.framework/Versions/A/CFOpenDirectory
    0x7fff9940f000 -
    0x7fff99412fff  com.apple.help (1.3.2 - 42) <BF14DE49-F7E8-336F-81FB-BBDF2DB3AC09> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framewor k/Versions/A/Help
    0x7fff99475000 -
    0x7fff994c9fff  libFontRegistry.dylib (??? - ???) <822DD341-C735-36C9-9521-E8E98807D09D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/libFontRegistry.dylib
    0x7fff994ca000 -
    0x7fff9952afff  libvDSP.dylib (325.4.0 - compatibility 1.0.0) <3A7521E6-5510-3FA7-AB65-79693A7A5839> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libvDSP.dylib
    0x7fff99794000 -
    0x7fff99797fff  libRadiance.dylib (??? - ???) <CD89D70D-F177-3BAE-8A26-644EA7D5E28E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libRadiance.dylib
    0x7fff99798000 -
    0x7fff997c3ff7  com.apple.CoreServicesInternal (113.17 - 113.17) <B1DF81C3-9C23-3BAE-9DE8-21EAFEEB97B8> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/Cor eServicesInternal
    0x7fff997c4000 -
    0x7fff997c9fff  libGIF.dylib (??? - ???) <8763F67F-A881-30B6-B20E-D395B4D9FD58> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libGIF.dylib
    0x7fff99817000 -
    0x7fff99a19fff  libicucore.A.dylib (46.1.0 - compatibility 1.0.0) <38CD6ED3-C8E4-3CCD-89AC-9C3198803101> /usr/lib/libicucore.A.dylib
    0x7fff99b03000 -
    0x7fff99b09ff7  libunwind.dylib (30.0.0 - compatibility 1.0.0) <1E9C6C8C-CBE8-3F4B-A5B5-E03E3AB53231> /usr/lib/system/libunwind.dylib
    0x7fff99b7c000 -
    0x7fff99b81fff  libcache.dylib (47.0.0 - compatibility 1.0.0) <1571C3AB-BCB2-38CD-B3B2-C5FC3F927C6A> /usr/lib/system/libcache.dylib
    0x7fff99b82000 -
    0x7fff99b83fff  liblangid.dylib (??? - ???) <CACBE3C3-2F7B-3EED-B50E-EDB73F473B77> /usr/lib/liblangid.dylib
    0x7fff99b89000 -
    0x7fff99b89fff  com.apple.Accelerate.vecLib (3.7 - vecLib 3.7) <C06A140F-6114-3B8B-B080-E509303145B8> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/vecLib
    0x7fff99bfe000 -
    0x7fff99bfffff  libDiagnosticMessagesClient.dylib (??? - ???) <3DCF577B-F126-302B-BCE2-4DB9A95B8598> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff99c00000 -
    0x7fff99c00fff  com.apple.CoreServices (53 - 53) <043C8026-8EDD-3241-B090-F589E24062EF> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
    0x7fff99c01000 -
    0x7fff99f1dfff  com.apple.CoreServices.CarbonCore (960.24 - 960.24) <6F99A26B-788F-37B9-860F-508906EC06D7> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonC ore.framework/Versions/A/CarbonCore
    0x7fff99f25000 -
    0x7fff99f33fff  com.apple.NetAuth (3.2 - 3.2) <F0D60E34-37A9-308D-B44E-E3450906173A> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
    0x7fff99f34000 -
    0x7fff99f50ff7  com.apple.GenerationalStorage (1.0 - 126.1) <509F52ED-E54B-3FEF-B3C2-759387B826E6> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/Gene rationalStorage
    0x7fff9a3f9000 -
    0x7fff9a40bff7  libz.1.dylib (1.2.5 - compatibility 1.0.0) <30CBEF15-4978-3DED-8629-7109880A19D4> /usr/lib/libz.1.dylib
    External Modification Summary:
      Calls made by other processes targeting this process:
    task_for_pid: 4
    thread_create: 0
    thread_set_state: 0
      Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
      Calls made by all processes on this machine:
    task_for_pid: 389
    thread_create: 0
    thread_set_state: 0
    VM Region Summary:
    ReadOnly portion of Libraries: Total=185.1M resident=127.2M(69%) swapped_out_or_unallocated=57.9M(31%)
    Writable regions: Total=1.0G written=4176K(0%) resident=5504K(1%) swapped_out=0K(0%) unallocated=1.0G(99%)
    REGION TYPE                   
    VIRTUAL
    ===========                   
    =======
    CG shared images                  
    96K
    CoreServices                    
    1088K
    JS JIT generated code              
    8K
    JS JIT generated code (reserved) 
    1.0G   
    reserved VM address space (unallocated)
    MALLOC                          
    23.1M
    MALLOC guard page                 
    48K
    SQLite page cache                
    480K
    STACK GUARD                     
    56.0M
    Stack                           
    10.5M
    VM_ALLOCATE                       
    64K
    __CI_BITMAP                       
    80K
    __DATA                          
    17.5M
    __IMAGE                          
    528K
    __LINKEDIT                      
    59.8M
    __RC_CAMERAS                     
    244K
    __TEXT                         
    125.3M
    __UNICODE                        
    544K
    mapped file                     
    24.7M
    shared memory                    
    312K
    ===========                   
    =======
    TOTAL                            
    1.3G
    TOTAL, minus reserved VM space 
    320.3M
    This was the best I could do to finally get the report posted.
    Message was edited by: ccadkins

  • Issue in use of "WITH CLAUSE"

    My DB version is 10.2.0
    One of my query takes long time for execution and here is the Old Query,
    SELECT HD.DATUM DATUM, HA2.GELDEINGAENGE_INSG-NVL(HA3.VERWERTUNGSERLOESE,0)
      GELDEINGANG, HA3.VERWERTUNGSERLOESE
    FROM
    ( SELECT DISTINCT(TO_CHAR(ERFASSDATUM,'YYYY/MM')) DATUM
      FROM TRANS_HIST H1 ,
        (SELECT BUCHUNGSGRUPPE, LFDNR, SICHERHEITBEZUG
        FROM BUCHUNGSSCHL
        WHERE STORNOMM=0) B1
      WHERE H1.ERFASSDATUM >=TO_DATE('01.10'||TO_CHAR(ADD_MONTHS(SYSDATE,-9),'YYYY')||' 00.00.00','DD.MM.YYYY HH24:MI:SS')
      AND H1.BUCHUNGSGRUPPE = B1.BUCHUNGSGRUPPE AND H1.LFDNR = B1.LFDNR
      AND (H1.BUCHUNGSGRUPPE = '8888' OR ( H1.BUCHUNGSGRUPPE > 5999 AND H1.BUCHUNGSGRUPPE < 7100 AND B1.SICHERHEITBEZUG = 1)) ) HD,
      (SELECT TO_CHAR(ERFASSDATUM,'YYYY/MM') DATUM, SUM(BETRAG) GELDEINGAENGE_INSG
      FROM TRANS_HIST H2,
      (SELECT F.GLAEUBIGERNR,F.FORDNR,F.FORDERGNR,A.MAHN_NUM
      FROM FRD_ACCT F,
      (SELECT * FROM ANS_PRCH WHERE RANGMM=1) A
      WHERE F.GLAEUBIGERNR=A.GLAEUBIGERNR (+) AND F.FORDNR=A.FORDNR(+)
      AND F.FORDERGNR=A.FORDERGNR(+) AND NVL(F.INDIVIDUALFLAG,0)=0 ) F1
      WHERE ( (F1.GLAEUBIGERNR= H2.GLAEUBIGERNR AND F1.FORDNR=H2.FORDNR AND F1.FORDERGNR=H2.FORDERGNR) OR
      F1.MAHN_NUM = H2.MAHN_NUM) AND H2.BUCHUNGSGRUPPE = '8888' AND
      H2.ERFASSDATUM >= TO_DATE('01.10'||TO_CHAR(ADD_MONTHS(SYSDATE,-9),'YYYY')||' 00.00.00','DD.MM.YYYY HH24:MI:SS')
      GROUP BY TO_CHAR(ERFASSDATUM,'YYYY/MM') ) HA2,
      (SELECT TO_CHAR(ERFASSDATUM,'YYYY/MM') DATUM, SUM(BETRAG) VERWERTUNGSERLOESE
       FROM TRANS_HIST H3, (SELECT BUCHUNGSGRUPPE, LFDNR,
      SICHERHEITBEZUG, NACHMIETVERTRAGE
      FROM BUCHUNGSSCHL
      WHERE STORNOMM=0) B3,
      (SELECT F.GLAEUBIGERNR,F.FORDNR,F.FORDERGNR,A.MAHN_NUM
      FROM FRD_ACCT F,
      (SELECT * FROM ANS_PRCH WHERE RANGMM=1) A
      WHERE F.GLAEUBIGERNR= A.GLAEUBIGERNR (+) AND F.FORDNR=A.FORDNR(+)
      AND F.FORDERGNR=A.FORDERGNR(+) AND NVL(F.INDIVIDUALFLAG,0)=0 ) F2
      WHERE ( (F2.GLAEUBIGERNR=H3.GLAEUBIGERNR AND F2.FORDNR=H3.FORDNR AND F2.FORDERGNR=H3.FORDERGNR)
      OR F2.MAHN_NUM = H3.MAHN_NUM)
      AND H3.ERFASSDATUM >=TO_DATE('01.10'||TO_CHAR(ADD_MONTHS(SYSDATE,-9),'YYYY')||' 00.00.00','DD.MM.YYYY HH24:MI:SS')
      AND H3.BUCHUNGSGRUPPE = B3.BUCHUNGSGRUPPE AND
      H3.LFDNR = B3.LFDNR AND H3.BUCHUNGSGRUPPE > 5999
      AND H3.BUCHUNGSGRUPPE < 7100 AND (B3.SICHERHEITBEZUG = 1 OR B3.NACHMIETVERTRAGE =1)
      GROUP BY TO_CHAR(ERFASSDATUM,'YYYY/MM') ) HA3
      WHERE HD.DATUM=HA2.DATUM (+)
      AND HD.DATUM=HA3.DATUM (+)
      ORDER BY DATUM ASC
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.22       0.22          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1    469.61    1448.30    2874498    3017355          1           9
    total        3    469.83    1448.53    2874498    3017355          1           9
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 62     (recursive depth: 1)
    Rows     Row Source Operation
          9  SORT ORDER BY (cr=3017355 pr=2874498 pw=0 time=1448309418 us)
          9   HASH JOIN RIGHT OUTER (cr=3017355 pr=2874498 pw=0 time=1448309191 us)
          9    VIEW  (cr=1228085 pr=1175604 pw=0 time=906871801 us)
          9     HASH GROUP BY (cr=1228085 pr=1175604 pw=0 time=906871785 us)
       1559      CONCATENATION  (cr=1228085 pr=1175604 pw=0 time=564453620 us)
        233       HASH JOIN  (cr=614043 pr=589377 pw=0 time=562088377 us)
         94        TABLE ACCESS FULL BUCHUNGSSCHL (cr=29 pr=0 pw=0 time=505 us)
    254136        HASH JOIN  (cr=614014 pr=589377 pw=0 time=509476999 us)
    497464         TABLE ACCESS FULL TRANS_HIST (cr=586339 pr=562603 pw=0 time=65783878 us)
    737515         HASH JOIN RIGHT OUTER (cr=27675 pr=26774 pw=0 time=18577731 us)
    372656          TABLE ACCESS FULL ANS_PRCH (cr=6346 pr=5910 pw=0 time=408778 us)
    737515          TABLE ACCESS FULL FRD_ACCT (cr=21329 pr=20864 pw=0 time=2254657 us)
       1326       HASH JOIN  (cr=614042 pr=586227 pw=0 time=520726941 us)
         94        TABLE ACCESS FULL BUCHUNGSSCHL (cr=29 pr=0 pw=0 time=641 us)
    221360        FILTER  (cr=614013 pr=586227 pw=0 time=372791872 us)
    221360         HASH JOIN OUTER (cr=614013 pr=586227 pw=0 time=372570499 us)
    221360          HASH JOIN  (cr=607668 pr=580286 pw=0 time=368077766 us)
    243053           TABLE ACCESS FULL TRANS_HIST (cr=586339 pr=563978 pw=0 time=1425434011 us)
    737515           TABLE ACCESS FULL FRD_ACCT (cr=21329 pr=16308 pw=0 time=8859226 us)
    372656          TABLE ACCESS FULL ANS_PRCH (cr=6345 pr=5941 pw=0 time=1872464 us)
          9    HASH JOIN OUTER (cr=1789270 pr=1698894 pw=0 time=541436637 us)
          9     VIEW  (cr=586667 pr=562439 pw=0 time=213337882 us)
          9      HASH UNIQUE (cr=586667 pr=562439 pw=0 time=213337873 us)
    748717       HASH JOIN  (cr=586667 pr=562439 pw=0 time=104432018 us)
        830        TABLE ACCESS FULL BUCHUNGSSCHL (cr=29 pr=0 pw=0 time=1042 us)
    1241936        TABLE ACCESS FULL TRANS_HIST (cr=586638 pr=562439 pw=0 time=339666777 us)
          9     VIEW  (cr=1202603 pr=1136455 pw=0 time=328097826 us)
          9      HASH GROUP BY (cr=1202603 pr=1136455 pw=0 time=328097809 us)
    695373       CONCATENATION  (cr=1202603 pr=1136455 pw=0 time=324453471 us)
          0        HASH JOIN  (cr=587003 pr=557994 pw=0 time=167168982 us)
    744472         TABLE ACCESS FULL TRANS_HIST (cr=587003 pr=557994 pw=0 time=30622271 us)
          0         HASH JOIN RIGHT OUTER (cr=0 pr=0 pw=0 time=0 us)
          0          TABLE ACCESS FULL ANS_PRCH (cr=0 pr=0 pw=0 time=0 us)
          0          TABLE ACCESS FULL FRD_ACCT (cr=0 pr=0 pw=0 time=0 us)
    695373        FILTER  (cr=615600 pr=578461 pw=0 time=157284464 us)
    695373         HASH JOIN OUTER (cr=615600 pr=578461 pw=0 time=156589072 us)
    695373          HASH JOIN  (cr=609255 pr=572518 pw=0 time=150571393 us)
    744472           TABLE ACCESS FULL TRANS_HIST (cr=587926 pr=556115 pw=0 time=31820718 us)
    737515           TABLE ACCESS FULL FRD_ACCT (cr=21329 pr=16403 pw=0 time=3696334 us)
    372656          TABLE ACCESS FULL ANS_PRCH (cr=6345 pr=5943 pw=0 time=391928 us)I tried fine tuning the query using "With Clause" but landed up with oracle error, which prevents me from using with clause inside a paranthesis.
    SELECT HD.DATUM DATUM, HA2.GELDEINGAENGE_INSG-NVL(HA3.VERWERTUNGSERLOESE,0)
      GELDEINGANG, HA3.VERWERTUNGSERLOESE
    FROM
    ( WITH HIST_VIEW AS (SELECT GLAEUBIGERNR,FORDNR,FORDERGNR,MAHN_NUM,BUCHUNGSGRUPPE,LFDNR,STORNOMM,ERFASSDATUM,BETRAG
                         FROM TRANS_HIST H
                         WHERE ERFASSDATUM >=TO_DATE('01.10'||TO_CHAR(ADD_MONTHS(SYSDATE,-9),'YYYY')||' 00.00.00','DD.MM.YYYY HH24:MI:SS')
                         AND  (H.BUCHUNGSGRUPPE = '8888' OR ( H.BUCHUNGSGRUPPE > 5999 AND H.BUCHUNGSGRUPPE < 7100))),
           FORD_VIEW AS (SELECT F.GLAEUBIGERNR,F.FORDNR,F.FORDERGNR,A.MAHN_NUM
                         FROM FRD_ACCT F,ANS_PRCH A
                         WHERE F.GLAEUBIGERNR=A.GLAEUBIGERNR(+) AND F.FORDNR=A.FORDNR(+)
                         AND F.FORDERGNR=A.FORDERGNR(+) AND NVL(F.INDIVIDUALFLAG,0)=0 AND  A.RANGMM=1)
    (SELECT DISTINCT(TO_CHAR(ERFASSDATUM,'YYYY/MM')) DATUM
      FROM HIST_VIEW H1 ,BUCHUNGSSCHL B1
      WHERE B1.STORNOMM=0  AND H1.BUCHUNGSGRUPPE = B1.BUCHUNGSGRUPPE AND H1.LFDNR = B1.LFDNR
      AND (H1.BUCHUNGSGRUPPE = '8888' OR (H1.BUCHUNGSGRUPPE > 5999 AND H1.BUCHUNGSGRUPPE < 7100 AND B1.SICHERHEITBEZUG = 1))) HD,
    (SELECT TO_CHAR(ERFASSDATUM,'YYYY/MM') DATUM, SUM(BETRAG) GELDEINGAENGE_INSG
      FROM HIST_VIEW H2,FORD_VIEW F1
      WHERE ((F1.GLAEUBIGERNR= H2.GLAEUBIGERNR AND F1.FORDNR=H2.FORDNR AND F1.FORDERGNR=H2.FORDERGNR) OR
      F1.MAHN_NUM = H2.MAHN_NUM) AND H2.BUCHUNGSGRUPPE = '8888'
      GROUP BY TO_CHAR(ERFASSDATUM,'YYYY/MM') ) HA2,
    (SELECT TO_CHAR(ERFASSDATUM,'YYYY/MM') DATUM, SUM(BETRAG) VERWERTUNGSERLOESE
      FROM HIST_VIEW H3, BUCHUNGSSCHL B3,FORD_VIEW F2
      WHERE ((F2.GLAEUBIGERNR=H3.GLAEUBIGERNR AND F2.FORDNR=H3.FORDNR
      AND F2.FORDERGNR=H3.FORDERGNR) OR F2.MAHN_NUM = H3.MAHN_NUM) AND B3.STORNOMM=0
      AND H3.BUCHUNGSGRUPPE = B3.BUCHUNGSGRUPPE AND
      H3.LFDNR = B3.LFDNR AND H3.BUCHUNGSGRUPPE > 5999
      AND H3.BUCHUNGSGRUPPE < 7100 AND (B3.SICHERHEITBEZUG = 1 OR B3.NACHMIETVERTRAGE =1)
      GROUP BY TO_CHAR(ERFASSDATUM,'YYYY/MM')) HA3
      WHERE HD.DATUM=HA2.DATUM (+)
      AND HD.DATUM=HA3.DATUM (+)
      ORDER BY DATUM ASC )
    ORA-00907: missing right parenthesis

    If you format your code it makes it far easier to spot mistakes...
    WITH HIST_VIEW AS (SELECT GLAEUBIGERNR,FORDNR,FORDERGNR,MAHN_NUM,BUCHUNGSGRUPPE,LFDNR,STORNOMM,ERFASSDATUM,BETRAG
                       FROM   TRANS_HIST H
                       WHERE  ERFASSDATUM >=TO_DATE('01.10'||TO_CHAR(ADD_MONTHS(SYSDATE,-9),'YYYY')||' 00.00.00','DD.MM.YYYY HH24:MI:SS')
                       AND   (  H.BUCHUNGSGRUPPE = '8888'
                            OR (H.BUCHUNGSGRUPPE > 5999 AND H.BUCHUNGSGRUPPE < 7100)
         FORD_VIEW AS (SELECT F.GLAEUBIGERNR,F.FORDNR,F.FORDERGNR,A.MAHN_NUM
                       FROM   FRD_ACCT F,ANS_PRCH A
                       WHERE  F.GLAEUBIGERNR=A.GLAEUBIGERNR(+)
                       AND    F.FORDNR=A.FORDNR(+)
                       AND    F.FORDERGNR=A.FORDERGNR(+)
                       AND    NVL(F.INDIVIDUALFLAG,0)=0
                       AND    A.RANGMM=1
    SELECT HD.DATUM DATUM
          ,HA2.GELDEINGAENGE_INSG-NVL(HA3.VERWERTUNGSERLOESE,0) GELDEINGANG
          ,HA3.VERWERTUNGSERLOESE
    FROM  (SELECT DISTINCT(TO_CHAR(ERFASSDATUM,'YYYY/MM')) DATUM
           FROM   HIST_VIEW H1
                 ,BUCHUNGSSCHL B1
           WHERE  B1.STORNOMM=0
           AND    H1.BUCHUNGSGRUPPE = B1.BUCHUNGSGRUPPE
           AND    H1.LFDNR = B1.LFDNR
           AND   (  H1.BUCHUNGSGRUPPE = '8888'
                OR (H1.BUCHUNGSGRUPPE > 5999 AND H1.BUCHUNGSGRUPPE < 7100 AND B1.SICHERHEITBEZUG = 1)
          ) HD,
          (SELECT TO_CHAR(ERFASSDATUM,'YYYY/MM') DATUM
                 ,SUM(BETRAG) GELDEINGAENGE_INSG
           FROM   HIST_VIEW H2
                 ,FORD_VIEW F1
           WHERE (
                   (    F1.GLAEUBIGERNR= H2.GLAEUBIGERNR
                    AND F1.FORDNR=H2.FORDNR
                    AND F1.FORDERGNR=H2.FORDERGNR
                 OR
                    F1.MAHN_NUM = H2.MAHN_NUM
           AND   H2.BUCHUNGSGRUPPE = '8888'
           GROUP BY TO_CHAR(ERFASSDATUM,'YYYY/MM')
          ) HA2,
          (SELECT TO_CHAR(ERFASSDATUM,'YYYY/MM') DATUM
                 ,SUM(BETRAG) VERWERTUNGSERLOESE
           FROM   HIST_VIEW H3
                 ,BUCHUNGSSCHL B3
                 ,FORD_VIEW F2
           WHERE (
                   (    F2.GLAEUBIGERNR=H3.GLAEUBIGERNR
                    AND F2.FORDNR=H3.FORDNR
                    AND F2.FORDERGNR=H3.FORDERGNR
                 OR
                   F2.MAHN_NUM = H3.MAHN_NUM
           AND B3.STORNOMM=0
           AND H3.BUCHUNGSGRUPPE = B3.BUCHUNGSGRUPPE
           AND H3.LFDNR = B3.LFDNR
           AND H3.BUCHUNGSGRUPPE > 5999
           AND H3.BUCHUNGSGRUPPE < 7100
           AND (B3.SICHERHEITBEZUG = 1 OR B3.NACHMIETVERTRAGE =1)
           GROUP BY TO_CHAR(ERFASSDATUM,'YYYY/MM')
          ) HA3
    WHERE HD.DATUM=HA2.DATUM (+)
    AND   HD.DATUM=HA3.DATUM (+)
    ORDER BY DATUM ASC
    ) <--- What's this doing on the end?Remove that last bracket and you should be ok.
    I took the liberty of putting the subquery factoring at the beginning, so see if that works.

  • OPEN CURSOR using a WITH clause in the select query

    Hi,
    I am using Oracle 9i. I have a requirement where I have a REFCURSOR as an OUT parameter for my procedure. I have declared the TYPE and created the procedure.
    In the procedure, I am using OPEN <cursor_name> FOR <query>;
    Ideally this works in most of the cases that I have tried earlier. However, in the current case I am using a WITH clause in my query to get the results.
    I need help in understanding if the above mentioned syntax would not allow me to use the WITH clause in the query.

    What error do you get , seems to work ok for me on 10g
    SQL> begin
      2  open :cv for 'with x as (select * from emp)  select * from x';
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> print :cv
         EMPNO
    ENAME
    JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7521
    WARD
    SALESMAN        7698 22-FEB-81       1250        500         30
          7566
    JONES
    MANAGER         7839 02-APR-81       2975                    20
         EMPNO

Maybe you are looking for

  • How to use local variables in control files for loading data

    i want to count the number of records which have odd number like... Data in data.txt 1 a 2 b 3 c So my count = 2, i will write this to another file. Plz help me how to achieve this

  • More than 1 blank line available for input in IP-Excel based?

    Hello, We are converting a large BW-BPS application (> 200 active users) to IP. A major requirement is the availability of the "blank screen" in Excel, similar to the BPS standard screen, where users can cut-and-paste multiple lines into it. IP - Exc

  • Acrobat 9 - hyper link issue and print in larger font

    I am using Acrobat 9 and have two issues : When I try to convert a web page to pdf file i.e. through the print command in FF, the text links are there in the new file but without the underlying hyper links ? How can I print the files with a larger fo

  • RPIPSR00 date type fro exceptions

    Hi all, I'm using RPIPSR00 for pay scale reclassification but since some employees do not have the correct PS group in IT0008 (some exceptions due to transfers from other systems, etc and can't register that historical records) but I have the transfe

  • ISE EAP-FAST chaining EAP-TLS inner method - authorizing against AD

    Just a question surrounding EAP-FAST chaining (EAP-TLS inner)  and the ability to authorize the username in the CN field of the certificate against AD. As an example for standard EAP-TLS I am able to specifiy that the username should be in a specific