Can i use Sub Query Factoring Here ?

Hi;
SQL>SELECT * FROM V$VERSION;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE    11.1.0.7.0      Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - ProductionSQL
select /*+ PARALLEL(det, 4) */ '12062' snapshot_id,det.journal_entry_line_id, det.accounting_date,det.company_code,det.account_number,
det.transaction_id, det.transaction_id_type, det.amount,det.currency_code,det.debit_or_credit,det.category,det.subcategory,det.reference1,det.reference1_type,
det.reference2,det.reference2_type,det.gl_batch_id,det.marketplace_id,det.cost_center,det.gl_product_line,det.location,det.project,det.sales_channel,
det.created_by,det.creation_date,det.last_updated_by,det.last_updated_date,agg.age,last_day(to_date('04/21/2010','MM/DD/YYYY')) snapshot_day
from
select company_code, account_number, transaction_id,
decode(transaction_id_type, 'CollectionID', 'SettlementGroupID', transaction_id_type) transaction_id_type,
(last_day(to_date('04/21/2010','MM/DD/YYYY')) - min(z.accounting_date) ) age,sum(z.amount)
from
     select /*+ PARALLEL(use, 2) */    company_code,substr(account_number, 1, 5) account_number,transaction_id,
     decode(transaction_id_type, 'CollectionID', 'SettlementGroupID', transaction_id_type) transaction_id_type,use.amount,use.accounting_date
     from financials.unbalanced_subledger_entries use
     where use.accounting_date >= to_date('04/21/2010','MM/DD/YYYY')
     and use.accounting_date < to_date('04/21/2010','MM/DD/YYYY') + 1
UNION ALL
     select /*+ PARALLEL(se, 2) */  company_code, substr(se.account_number, 1, 5) account_number,transaction_id,
     decode(transaction_id_type, 'CollectionID', 'SettlementGroupID', transaction_id_type) transaction_id_type,se.amount,se.accounting_date
     from financials.temp2_sl_snapshot_entries se,financials.account_numbers an
     where se.account_number = an.account_number
     and an.subledger_type in ('C', 'AC')
) z
group by company_code,account_number,transaction_id,decode(transaction_id_type, 'CollectionID', 'SettlementGroupID', transaction_id_type)
having abs(sum(z.amount)) >= 0.01
) agg,
     select /*+ PARALLEL(det, 2) */ det.journal_entry_line_id,  det.accounting_date, det.company_code, det.account_number, det.transaction_id,  decode(det.transaction_id_type, 'CollectionID', 'SettlementGroupID', det.transaction_id_type) transaction_id_type,
     det.amount, det.currency_code, det.debit_or_credit, det.category, det.subcategory, det.reference1, det.reference1_type, det.reference2, det.reference2_type,
     det.gl_batch_id, det.marketplace_id, det.cost_center, det.gl_product_line, det.location, det.project, det.sales_channel, det.created_by, det.creation_date,
     det.last_updated_by, det.last_updated_date
     from financials.unbalanced_subledger_entries det
     where accounting_date >= to_date('04/21/2010','MM/DD/YYYY')
     and accounting_date < to_date('04/21/2010','MM/DD/YYYY') + 1
UNION ALL
select /*+ PARALLEL(det, 2) */  det.journal_entry_line_id, det.accounting_date, det.company_code, det.account_number, det.transaction_id,
decode(det.transaction_id_type, 'CollectionID', 'SettlementGroupID', det.transaction_id_type) transaction_id_type,  det.amount, det.currency_code,
det.debit_or_credit, det.category, det.subcategory, det.reference1, det.reference1_type, det.reference2, det.reference2_type, det.gl_batch_id, det.marketplace_id,
det.cost_center, det.gl_product_line, det.location, det.project, det.sales_channel, det.created_by, det.creation_date, det.last_updated_by, det.last_updated_date
from financials.temp2_sl_snapshot_entries det,financials.account_numbers an
where det.account_number = an.account_number
and an.subledger_type in ('C', 'AC')
) det
                   where agg.company_code = det.company_code
                   and agg.account_number = substr(det.account_number, 1, 5)
                   and agg.transaction_id = det.transaction_id
                   and agg.transaction_id_type = det.transaction_id_type
/Execution Plan
| Id  | Operation                          | Name                         | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
|   0 | SELECT STATEMENT                   |                              |    12M|  8012M|       |   541K  (1)| 01:48:21 |        |      |            |
|   1 |  PX COORDINATOR                    |                              |       |       |       |            |          |        |      |            |
|   2 |   PX SEND QC (RANDOM)              | :TQ10005                     |    12M|  8012M|       |   541K  (1)| 01:48:21 |  Q1,05 | P->S | QC (RAND)  |
|*  3 |    HASH JOIN BUFFERED              |                              |    12M|  8012M|  1098M|   541K  (1)| 01:48:21 |  Q1,05 | PCWP |            |
|   4 |     PX RECEIVE                     |                              |    35M|  3992M|       |   166K  (2)| 00:33:16 |  Q1,05 | PCWP |            |
|   5 |      PX SEND HASH                  | :TQ10003                     |    35M|  3992M|       |   166K  (2)| 00:33:16 |  Q1,03 | P->P | HASH       |
|   6 |       VIEW                         |                              |    35M|  3992M|       |   166K  (2)| 00:33:16 |  Q1,03 | PCWP |            |
|*  7 |        FILTER                      |                              |       |       |       |            |          |  Q1,03 | PCWC |            |
|   8 |         HASH GROUP BY              |                              |    35M|  4528M|       |   166K  (2)| 00:33:16 |  Q1,03 | PCWP |            |
|   9 |          PX RECEIVE                |                              |    35M|  4528M|       |   166K  (2)| 00:33:16 |  Q1,03 | PCWP |            |
|  10 |           PX SEND HASH             | :TQ10001                     |    35M|  4528M|       |   166K  (2)| 00:33:16 |  Q1,01 | P->P | HASH       |
|  11 |            HASH GROUP BY           |                              |    35M|  4528M|       |   166K  (2)| 00:33:16 |  Q1,01 | PCWP |            |
|  12 |             VIEW                   |                              |    35M|  4528M|       |   164K  (1)| 00:33:00 |  Q1,01 | PCWP |            |
|  13 |              UNION-ALL             |                              |       |       |       |            |          |  Q1,01 | PCWP |            |
|  14 |               PX BLOCK ITERATOR    |                              |    11 |   539 |       |  1845   (1)| 00:00:23 |  Q1,01 | PCWC |            |
|* 15 |                TABLE ACCESS FULL   | UNBALANCED_SUBLEDGER_ENTRIES |    11 |   539 |       |  1845   (1)| 00:00:23 |  Q1,01 | PCWP |            |
|* 16 |               HASH JOIN            |                              |    35M|  2012M|       |   163K  (1)| 00:32:37 |  Q1,01 | PCWP |            |
|  17 |                BUFFER SORT         |                              |       |       |       |            |          |  Q1,01 | PCWC |            |
|  18 |                 PX RECEIVE         |                              |    21 |   210 |       |     2   (0)| 00:00:01 |  Q1,01 | PCWP |            |
|  19 |                  PX SEND BROADCAST | :TQ10000                     |    21 |   210 |       |     2   (0)| 00:00:01 |        | S->P | BROADCAST  |
|* 20 |                   TABLE ACCESS FULL| ACCOUNT_NUMBERS              |    21 |   210 |       |     2   (0)| 00:00:01 |        |      |            |
|  21 |                PX BLOCK ITERATOR   |                              |    56M|  2701M|       |   162K  (1)| 00:32:35 |  Q1,01 | PCWC |            |
|  22 |                 TABLE ACCESS FULL  | TEMP2_SL_SNAPSHOT_ENTRIES    |    56M|  2701M|       |   162K  (1)| 00:32:35 |  Q1,01 | PCWP |            |
|  23 |     PX RECEIVE                     |                              |    35M|    18G|       | 82859   (1)| 00:16:35 |  Q1,05 | PCWP |            |
|  24 |      PX SEND HASH                  | :TQ10004                     |    35M|    18G|       | 82859   (1)| 00:16:35 |  Q1,04 | P->P | HASH       |
|  25 |       BUFFER SORT                  |                              |    12M|  8012M|       |            |          |  Q1,04 | PCWP |            |
|  26 |        VIEW                        |                              |    35M|    18G|       | 82859   (1)| 00:16:35 |  Q1,04 | PCWP |            |
|  27 |         UNION-ALL                  |                              |       |       |       |            |          |  Q1,04 | PCWP |            |
|  28 |          PX BLOCK ITERATOR         |                              |    11 |  2255 |       |   923   (1)| 00:00:12 |  Q1,04 | PCWC |            |
|* 29 |           TABLE ACCESS FULL        | UNBALANCED_SUBLEDGER_ENTRIES |    11 |  2255 |       |   923   (1)| 00:00:12 |  Q1,04 | PCWP |            |
|* 30 |          HASH JOIN                 |                              |    35M|  7514M|       | 81936   (1)| 00:16:24 |  Q1,04 | PCWP |            |
|  31 |           PX RECEIVE               |                              |    21 |   210 |       |     2   (0)| 00:00:01 |  Q1,04 | PCWP |            |
|  32 |            PX SEND BROADCAST       | :TQ10002                     |    21 |   210 |       |     2   (0)| 00:00:01 |  Q1,02 | P->P | BROADCAST  |
|  33 |             PX BLOCK ITERATOR      |                              |    21 |   210 |       |     2   (0)| 00:00:01 |  Q1,02 | PCWC |            |
|* 34 |              TABLE ACCESS FULL     | ACCOUNT_NUMBERS              |    21 |   210 |       |     2   (0)| 00:00:01 |  Q1,02 | PCWP |            |
|  35 |           PX BLOCK ITERATOR        |                              |    56M|    11G|       | 81840   (1)| 00:16:23 |  Q1,04 | PCWC |            |
|  36 |            TABLE ACCESS FULL       | TEMP2_SL_SNAPSHOT_ENTRIES    |    56M|    11G|       | 81840   (1)| 00:16:23 |  Q1,04 | PCWP |            |
Predicate Information (identified by operation id):
   3 - access("AGG"."COMPANY_CODE"="DET"."COMPANY_CODE" AND "AGG"."ACCOUNT_NUMBER"=SUBSTR("DET"."ACCOUNT_NUMBER",1,5) AND
              "AGG"."TRANSACTION_ID"="DET"."TRANSACTION_ID" AND "AGG"."TRANSACTION_ID_TYPE"="DET"."TRANSACTION_ID_TYPE")
   7 - filter(ABS(SUM(SYS_OP_CSR(SYS_OP_MSR(SUM("Z"."AMOUNT"),MIN("Z"."ACCOUNTING_DATE")),0)))>=0.01)
  15 - filter("USE"."ACCOUNTING_DATE"<TO_DATE(' 2010-04-22 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "USE"."ACCOUNTING_DATE">=TO_DATE('
              2010-04-21 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
  16 - access("SE"."ACCOUNT_NUMBER"="AN"."ACCOUNT_NUMBER")
  20 - filter("AN"."SUBLEDGER_TYPE"='AC' OR "AN"."SUBLEDGER_TYPE"='C')
  29 - filter("ACCOUNTING_DATE"<TO_DATE(' 2010-04-22 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "ACCOUNTING_DATE">=TO_DATE(' 2010-04-21
              00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
  30 - access("DET"."ACCOUNT_NUMBER"="AN"."ACCOUNT_NUMBER")
  34 - filter("AN"."SUBLEDGER_TYPE"='AC' OR "AN"."SUBLEDGER_TYPE"='C')
                This query is failing due to TEMP issue (TEMP SPACE out of space)
My TEMP tablespace is 70GB and no one is using TEMP space while this query is in execution.
PGA=16 GB.
What i can see from execution plan is : Two large resultsets AGG (13Million) and DET (135 Million) is being joined HASH JOIN BUFFERED. Which is getting spilled to TEMP space causing TEMP outage.
Is there any way, i can re-write this query (probably using SUB QUERY FACTORING...WITH CLAUSE) so that reduce two times access to TEMP2_SL_SNAPSHOT_ENTRIES table. TEMP2_SL_SNAPSHOT_ENTRIES is 12 GB non partition table and i cannot use any other filter to restrict rows from this table.

Adding more information here :
Inner sub query (Which forms DET-bottom)
select /*+ PARALLEL(det, 2) */  det.journal_entry_line_id, det.accounting_date, det.company_code, det.account_number, det.transaction_id,
decode(det.transaction_id_type, 'CollectionID', 'SettlementGroupID', det.transaction_id_type) transaction_id_type,  det.amount, det.currency_code,
det.debit_or_credit, det.category, det.subcategory, det.reference1, det.reference1_type, det.reference2, det.reference2_type, det.gl_batch_id, det.marketplace_id,
det.cost_center, det.gl_product_line, det.location, det.project, det.sales_channel, det.created_by, det.creation_date, det.last_updated_by, det.last_updated_date
from financials.temp2_sl_snapshot_entries det,financials.account_numbers an
where det.account_number = an.account_number
and an.subledger_type in ('C', 'AC');
Plan hash value: 976020246
| Id  | Operation               | Name                      | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
|   0 | SELECT STATEMENT        |                           |    35M|  7514M|   163K  (1)| 00:32:47 |        |      |            |
|   1 |  PX COORDINATOR         |                           |       |       |            |          |        |      |            |
|   2 |   PX SEND QC (RANDOM)   | :TQ10001                  |    35M|  7514M|   163K  (1)| 00:32:47 |  Q1,01 | P->S | QC (RAND)  |
|*  3 |    HASH JOIN            |                           |    35M|  7514M|   163K  (1)| 00:32:47 |  Q1,01 | PCWP |            |
|   4 |     BUFFER SORT         |                           |       |       |            |          |  Q1,01 | PCWC |            |
|   5 |      PX RECEIVE         |                           |    21 |   210 |     2   (0)| 00:00:01 |  Q1,01 | PCWP |            |
|   6 |       PX SEND BROADCAST | :TQ10000                  |    21 |   210 |     2   (0)| 00:00:01 |        | S->P | BROADCAST  |
|*  7 |        TABLE ACCESS FULL| ACCOUNT_NUMBERS           |    21 |   210 |     2   (0)| 00:00:01 |        |      |            |
|   8 |     PX BLOCK ITERATOR   |                           |    56M|    11G|   163K  (1)| 00:32:45 |  Q1,01 | PCWC |            |
|   9 |      TABLE ACCESS FULL  | TEMP2_SL_SNAPSHOT_ENTRIES |    56M|    11G|   163K  (1)| 00:32:45 |  Q1,01 | PCWP |            |
Predicate Information (identified by operation id):
   3 - access("DET"."ACCOUNT_NUMBER"="AN"."ACCOUNT_NUMBER")
   7 - filter("AN"."SUBLEDGER_TYPE"='AC' OR "AN"."SUBLEDGER_TYPE"='C')
Statistics
         31  recursive calls
          3  db block gets
    1634444  consistent gets
    1625596  physical reads
        636  redo size
1803659818  bytes sent via SQL*Net to client
     125054  bytes received via SQL*Net from client
      11331  SQL*Net roundtrips to/from client
          3  sorts (memory)
          0  sorts (disk)
   56645822  rows processedOther sub query (that forms AGG)
     select /*+ PARALLEL(se, 2) */  company_code, substr(se.account_number, 1, 5) account_number,transaction_id,
     decode(transaction_id_type, 'CollectionID', 'SettlementGroupID', transaction_id_type) transaction_id_type,se.amount,se.accounting_date
     from financials.temp2_sl_snapshot_entries se,financials.account_numbers an
     where se.account_number = an.account_number
     and an.subledger_type in ('C', 'AC');
Plan hash value: 976020246
| Id  | Operation               | Name                      | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
|   0 | SELECT STATEMENT        |                           |    35M|  2012M|   163K  (1)| 00:32:37 |        |      |            |
|   1 |  PX COORDINATOR         |                           |       |       |            |          |        |      |            |
|   2 |   PX SEND QC (RANDOM)   | :TQ10001                  |    35M|  2012M|   163K  (1)| 00:32:37 |  Q1,01 | P->S | QC (RAND)  |
|*  3 |    HASH JOIN            |                           |    35M|  2012M|   163K  (1)| 00:32:37 |  Q1,01 | PCWP |            |
|   4 |     BUFFER SORT         |                           |       |       |            |          |  Q1,01 | PCWC |            |
|   5 |      PX RECEIVE         |                           |    21 |   210 |     2   (0)| 00:00:01 |  Q1,01 | PCWP |            |
|   6 |       PX SEND BROADCAST | :TQ10000                  |    21 |   210 |     2   (0)| 00:00:01 |        | S->P | BROADCAST  |
|*  7 |        TABLE ACCESS FULL| ACCOUNT_NUMBERS           |    21 |   210 |     2   (0)| 00:00:01 |        |      |            |
|   8 |     PX BLOCK ITERATOR   |                           |    56M|  2701M|   162K  (1)| 00:32:35 |  Q1,01 | PCWC |            |
|   9 |      TABLE ACCESS FULL  | TEMP2_SL_SNAPSHOT_ENTRIES |    56M|  2701M|   162K  (1)| 00:32:35 |  Q1,01 | PCWP |            |
Predicate Information (identified by operation id):
   3 - access("SE"."ACCOUNT_NUMBER"="AN"."ACCOUNT_NUMBER")
   7 - filter("AN"."SUBLEDGER_TYPE"='AC' OR "AN"."SUBLEDGER_TYPE"='C')
Statistics
         31  recursive calls
          3  db block gets
    1634444  consistent gets
    1625596  physical reads
        592  redo size
1803659818  bytes sent via SQL*Net to client
     125054  bytes received via SQL*Net from client
      11331  SQL*Net roundtrips to/from client
          3  sorts (memory)
          0  sorts (disk)
   56645822  rows processed

Similar Messages

  • Recursive Sub-query Factoring vs Hierarchical Query

    Experts,
    The below are two queries i am executing by using classical approach hierarchical and newest recursive sub-query.Problem is output was different for recursive sub-query factoring, as this is not showing parent-child approach, while connect by prior is showing parent-child fashion.Query 1, i am using hierarchical as it showing correct output parent-child approach, while Query 2 is displaying all the level 1 nodes and then level 2 nodes.I want query 2 output to be same as query 1.Please modify query 2 as required.
    Note:The output of the both queries won't be in displayed as it was in sqlplus, or toad.Please copy and use in your command prompts.
    QUERY 1:
    with main as(select 1 id,'john' name,null mgrid from dual union all
    select 2 id,'michael' name,null mgrid from dual union all
    select 3 id,'peter' name,null mgrid from dual union all
    select 4 id,'henry' name,1 mgrid from dual union all
    select 5 id,'nick' name,2 mgrid from dual union all
    select 6 id,'pao' name,3 mgrid from dual union all
    select 7 id,'kumar' name,3 mgrid from dual union all
    select 8 id,'parker' name,3 mgrid from dual union all
    select 9 id,'mike' name,5 mgrid from dual),
    select lpad(' ',2*(level-1))||name name,level from main start with mgrid is null connect by prior id=mgrid;
    OUTPUT :
    NAME LEVEL
    john 1
    henry 2
    michael 1
    nick 2
    mike 3
    peter 1
    pao 2
    kumar 2
    parker 2
    9 rows selected.
    QUERY 2:
    with main as(select 1 id,'john' name,null mgrid from dual union all
    select 2 id,'michael' name,null mgrid from dual union all
    select 3 id,'peter' name,null mgrid from dual union all
    select 4 id,'henry' name,1 mgrid from dual union all
    select 5 id,'nick' name,2 mgrid from dual union all
    select 6 id,'pao' name,3 mgrid from dual union all
    select 7 id,'kumar' name,3 mgrid from dual union all
    select 8 id,'parker' name,3 mgrid from dual union all
    select 9 id,'mike' name,5 mgrid from dual),
    /*select lpad(' ',2*(level-1))||name name,level from main start with mgrid is null connect by prior id=mgrid;*/
    secmain (id,name,mgrid,hierlevel) as(select id,name,mgrid,1 hierlevel from main where mgrid is null
    union all
    select m.id,m.name,m.mgrid,sm.hierlevel+1 from main m join secmain sm on(m.mgrid=sm.id))
    cycle id set is_cycle to 1 default 0
    select lpad(' ',2*(hierlevel-1))||name name,hierlevel from secmain;
    OUTPUT :
    NAME HIERLEVEL
    john 1
    michael 1
    peter 1
    henry 2
    nick 2
    parker 2
    kumar 2
    pao 2
    mike 3
    9 rows selected.

    Hi,
    What's wrong with Query 1? If it's producing the results you want, then why not use it?
    One of the nice features of CONNECT BY is that the output is automatically presented in hierachical order. The only way I know of to get the results of a recursive WITH clause in any kind or order is to do it yourself. Here's one way:
    WITH       secmain (id, name, mgrid, hierlevel, path)     AS
         SELECT  id
         ,     name
         ,     mgrid
         ,     1               AS hierlevel
         ,     RPAD (name, 10)          AS path          -- Assuming name is never longer than 10
         FROM      main
         WHERE      mgrid     IS NULL
        UNION ALL
             SELECT     m.id
         ,     m.name
         ,     m.mgrid
         ,     sm.hierlevel + 1
         ,     sm.path || RPAD (name, 10)
         FROM     main      m
         JOIN     secmain  sm  ON   (m.mgrid     = sm.id)
         CYCLE     id     -- Why do you need this if CONNECT BY NOCYCLE wasn't needed in Query 1?
         SET      is_cycle     TO 1
         DEFAULT 0
    SELECT        lpad ( ' '
                , 2 * (hierlevel - 1)
                ) || name                 AS name
    ,       hierlevel
    FROM        secmain
    ORDER BY  path
    ;Sorry, I don't have an Oracle 11.2 database right now, so I can't test it.
    Edited by: Frank Kulash on Nov 23, 2011 9:15 AM
    I didn't know about the SEARCH clause, Use Dom's solution, above.

  • Recursive Sub-query Factoring... bug? or my own personal ignorance?

    I was trying to create a list of all dates in the current month using a recursive sub-query factor. (Oracle 11.2)
    I know how to do this by other methods; the question is, what's going on with this "WITH" example?
    Here's my attempt at generating the list:
    with
      date_list ( crnt_mnth_date )  as
        ( select  cast ( trunc(sysdate,'MM') as date )  from dual
          UNION ALL
          select  crnt_mnth_date + interval '1' day
            from  date_list
           where  to_char(crnt_mnth_date,'MM') = to_char(sysdate,'MM')
    select  *  from  date_list ;The recursion should add one day to the previous date and continue while the generated dates are in the same month
    as the current-date (sysdate). All I get is the first day of the month. In an attempt to figure this out I added the
    sequence "n". To my surprise the recursion is subtracting instead of adding the one day each time.
    with
      date_list ( n, crnt_mnth_date )  as
        ( select  1,  cast ( trunc(sysdate,'MM') as date )  from dual
          UNION ALL
          select  n+1,  crnt_mnth_date + (interval '1' day)  as crnt_mnth_date
            from  date_list
           where  n < 9
    select  *  from  date_list ;And... Changing the "+" to a "-" still subtracts one day each time -- no change.
    Obvious BUG? Or am I just confused on how this works?

    Hi,
    I've heard that the new recursive WITH clause feature is buggy, especially when DATEs are involved.
    I get the same (unexpected) results that you do.
    A very similar query, using only NUMBERs, does wotk as expected:
    with
      date_list ( n, crnt_mnth_num )  as
        ( select  1,  20010501   from dual
          UNION ALL
          select  n+1,  crnt_mnth_num + 1  as crnt_mnth_num
            from  date_list
           where  n < 9
    select  *  from  date_list ;Outptu:
    `       N CRNT_MNTH_NUM
            1      20010501
            2      20010502
            3      20010503
            4      20010504
            5      20010505
            6      20010506
            7      20010507
            8      20010508
            9      20010509

  • Help Required -- Can we use SQL Query to READ data from SAP MDM Tables

    Hi All,
    Please help.........
    Can we use SQL Query to READ(No Creation/Updation/Deletion  just Read) Data from SAP MDM tables directly, without using MDM Syndicator.
    Or direct SQL access to SAP MDM tables is not possible. Only through MDM Syndicator can we export data.
    Thanks in Advance
    Regards

    All the tables you create in Repository comes under A2i_CM_Tables in Database named as your repository name. So the tables names are fields of table A2i_CM_Tables. Now i tried it but cant make it.
    Now, I dont think its possible to extract all fields in tables and there values using select query. May be pure sql guy can do that or not.
    But there is no relation of data extraction and syndicator. Data is viewed in Data Manager. and you can also store data in a file from DM also.
    BR,
    Alok

  • The voice that was on when I first set up my ipad came back on and now I have to double click to get into my apps and can't use my apps because her voice is always talking.  How do I make her voice go away and my IPAD work like it should.

    The voice that was on when I first set up my ipad came back on and now I have to double click to get into my apps and can't use my apps because her voice is talking.  How do I make the voice stop and my IPAD work again. 

    If you've turned VoiceOver on then see if triple-clicking the home button turns it off, and then change what Settings > General > Accessibility > Triple-Click Home is set to.
    Otherwise, via 'the touch to select double-tap to activate' process you need to go into Settings > General > Accessibility > VoiceOver and turn it off
    The manual (http://support.apple.com/manuals/#ipad) also says that you should be able to switch voice-over off by connecting to your computer's iTunes :
    Turn VoiceOver on or off in iTunes: Select iPad in the iTunes sidebar. In the Options section of the Summary pane, click Configure Universal Access. Select VoiceOver, then click OK.
    So select Configure Universal Access at the bottom of the Summary tab and set Seeing to Neither

  • Can I use custom query in DB Adapter with Polling

    Hi All,
    I am getting problem while using db adapter with polling. Can I use custom query in db adapter with polling.
    I am using 2 tables; table 1 and table2
    Structure of table1 is as:
    File_name
    Batch_id
    Creation_date
    Status
    Structure of table2 is as:
    Batch_id
    Employee_ID
    Last_Name
    First_Name
    Middle_Name
    Group_ID
    Site_ID
    Dept_Num
    Report_id
    I have to use below query while polling to table1
    Select count(*) as NOSEXP, Report_id
    from table1, table2
    where table2.batch_id =
    table2.batch_id
    and table1.Status= 0
    group by Report_id;
    I mean, when I use DB adapter to poll table1, I have to use above query.
    Can you Please suggest on this.
    Thanks in advance.

    I will check for existance not based on Primary key but based on three other fields in the table. I think , by default DB adapter configured for MERGE checks for existance based on PK. Can we change the Primary Key in the mapping file after the DB adapter is configured. In that case , will it check for existance based on the fields , I mention.
    Edited by: user12020809 on Sep 16, 2012 6:08 PM

  • Can I use control query and Variant?

    Can I use control query and Variant?
    I tried both but it’s not working, what’s my requirement is in a web template having material, distribution as drop box and I have to create for all countries(Like USA, Canada,China…)so what I did , I created a control query as material& distribution and I created variants for countries. After precalculating it’s not working.
    Any help ll be appreciated
    Thanks

    Yes you can use Control Query AND Variant in your Setting. Maybe you did not setup you Web template correctly?

  • After I edited the SQL in a dataset, I can't use the query builder in any datasets that I create.

    Is there a way to reset BI Publisher Enterprise 11 so that I can use the query builder again instead of having to write out all of the SQL? I know that I can't use the query builder for the dataset that I edited the sql in but I would like to use the query builder for new datasets.
    Thanks,

    Hi J_Constantine,
    Welcome to the Apple Support Communities!
    I understand that your iPad is restarting and not responding sporadically. You have already attempted some great troubleshooting steps and I think you are on the right track. Holding the home button is one step that you take while placing your device in recovery mode to restore. This is the method that I would suggest to restore. For complete information on how to place your device into recovery mode, please reference the attached article. 
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    Best regards,
    Joe

  • How to use sub query in CAML in splist

    hi,
    want to know whether any sub query functionality can be achieved in splist/sp doc lib using  CAML designer 2013/ query builder. also inner joins need to be implemented as pe rmy requirement.
    if caml designer is not supported, whats the allternative way of doing this?
    can LINQ to SP be used? if yes, can anyone pls roivde how to implement  the same
     help is appreciated

    You can use the let keyword to scope a variable containing the result of your subquery.
     However, it depends on the LINQ provider as to whether or not it can understand the command.
    For example, you can create the sample like this
    var result = (from p in productInQuery
          join o in orderInfoQuery on p.refNo equals o.refNo
          join t in productOutQuery on p.no equals t.productInNo into productIn
          from t in productIn.DefaultIfEmpty()
          let dateOut = (from m in orderInfoQuery where m.refNo == t.refNo select m.processData).FirstOrDefault()
          orderby o.processDate descending
          select new
              modelNo = x.modelNo,
              qty = p.qty,
              dateIn = o.processDate,
              dateOut = dateOut
    https://www.youtube.com/watch?v=N3K0h6GDwW4
    For more info, check this
    http://msdn.microsoft.com/en-us/library/ee539975.aspx

  • How can I use cfc query result to grid.dataprovider

    In rich from ,I builder a button , when it click ,I want to
    use cfc query some sql result ,and put it in grid.
    I use flower code ,but it have error ,help me !!!
    <CFSAVECONTENT variable="upd_query">
    <cfinvoke
    component="test.components.Getorder"
    method="GetAllorder"
    returnvariable="GetAllorderRet">
    </cfinvoke>
    <cfif Isstruct(GetAllorderRet)>
    s_ghid1.visible= false;
    abc.text = "The GetallorderRet is struct";
    </cfif>
    <cfoutput>
    listorder.dataProvider = [#GetAllorderRet.];
    </cfoutput>
    </CFSAVECONTENT>
    In form:
    <cfinput type="button" name="s_search" style="
    borderThickness:1;" onClick="#upd_query#"
    value="Search"/>

    Can you expand on that? I'm sorry but I am new and a novice to the SSIS world and I want to do this as best I can and as efficiently as I can. Are you saying that Rajen's way suggested above is the way to go?
    A little background....external data from a 3rd party client. I'v staged that external data to a SQL Server staging table. I have to try and match that data up to our database using SSN, DOB, and Gender...and if I can't match that way then I have to try
    and match by Name. I need to make sure that there is only one and only one account for that match. If I cannot match and match one and only one, then I'll create rows on a DataAnomaly Table. If I do match, then I have to check and make sure that there is only
    one and only one Member span for that match. Similarly handle the data anomaly and then check and make sure there is a "Diabetes" claim and similarly handle the DataAnomaly accordingly.
    That's where I'm at. Sooooo are you saying to use Rajen's suggestion? I don't think I can do that because I need multiple SQL tasks and I cannot connect multiple OLE DB Source tasks.
    Any help and suggestions are greatly appreciated.
    Thanks.

  • I can't use this query on 10G, but can use on 9i

    I have ever used bellow query and no error
    SQL>select so.* from bsowner.sales_orders so left join bsowner.relation_address rla on (so.customerid = rla.relationid and so.delivery_addressid = rla.addressid ) and rla.addresstype = (select code from bsowner.tab_addtyp where config1=3)
    When I use on 10G, I can't query
    1* select so.* from bsowner.sales_orders so left join bsowner.relation_address rla on (so.customerid = rla.relationid and so.delivery_addressid = rla.addressid ) and rla.addresstype = (select code from bsowner.tab_addtyp where config1=3)
    SQL> /
    select so.* from bsowner.sales_orders so left join bsowner.relation_address rla on (so.customerid = rla.relationid and so.delivery_addressid = rla.addressid ) and rla.addresstype = (select code from bsowner.tab_addtyp where config1=3)
    ERROR at line 1:
    ORA-01799: a column may not be outer-joined to a subquery
    Help me,Please
    Why I can't use this on 10G?
    when i change = to in , i can use
    but i don't want to change
    help me for the reason

    I don't this gonna work on 9i either.
    Chang your query to
    select so.* from bsowner.sales_orders so left join bsowner.relation_address rla on (so.customerid = rla.relationid and so.delivery_addressid = rla.addressid )
    Where
    rla.addresstype = (select code from bsowner.tab_addtyp where config1=3)

  • Can we use Group by Clause here?

    All,
    Can we use group by clause in the date column?
    If yes, will it work for these kind of values '11/12/2009 12:30:45 PM' and '11/12/2009 4:30:45 PM'......

    Hi,
    frontier007 wrote:
    All,
    Can we use group by clause in the date column?
    If yes, will it work for these kind of values '11/12/2009 12:30:45 PM' and '11/12/2009 4:30:45 PM'......Yes, GROUP BY works with DATEs.
    Remember that DATEs always include hours, minutes and seconds, so '11/12/2009 12:30:45 PM' and '11/12/2009 4:30:45 PM', though they are in the same calendar day, are different DATE values. If you want them to be in the same group, then use TRUNC.
    For example:
    SELECT    TRUNC (entry_date)      AS entry_dt
    ,         SUM (amount)            AS daily_amount
    FROM      orders
    GROUP BY  TRUNC (entry_date)
    ;Edited by: Frank Kulash on Oct 30, 2009 4:55 AM

  • I bought an iphone 4 at 2010 but i had to move another country. now i can`t use my phone in here. is there any way to unlock it?

    i bought an iphone 4 at 2010. i had to move to Turkey. i upgraded it to ios 6.0.1 now i can't use my phone. is there any way to unlock it?

    Contact the original cellular provider to determine their unlocking policy.

  • How can i use the boolean AND here?

    Hi,
    how can i use the boolean expression AND in order to include it in the expression below so as that 2 condition must be true in order to get the respective data from the database?
    java.sql.ResultSet res = statement.executeQuery("SELECT * FROM station9 " + "WHERE P =" + power);
    regards

    java.sql.ResultSet res = statement.executeQuery("SELECT * FROM station9 " + "WHERE P =" + power + " AND FLAVOUR = " + raspberry);

  • On Apple TV can I use "sub" or personal phot streams rather than displaying the baseline photo stream?

    I would like to control the sequence and content of what ends up as the screen saver for my Apple TV. Can I use other "folders"?
    Thank you.

    You can specify a folder on a computer (or iPhoto events etc on a Mac) though you may not get perfect control over display order.
    Use iTunes>File>Home Sharing>Choose photos to share etc
    iTunes would need to be running on teh LAN to support this.
    AC

Maybe you are looking for

  • Bootcamp and windows 8(partition problem)

    I am trying to install windows 8 and until now with no sucess. The instalation by the bootcamp runs smoothly, but when I boot from the USB, start the instalation process on windows and it asks me what partition I want to install the windows, I try to

  • I lost all my pictures in Aperture and I used Time Machine to restore the lost pictures.

    After losing all my pictures on Aperture and not being able to restore the the pictures using Time Machine as instructed by Apple Care.  I searched the web on how to restore the pictures using Time Machine and did not find a good solution.  So with t

  • Spry Bars in IE

    Hi, Within my website (www.tim-mitchell.co.uk) built in Dreamweaver CS3 and using the handy Spry menus neither the Horizontal Menu Bars or the Collapsible panels work in IE!! Does anyone know how to correct this - please!! This is massively annoying

  • I have installed and reinstaled Flash. When I go too your test site a Star pops up and it isn't work

    I have installed and reinstaled Flash. When I go too your test site a Star pops up and it isn't working. I need some help with this.

  • Error-file to Idoc

    Hi, I have created file to idoc scenario. I have done all the Design and  Configuration parts. But when executed the same scenario by placing input file on input folder. Its not picking the file and in sxmb_moni also it wont give any messages?!! What