Using the Tag Query's Statistics Mode

I've tried to come up with the average of tag values over a span of a month two different ways:
1.  using the Statistics mode
2.  using the HistoryEvent mode and averaging the resultant data with an average function.
For most tags the two results are quite similar.  I have one tag however that contains a lot of zero values and for that tag, the Statistics mode average is about 10% higher than the HistoryEvent mode average. It's like the Statistics mode ignores the zero values when doing it's calculations.
Is this correct?  My tag query is returning data from six tags - does this cause the Statistics mode any heartache?
David Macindoe

David,
Martin K - if you are listening please feel free to correct or confirm the following:
The PI UDS uses native Statistical method calls to the PI API/SDK, so the results are coming directly from PI.  In this case, xMII is not doing a HistoryEvent call and then doing the average calcs on the raw event records, like it would be if you did it in BLS.
Regards,
Jeremy

Similar Messages

  • I want to use the SQL query IF EXIST to update or insert data in a ms access table, but it doesn´t work

    Hi,
    I want to use the SQL query IF EXIST to update or insert data in a ms access table, but it doesn´t work
    (fault number -2147217900)
    I want to search for a value in a ms access table , if it exist i want to update it, if not i want to insert a new row.
    Working with LabView 7.1, database con. toolset.
    Who can HELP?
    Thanks a lot
    Marco

    Hello,
    I think that If exist is not a standar SQL command (I know it exists I think in Oracle and SQL server), MS access doesn't support it, so I think the best way to do it is first make a Select and then either an Update or an insert, sorry...
    Paulo

  • How do i figure it out what app use the cellular data in standby mode?

    How do i figure it out what app use the cellular data in standby mode? I disabled the cellular data for 3 days, and my battery last longer. I don't use push notifications, neither location services. I'm not signed in in skype or any IM app.

    Do you use push email?  Do you have accounts that have synchronized calendars associated with them?  Those features will still use cellular data in the background as the receive mail and send or receive calendar updates.
    Some notifications, like push notifications from Facebook and other social networking sites may use cellular data in the background.  Basically, any automated data task like those may use cellular data when the phone is in standby (note that wifi would be used if available when the phone is active, but wifi turns off in standby and all data goes through the cellular data connection).

  • Using the Color Panel in HSB mode

    Using the Color Panel in HSB mode. I start by selecting a color in the spectrum at the bottom using the eyedropper.
    As I drag the eyedropper through the spectrum it seems the H slider moves to the same color.
    1. Is the H slider showing the same exact thing that is in the color spectrum at the bottom?
    Thanks.

    Yes if you drag a strait line so that the other two sliders don't move. In other words you are changing only the Hue (H). If you drag up and down the other two sliders Saturation and Brightness will be affected.
    Hi Grant, nice to see you again

  • Problem in finding Exact result by using the following Query

    Hello,
    I am finding difficulty in producing the required result by using the following Query in Reports 6i
    (Note: - The query actual output and the required output are as follows: -)
    SELECT
    DISTINCT
    SH.S_HEAD_CODE,
    B.BILL_ID,
    B.SANCTION_DATE,
    E.EMP_NAME,
    E.EMP_DESIGNATION,
    B.TOTAL_BILL,
    NVL((SH.INITIAL_ALLOCATION-B.TOTAL_BILL), 0) BALANCE
    FROM BILL B, PARAMETERS P,SUB_HEAD SH, EMPLOYEES E, BILL_DETAIL BD
    WHERE
    SH.S_HEAD_CODE=B.S_HEAD_CODE
    AND B.S_HEAD_CODE=BD.S_HEAD_CODE
    AND B.EMP_ID_NO=E.EMP_ID_NO
    AND B.BILL_ID=BD.BILL_ID
    The Output of the above query is as follows: -
    Let say we have Total Amount Sanctioned Rs. 15,000,00/-
    Name Total Bill (Rs.) Balance (Rs.)
    Sohail 7147 1492853
    Saqib 2131 1497869
    Amir 6802 1493198
    Shafiq 1214 1498786
    Note:- In the above output the above query is subtracting the current balance from Total Sanctioned Amount (Rs. 1500000) each time, but
    it should actually subtract the current bill amount from the previous balance like the below said result.
    Name Total Bill (Rs.) Balance (Rs.)
    Sohail 7147 1492853 {Previous Balance - Current Bill Amount (1500000-7147) }........ The previous balance was actual amount Rs. 1500000
    Saqib 2131 1490722 {Previous Balance - Current Bill Amount (1492853 - 2131)}
    Amir 6802 1483920 {Previous Balance - Current Bill Amount (1490722 - 6802)}
    Shafiq 1214 1482706 {Previous Balance - Current Bill Amount (1483920 - 1214)}
    Results Continue...........................
    Please help me to solve this problem.
    Thank you in advance

    just check if this meets your requirements,
    SQL>
    SQL> With t As
      2  (
      3  Select 'Sohail' c1 ,7147 c2 ,1492853 c3 From dual Union All
      4  Select 'Saqib'   ,2131 ,1497869         From dual Union All
      5  Select 'Amir'    ,6802 ,1493198         From dual Union All
      6  Select 'Shafiq' ,1214 ,1498786          From dual
      7  )
      8  Select c1,
      9         c2,
    10         prv_amt - c2 current_amt
    11  From
    12  (
    13  Select c1,
    14         c2,
    15         c3,
    16         lag(c3,1,1500000) over(Order By c3) prv_amt
    17  From t
    18  );
    C1             C2 CURRENT_AMT
    Sohail       7147     1492853
    Amir         6802     1486051
    Saqib        2131     1491067
    Shafiq       1214     1496655
    SQL>

  • Can you use the  tag in mail?

    I was reading about sub-addressing in email accounts. It was suggested to use the +tag with your email address, such as: [email protected]
    Any idea if this works with Apple Mail, and if so how to go about it?.
    Thanks

    iCloud: Create or change email aliases

  • I am having a problem changing a color in a selected area. Using the Quick Selection tool I am able to select the area I wish to change. Using the Brush tool, color, color mode and click drag in my selected area, nothing happens, no color changes.   I hav

    I am having a problem changing a color in a selected area. Using the Quick Selection tool I am able to select the area I wish to change. Using the Brush tool, color, color mode and click drag in my selected area, nothing happens, no color changes. I have viewed some videos and read numerous articles but haven't found the one to help me. Please point me in the best direction. Thank you Vincent TC

    For the sake of clarity and to save people time, Todd is asking about the behaviour of the Patch tool when using it to repair the area next to the young lad's head.  Todd gets a blurred dark tone pretty much regardless of the options he uses.
    IMO that's what I would expect to happen because of the close proximity of the other image elements i.e. the lad's neck and the strong lines of his shirt.  I would not choose to use the Patch tool in this situation.  Content Aware Fill makes a better stab at it. 

  • Lightswitch html use the 'any' query method

    Hi
    Can someone please tell me how i can use the "any" query method for entity collections in lightswitch html?
    Thanks

    Hi Xpert360
    It's for a type of EntityCollection this is the code from the msls-2.5.2.vsdoc.js line 2220
    any: function any(predicate) {
    /// <summary>
    /// Determines whether this sequence contains any
    /// items that optionally satisfy a condition.
    /// </summary>
    /// <param name="predicate" type="Function" optional="true">
    /// A function to test each item for a condition.
    /// <br/>Signature: Boolean item.predicate(item)
    /// </param>
    /// <returns type="Boolean">
    /// True if this sequence contains any items that
    /// satisfy the condition, if any; otherwise, false.
    /// </returns>
    var result = false;
    this.each(function (item) {
    if (!predicate || predicate.call(item, item)) {
    result = true;
    return false;
    return true;
    return result;
    Check it out and let me know if you know how to use it, my problem is how to use the call back function.
    Thanks

  • Creating multiple tab reports using the same query in Web intelligence

    Hi All,
    I have created a Universe on a BW Query which has fields as below
    AGE  Depaatment  Gender  Grade
    25       FIN                M            A
    27       LES               F            A+
    60       SWS            M             A++
    Based on this data i have created a WEbi report which shows all of these data under one tab.
    Now i create a new report tab in the same Webi Document by right cliicking the existing report and going to inset report and saving it.
    Similarly i create two more new report tabs.
    in each of these tabs i want to show data only for the concened departments.ie =1st report contains all the departments.
    2nd report contains only finance data, third contains only Les data  and fourth only SWs Data.
    Is it possible to create this report using the same query?
    Regards,
    Raj.

    You should use report filters, not query filters.
    A query filter will affect the entire document. Every report tab that pulls data from that query will be impacted. If you start with a single report, by default it shows the data from the query. If you duplicate that report tab, then it's still attached to the first query. There are various ways to create report filters (input controls, quick filter, invoking the filter area from the toolbar) and a report filter impacts only blocks on that report tab. You can even create block filters by clicking on the block first, then creating your filter.
    This is a fairly confusing bit for folks that are new to Web Intelligence.

  • Fetching data using the method query

    Hi experts
    Using the class /scmtms/if_lcp and using the method query, how to fetch the data from the business objects.
    my requirement is i need to fetch the data from the BO /SCMTMS/FRIEGHTORDER and  /SCMTMS/SHIPMENTREQUEST.
    If any one can send the sample code for this, it will be very usefull for me.
    Thanks in advance
    sai
    Edited by: sai sai on Jun 17, 2009 5:21 PM

    report  z_fo_read.
    data:
      lr_fro        type ref to /scmtms/if_lcp,
      lr_lcp_transaction type ref to /scmtms/if_lcp_transaction.
    * step 1
    lr_lcp_transaction = /scmtms/cl_lcp_factory_adapter=>get_lcp_transaction_handler( ).
    * Schritt 2:
    lr_fro = lr_lcp_transaction->/scmtms/if_lcp_facade~get_lcp( in_bo_name = /scmtms/if_freightorder=>co_bo_name ).
    constants: co_do_prefix_root_tpcharges type string value 'TRANSPORTCHARGES.ROOT'.
    * Schritt 3:
    data:
      ls_params        type /scmtms/s_srq_rt_a_block value is initial,
      ls_root_data     type /scmtms/if_freightorder=>ty_root,
      ls_selection     type /scmtms/s_selection_parameter,
      lt_out_messages  type /scmtms/if_srvmgr_types=>ty_messages,
      lt_out_node_ids  type /scmtms/t_bo_node_id,
      lt_root_data     type /scmtms/if_freightorder=>tt_root,
      lt_items_data    type /scmtms/if_freightorder=>tt_transportchargesinfo,
      ls_items_data    type /scmtms/if_freightorder=>ty_transportchargesinfo,
      lt_selections    type /scmtms/t_selection_parameters,
      lv_action_name   type string,
    *     Notification structure
      ls_change_notifications type /scmtms/if_srvmgr_types=>ty_change_notifications.
    * A) Root-ID des SRQ holen, der ge-/entsperrt werden soll:
    ls_selection-attribute_name = /scmtms/if_freightorder=>co_attr-root-for_id. " ID.
    ls_selection-sign   = 'I'.
    ls_selection-option = 'EQ'.
    ls_selection-low    = '00000000000000000000000000000000800'.
    *ls_selection-high   = '00000000000000000000000000000000427'.
    append ls_selection to lt_selections.
    call method lr_fro->query
      exporting
        in_bo_node_name         = /scmtms/if_freightorder=>co_bo_node-root
        in_query_name           = /scmtms/if_freightorder=>co_query-root-root
        in_selection_parameters = lt_selections
      importing
        out_node_ids    = lt_out_node_ids
        out_messages    = lt_out_messages.
    * B) Daten holen:
    call method lr_fro->retrieve
      exporting
        in_bo_node_name        = /scmtms/if_freightorder=>co_bo_node-root
        in_node_ids            = lt_out_node_ids
      importing
        out_data               = lt_root_data
        out_messages           = lt_out_messages.
    read table lt_root_data into ls_root_data index 1.
    The above code is a snippet, extract useful information for you.

  • Error using a tag query

    We have a tag query that works in our sandbox environment, but not in dev.  I loaded the same JDBC drivers on both systems.
    The project was exported from the sandbox, and imported into dev.
    I have verified the Data Server set up is identical in both environments.  Connection status in both environments is identical - running, same number of connections, etc.
    When I try to run the query on sandbox in workbench, the query returns data.  I get this error on the dev system -
    SQL error has occurred on query java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'tag'.
    Detailed error -
    java.lang.Exception: SQL error has occurred on query [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'publicgrouptag'.
         at com.sap.xmii.Illuminator.gui.workbench.populators.IlluminatorPopulator.get(IlluminatorPopulator.java:114)
         at com.sap.xmii.Illuminator.gui.workbench.populators.TagListPopulator.get(TagListPopulator.java:47)
         at com.sap.xmii.Illuminator.gui.workbench.components.desktop.custom.TagQueryBuilderPanel$6.construct(TagQueryBuilderPanel.java:723)
         at com.sap.lhcommon.gui.ThreadCreator$2.run(ThreadCreator.java:94)
         at java.lang.Thread.run(Unknown Source)
    Any suggestions??

    One of your included JDBC driver archives has a class that matches the path provided by the JDBCDriver setting for the data server (likely the sqljdbc.jar file).
    If you take the JDBCDriver setting: 
    com.microsoft.sqlserver.jdbc.SQLServerDriver
    and replace the periods for sub directories and add a .class on the end you'll have:
    com\microsoft\sqlserver\jdbc\SQLServerDriver.class
    So if you unpacked the jar file you'd find this java class (and the other ones included with the driver).
    Do you get the same error about 'publicgrouptag' and 'tag' objects when you test a tag query request for GroupList mode?  These tables/views would be used by the underlying queries used to populate the tag details tab in the WB.  Do you see these tables or view within the SQL Server?  Does the sa user have appropriate permissions?

  • Performance issue when using the same query in a different way

    Hello,
    I have a performance problem with the statement below when running it with an insert or with execute immediate.
    n.b.: This statement could be more optimized, but it is a generated statement.
    When I run this statement I get one row back within one second, so there is no performance problem.
       select  sysdate
             ,5
             ,'testje'
             ,count (1)
             ,'NL' groupby
       from   (select 'different (target)' compare_type
                       ,t.id_org_addr id_org_addr -- ID_ORG_ADDR
                       ,t.vpd_country vpd_country -- CTL_COUNTRY
                       ,t.addr_type addr_type -- ADDRESSTYP_COD
                 from   (select *
                         from   (select t.*
                                 from      ods.ods_org_addr t
                                        left outer join
                                           m_sy_foreign_key m
                                        on m.vpd_country = t.vpd_country
                                        and m.key_type = 'ORGADDR2'
                                        and m.target_value = t.id_org_addr
                                 where  coalesce (t.end_date, to_date ('99991231', 'yyyymmdd')) >= sysdate) /*SGRB*/
                         where  vpd_country = 'NL' /*EGRB*/
                                                  ) t
                 where  exists
                           (select null
                            from   (select *
                                    from   (select m.target_value id_org_addr
                                                  ,s.wkp_id_cegedim || '-' || s.adr_id_cegedim || '-' || s.addresstyp_cod id_cegedim
                                                  ,s.*
                                            from      okc_mdl_workplace_address s
                                                   left outer join
                                                      m_sy_foreign_key m
                                                   on m.vpd_country = s.ctl_country
                                                   and m.key_type = 'ORGADDR2'
                                                   and m.source_value = s.wkp_id_cegedim || '-' || s.adr_id_cegedim || '-' || s.addresstyp_cod
                                            where  coalesce (s.end_val_dat, to_date ('99991231', 'yyyymmdd')) >= sysdate) /*SGRB*/
                                    where  ctl_country = 'NL' /*EGRB*/
                                                             ) s
                            where  t.id_org_addr = s.id_org_addr)
                 minus
                 select 'different (target)' compare_type
                       ,s.id_org_addr id_org_addr -- ID_ORG_ADDR
                       ,s.ctl_country vpd_country -- CTL_COUNTRY
                       , (select to_number (l.target_value)
                          from   okc_code_foreign l
                          where  l.source_code_type = 'TYS'
                          and    l.target_code_type = 'ADDRLINKTYPE'
                          and    l.source_value = upper (s.addresstyp_cod)
                          and    l.vpd_country = s.ctl_country)
                           addr_type -- ADDRESSTYP_COD
                 from   (select *
                         from   (select m.target_value id_org_addr
                                       ,s.wkp_id_cegedim || '-' || s.adr_id_cegedim || '-' || s.addresstyp_cod id_cegedim
                                       ,s.*
                                 from      okc_mdl_workplace_address s
                                        left outer join
                                           m_sy_foreign_key m
                                        on m.vpd_country = s.ctl_country
                                        and m.key_type = 'ORGADDR2'
                                        and m.source_value = s.wkp_id_cegedim || '-' || s.adr_id_cegedim || '-' || s.addresstyp_cod
                                 where  coalesce (s.end_val_dat, to_date ('99991231', 'yyyymmdd')) >= sysdate) /*SGRB*/
                         where  ctl_country = 'NL' /*EGRB*/
                                                  ) s) When I run this statement using a insert by placing
    insert into okc_compare_results (
                   datetime
                  ,compare_tables_id
                  ,compare_target
                  ,record_count
                  ,groupby
                ) before the statement, then the statement runs about *3 to 4 minutes*, The same is happening when running the select part only using execute immediate.
    Below the execution plans of the insert with the select and the select only.
    Could somebody tell me what causes the different behavior of the "same" statement and what could I do to avoid this behavior.
    The database version is: 11.1.0.7.0
    Regards,
    Fred.
    SQL Statement which produced this data:
      select * from table(dbms_xplan.display_cursor ('cuk3uwnxx344q',0 /*3431532430 */))
      union all
      select * from table(dbms_xplan.display_cursor ('862aq599gfd6n',0/*3531428851 */))
    plan_table_output
    SQL_ID  cuk3uwnxx344q, child number 0
    select sysdate          ,:"SYS_B_00"          ,:"SYS_B_01"          
    ,count (:"SYS_B_02")          ,:"SYS_B_03" groupby    from   ( (select
    :"SYS_B_04" compare_type                    ,t.id_org_addr id_org_addr
    -- ID_ORG_ADDR                    ,t.vpd_country vpd_country --
    CTL_COUNTRY                    ,t.addr_type addr_type -- ADDRESSTYP_COD
                 from   (select *                      from   (select t.*   
                               from      ods.ods_org_addr t                 
                        left outer join                                     
       m_sy_foreign_key m                                     on
    m.vpd_country = t.vpd_country ;                                    and
    m.key_type = :"SYS_B_05"                                     and
    m.target_value = t.id_org_addr ;                             where  
    coalesce (t.end_date, to_date (:"SYS_B_06", :"SYS_B_07")) >= sysdate)
    /*SGRB*/                      where  vpd_country = :"SYS_B_08" /*EGRB*/
    Plan hash value: 3431532430
    Id   Operation                                  Name                       Rows   Bytes Cost (%CPU) Time      Pstart Pstop
    0 SELECT STATEMENT                                                                         1772 (100)                           
    1   SORT AGGREGATE                                                        1                                                
    2    VIEW                                                                 3           1772   (1) 00:00:22                
    3     MINUS                                                                                                                      
    4      SORT UNIQUE                                                        3 492   1146   (1) 00:00:14                
    *  5       HASH JOIN OUTER                                                   3 492   1145   (1) 00:00:14                
    6        NESTED LOOPS                                                                                                            
    7         NESTED LOOPS                                                    3 408    675   (1) 00:00:09                
    *  8          HASH JOIN                                                      42 4242    625   (1) 00:00:08                
    9           PARTITION LIST SINGLE                                         3375    148K    155   (2) 00:00:02    KEY    KEY
    * 10            TABLE ACCESS FULL                OKC_MDL_WORKPLACE_ADDRESS 3375    148K    155   (2) 00:00:02    KEY    KEY
    * 11           INDEX RANGE SCAN                  PK_M_SY_FOREIGN_KEY        49537   2709K    469   (1) 00:00:06                
    * 12          INDEX UNIQUE SCAN                  UK_ODS_ORG_ADDR            1              1   (0) 00:00:01                
    * 13         TABLE ACCESS BY GLOBAL INDEX ROWID ODS_ORG_ADDR               1 35      2   (0) 00:00:01 ROWID ROWID
    * 14        INDEX RANGE SCAN                     PK_M_SY_FOREIGN_KEY        49537   1354K    469   (1) 00:00:06                
    15      NESTED LOOPS                                                                                                              
    16       NESTED LOOPS                                                      1 67      9  (12) 00:00:01                
    17        NESTED LOOPS                                                     1 48      8  (13) 00:00:01                
    * 18         HASH JOIN                                                       1 23      6  (17) 00:00:01                
    * 19          TABLE ACCESS BY GLOBAL INDEX ROWID ODS_COUNTRY_SYSTEM         1 11      2   (0) 00:00:01 ROWID ROWID
    * 20           INDEX RANGE SCAN                  PK_ODS_DIVISION_SYSTEM     1              1   (0) 00:00:01                
    * 21          TABLE ACCESS FULL                  SY_SOURCE_CODE             8 96      3   (0) 00:00:01                
    22         TABLE ACCESS BY INDEX ROWID         SY_FOREIGN_CODE            1 25      2   (0) 00:00:01                
    * 23          INDEX RANGE SCAN                   PK_SY_FOREIGN_CODE         1              1   (0) 00:00:01                
    * 24        INDEX UNIQUE SCAN                    PK_SY_TARGET_CODE          1              0   (0)                           
    * 25       TABLE ACCESS BY INDEX ROWID           SY_TARGET_CODE             1 19      1   (0) 00:00:01                
    26      SORT UNIQUE                                                        3375    332K    626   (1) 00:00:08                
    * 27       HASH JOIN OUTER                                                   3375    332K    625   (1) 00:00:08                
    28        PARTITION LIST SINGLE                                            3375    148K    155   (2) 00:00:02    KEY    KEY
    * 29         TABLE ACCESS FULL                   OKC_MDL_WORKPLACE_ADDRESS 3375    148K    155   (2) 00:00:02    KEY    KEY
    * 30        INDEX RANGE SCAN                     PK_M_SY_FOREIGN_KEY        49537   2709K    469   (1) 00:00:06                
    Predicate Information (identified by operation id):
       5 - access("M"."TARGET_VALUE"="T"."ID_ORG_ADDR" AND "M"."VPD_COUNTRY"="T"."VPD_COUNTRY")
       8 - access("M"."SOURCE_VALUE"="S"."WKP_ID_CEGEDIM" :SYS_B_12 S."ADR_ID_CEGEDIM" :SYS_B_13 S."ADDRESSTYP_COD" AND
                  "M"."VPD_COUNTRY"="S"."CTL_COUNTRY")
      10 - filter(COALESCE("S"."END_VAL_DAT",TO_DATE(:SYS_B_14,:SYS_B_15))>=SYSDATE@!)
      11 - access("M"."KEY_TYPE"=:SYS_B_11 AND "M"."VPD_COUNTRY"=:SYS_B_16)
      12 - access("T"."ID_ORG_ADDR"="M"."TARGET_VALUE")
      13 - filter(("T"."VPD_COUNTRY"=:SYS_B_08 AND COALESCE("T"."END_DATE",TO_DATE(:SYS_B_06,:SYS_B_07))>=SYSDATE@!))
      14 - access("M"."KEY_TYPE"=:SYS_B_05 AND "M"."VPD_COUNTRY"=:SYS_B_08)
      18 - access("CS"."ID_SYSTEM"="SK"."ID_SOURCE_SYSTEM")
      19 - filter("CS"."SYSTEM_TYPE"=1)
      20 - access("CS"."VPD_COUNTRY"=:B1 AND "CS"."EXP_IMP_TYPE"='I')
           filter("CS"."EXP_IMP_TYPE"='I')
      21 - filter("SK"."CODE_TYPE"=:SYS_B_18)
      23 - access("FK"."ID_SOURCE_CODE"="SK"."ID_SOURCE_CODE" AND "FK"."SOURCE_VALUE"=UPPER(:B1) AND
                  "CS"."VPD_COUNTRY"="FK"."VPD_COUNTRY")
           filter(("FK"."VPD_COUNTRY"=:B1 AND "FK"."SOURCE_VALUE"=UPPER(:B2) AND "CS"."VPD_COUNTRY"="FK"."VPD_COUNTRY"))
      24 - access("FK"."ID_TARGET_CODE"="TK"."ID_TARGET_CODE")
      25 - filter("TK"."CODE_TYPE"=:SYS_B_19)
      27 - access("M"."SOURCE_VALUE"="S"."WKP_ID_CEGEDIM" :SYS_B_23 S."ADR_ID_CEGEDIM" :SYS_B_24 S."ADDRESSTYP_COD" AND
                  "M"."VPD_COUNTRY"="S"."CTL_COUNTRY")
      29 - filter(COALESCE("S"."END_VAL_DAT",TO_DATE(:SYS_B_25,:SYS_B_26))>=SYSDATE@!)
      30 - access("M"."KEY_TYPE"=:SYS_B_22 AND "M"."VPD_COUNTRY"=:SYS_B_27)
    SQL_ID  862aq599gfd6n, child number 0
    insert into okc_compare_results (                datetime               
    ,compare_tables_id               ,compare_target               
    ,record_count               ,groupby             )                
    select sysdate          ,:"SYS_B_00"          ,:"SYS_B_01"          
    ,count (:"SYS_B_02")          ,:"SYS_B_03" groupby    from   ( (select
    :"SYS_B_04" compare_type                    ,t.id_org_addr id_org_addr
    -- ID_ORG_ADDR                    ,t.vpd_country vpd_country --
    CTL_COUNTRY                    ,t.addr_type addr_type -- ADDRESSTYP_COD
                 from   (select *                      from   (select t.*   
                               from      ods.ods_org_addr t                 
                        left outer join                                     
       m_sy_foreign_key m                                     on
    m.vpd_country = t.vpd_country ;                                    and
    m.key_type = :"SYS_B_05"                                     and
    m.target_value = t.id_org_addr
    Plan hash value: 3531428851
    Id   Operation                                   Name                       Rows   Bytes Cost (%CPU) Time      Pstart Pstop
    0 INSERT STATEMENT                                                                          1646 (100)                           
    1   LOAD TABLE CONVENTIONAL                                                                                                       
    2    SORT AGGREGATE                                                        1                                                
    3     VIEW                                                                 1           1646   (1) 00:00:20                
    4      MINUS                                                                                                                      
    5       SORT UNIQUE                                                        1 163                                        
    6        NESTED LOOPS OUTER                                                1 163   1067   (1) 00:00:13                
    7         NESTED LOOPS                                                     1 135    599   (1) 00:00:08                
    *  8          HASH JOIN                                                       19 1919    577   (2) 00:00:07                
    9           PARTITION LIST SINGLE                                          1535 69075    107   (4) 00:00:02    KEY    KEY
    * 10            TABLE ACCESS FULL                 OKC_MDL_WORKPLACE_ADDRESS 1535 69075    107   (4) 00:00:02    KEY    KEY
    * 11           INDEX RANGE SCAN                   PK_M_SY_FOREIGN_KEY        49537   2709K    469   (1) 00:00:06                
    * 12          TABLE ACCESS BY GLOBAL INDEX ROWID ODS_ORG_ADDR               1 34      2   (0) 00:00:01 ROWID ROWID
    * 13           INDEX UNIQUE SCAN                  UK_ODS_ORG_ADDR            25              1   (0) 00:00:01                
    * 14         INDEX RANGE SCAN                     PK_M_SY_FOREIGN_KEY        1 28    468   (1) 00:00:06                
    15       NESTED LOOPS                                                                                                              
    16        NESTED LOOPS                                                      1 67      8   (0) 00:00:01                
    17         NESTED LOOPS                                                     1 48      7   (0) 00:00:01                
    18          NESTED LOOPS                                                    1 23      5   (0) 00:00:01                
    * 19           TABLE ACCESS BY GLOBAL INDEX ROWID ODS_COUNTRY_SYSTEM         1 11      2   (0) 00:00:01 ROWID ROWID
    * 20            INDEX RANGE SCAN                  PK_ODS_DIVISION_SYSTEM     1              1   (0) 00:00:01                
    * 21           TABLE ACCESS FULL                  SY_SOURCE_CODE             1 12      3   (0) 00:00:01                
    22          TABLE ACCESS BY INDEX ROWID         SY_FOREIGN_CODE            1 25      2   (0) 00:00:01                
    * 23           INDEX RANGE SCAN                   PK_SY_FOREIGN_CODE         1              1   (0) 00:00:01                
    * 24         INDEX UNIQUE SCAN                    PK_SY_TARGET_CODE          1              0   (0)                           
    * 25        TABLE ACCESS BY INDEX ROWID           SY_TARGET_CODE             1 19      1   (0) 00:00:01                
    26       SORT UNIQUE                                                        1535    151K                                        
    * 27        HASH JOIN OUTER                                                   1535    151K    577   (2) 00:00:07                
    28         PARTITION LIST SINGLE                                            1535 69075    107   (4) 00:00:02    KEY    KEY
    * 29          TABLE ACCESS FULL                   OKC_MDL_WORKPLACE_ADDRESS 1535 69075    107   (4) 00:00:02    KEY    KEY
    * 30         INDEX RANGE SCAN                     PK_M_SY_FOREIGN_KEY        49537   2709K    469   (1) 00:00:06                
    Predicate Information (identified by operation id):
       8 - access("M"."SOURCE_VALUE"="S"."WKP_ID_CEGEDIM" :SYS_B_12 S."ADR_ID_CEGEDIM" :SYS_B_13 S."ADDRESSTYP_COD" AND
                  "M"."VPD_COUNTRY"="S"."CTL_COUNTRY")
      10 - filter(COALESCE("S"."END_VAL_DAT",TO_DATE(:SYS_B_14,:SYS_B_15))>=SYSDATE@!)
      11 - access("M"."KEY_TYPE"=:SYS_B_11 AND "M"."VPD_COUNTRY"=:SYS_B_16)
      12 - filter((COALESCE("T"."END_DATE",TO_DATE(:SYS_B_06,:SYS_B_07))>=SYSDATE@! AND "T"."VPD_COUNTRY"=:SYS_B_08))
      13 - access("T"."ID_ORG_ADDR"="M"."TARGET_VALUE")
      14 - access("M"."KEY_TYPE"=:SYS_B_05 AND "M"."VPD_COUNTRY"=:SYS_B_08 AND "M"."TARGET_VALUE"="T"."ID_ORG_ADDR")
           filter("M"."TARGET_VALUE"="T"."ID_ORG_ADDR")
      19 - filter("CS"."SYSTEM_TYPE"=1)
      20 - access("CS"."VPD_COUNTRY"=:B1 AND "CS"."EXP_IMP_TYPE"='I')
           filter("CS"."EXP_IMP_TYPE"='I')
      21 - filter(("SK"."CODE_TYPE"=:SYS_B_18 AND "CS"."ID_SYSTEM"="SK"."ID_SOURCE_SYSTEM"))
      23 - access("FK"."ID_SOURCE_CODE"="SK"."ID_SOURCE_CODE" AND "FK"."SOURCE_VALUE"=UPPER(:B1) AND
                  "CS"."VPD_COUNTRY"="FK"."VPD_COUNTRY")
           filter(("FK"."VPD_COUNTRY"=:B1 AND "FK"."SOURCE_VALUE"=UPPER(:B2) AND "CS"."VPD_COUNTRY"="FK"."VPD_COUNTRY"))
      24 - access("FK"."ID_TARGET_CODE"="TK"."ID_TARGET_CODE")
      25 - filter("TK"."CODE_TYPE"=:SYS_B_19)
      27 - access("M"."SOURCE_VALUE"="S"."WKP_ID_CEGEDIM" :SYS_B_23 S."ADR_ID_CEGEDIM" :SYS_B_24 S."ADDRESSTYP_COD" AND
                  "M"."VPD_COUNTRY"="S"."CTL_COUNTRY")
      29 - filter(COALESCE("S"."END_VAL_DAT",TO_DATE(:SYS_B_25,:SYS_B_26))>=SYSDATE@!)
      30 - access("M"."KEY_TYPE"=:SYS_B_22 AND "M"."VPD_COUNTRY"=:SYS_B_27)Edited by: BluShadow on 20-Jun-2012 10:30
    added {noformat}{noformat} tags for readability.  Please read {message:id=9360002} and learn to do this yourself.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

    yes, all the used tables are analyzed.
    Thanks, for pointing to the metalink bug, I have also searched in metalink, but didn't find this bug.
    I have a little bit more information about the problem.
    I use the following select (now in a readable format)
    select count (1)
    from   ( (select 'different (target)' compare_type
                    ,t.id_org_addr id_org_addr -- ID_ORG_ADDR
                    ,t.vpd_country vpd_country -- CTL_COUNTRY
                    ,t.addr_type addr_type -- ADDRESSTYP_COD
              from   (select *
                      from   (select t.*
                              from      ods.ods_org_addr t
                                     left outer join
                                        m_sy_foreign_key m
                                     on m.vpd_country = t.vpd_country
                                     and m.key_type = 'ORGADDR2'
                                     and m.target_value = t.id_org_addr
                              where  coalesce (t.end_date, to_date ('99991231', 'yyyymmdd')) >= sysdate) /*SGRB*/
                      where  vpd_country = 'NL' /*EGRB*/
                                               ) t
              where  exists
                        (select null
                         from   (select *
                                 from   (select m.target_value id_org_addr
                                               ,s.wkp_id_cegedim || '-' || s.adr_id_cegedim || '-' || s.addresstyp_cod id_cegedim
                                               ,s.*
                                         from      okc_mdl_workplace_address s
                                                left outer join
                                                   m_sy_foreign_key m
                                                on m.vpd_country = s.ctl_country
                                                and m.key_type = 'ORGADDR2'
                                                and m.source_value = s.wkp_id_cegedim || '-' || s.adr_id_cegedim || '-' || s.addresstyp_cod
                                         where  coalesce (s.end_val_dat, to_date ('99991231', 'yyyymmdd')) >= sysdate) /*SGRB*/
                                 where  ctl_country = 'NL' /*EGRB*/
                                                          ) s
                         where  t.id_org_addr = s.id_org_addr)
              minus
              select 'different (target)' compare_type
                    ,s.id_org_addr id_org_addr -- ID_ORG_ADDR
                    ,s.ctl_country vpd_country -- CTL_COUNTRY
                    , (select to_number (l.target_value)
                       from   okc_code_foreign l
                       where  l.source_code_type = 'TYS'
                       and    l.target_code_type = 'ADDRLINKTYPE'
                       and    l.source_value = upper (s.addresstyp_cod)
                       and    l.vpd_country = s.ctl_country)
                        addr_type -- ADDRESSTYP_COD
              from   (select *
                      from   (select m.target_value id_org_addr
                                    ,s.wkp_id_cegedim || '-' || s.adr_id_cegedim || '-' || s.addresstyp_cod id_cegedim
                                    ,s.*
                              from      okc_mdl_workplace_address s
                                     left outer join
                                        m_sy_foreign_key m
                                     on m.vpd_country = s.ctl_country
                                     and m.key_type = 'ORGADDR2'
                                     and m.source_value = s.wkp_id_cegedim || '-' || s.adr_id_cegedim || '-' || s.addresstyp_cod
                              where  coalesce (s.end_val_dat, to_date ('99991231', 'yyyymmdd')) >= sysdate) /*SGRB*/
                      where  ctl_country = 'NL' /*EGRB*/
                                               ) s)) The select is executed in 813 msecs
    When I execute the same select using execute immediate like:
    declare
       ln_count number;
    begin
       execute immediate q'[<select statement>]' into ln_count;
    end;This takes 3:56 minutes to complete.
    When I change the second coalesce part (the one within the exists) in the flowing way:
    the part
    coalesce (s.end_val_dat, to_date ('99991231', 'yyyymmdd')) >= sysdate
    is replaced by
    s.end_val_dat >= sysdate or s.end_val_dat is nullthen the execution time is even faster (560 msecs) in both, the plain select and the select using the execute immediate.

  • Add Multiple Detail Items Using the Same Query String Parameter

    I am using InfoPath 2010 and SharePoint 2010. 
    I have 2 forms libraries - Expense and Expense Details. 
    The 2 libraries are linked via a custom site column Expense ID. 
    The Expense form contains the main header type info you would typically find on an expense report; e.g., name, purpose, department, etc. 
    The Expense Details form contains multiple detail expenses related to the main expense report such as airfare, rental car, etc. 
    I have created a page that displays an expense report with all of the related expense detail items. 
    The page contains a link to add a new expense detail and passes the Expense ID of the Expense form to the Expense Detail form. 
    This all works fine.  The problem comes in after the first expense detail form is submitted. 
    I can successfully submit the first detail item.  However, the expense detail form loses the Expense ID that was passed to it after the first expense detail form has been submitted. 
    The parameter still shows in the URL but the detail form no longer shows the value of the parameter. 
    What do I need to do in order to be able to add multiple expense detail items using the same Expense ID that was passed to the form? 
    I have tried using a Submit Behavior of Open a new form, Close the form, and Leave the form open. 
    None of these options give me what I need.  Thanks for your help.
    pam

    Laura Rogers Blog
    In case anyone stumbles upon this looking for an answer. Laura Rogers has the answer found in the comments section of her blog above.  It’s not the best but it
    does work. You have to add an extra Info Path Web Form for it to work. I know, you can roll your eyes.<o:p></o:p>
    Steps.<o:p></o:p>
    1. Add Query String<o:p></o:p>
    2. Add the extra Info Path form to the page. This form will be a hidden on the page and will receive the value from the query string.<o:p></o:p>
    3. Add your original Info Path form and have it receive a parameter from the hidden Info Path form.<o:p></o:p>
    Now, when you hit save and it opens a new form the 3 Info Path form will function properly. <o:p></o:p>

  • Is it safe to use the MBP in closed clamshell mode?

    I've connected my MBP to my LCD TV and started to use it as my desktop.
    I'm deactivating the main display of the MBP by putting it into sleep mode and moving my mouse, so it wakes the computer up and shows image only in the TV, keeping the main display turned off.
    I'm constantly monitoring the temperatures of the MBP with iStat Menus. It seems that the temperature is always the same, no matter if the main display lid is open or closed.
    So, based on these 2 articles:
    http://support.apple.com/kb/HT3131
    http://support.apple.com/kb/HT1778
    Is it really safe to use the MBP with the display lid closed?
    If I decide to run a heavy load application (like a game) and the MBP starts to get warm, would it damage the display, because it is too close to the body of the MBP?

    Yes it's perfectly safe and designed to be used that way, 90% of the time this one's used in a similar configuration. The only time the fans come on 100% is when I watch Flash-based items from YouTube or similar. I've never run it for any extended length of time with the fans at maximum I must admit but as long as the air flow is good there shouldn't be any problem.

  • Is it possible to use the af:query component with programmatic VOs?

    My understanding is that the view criteria in a normal SQL-based VO are used to add WHERE clauses to the VO.
    Since programmatic VOs do no have this capability, is there something I need to override in the view object implementation class to support the view criteria that will be established by the af:query component?
    Does someone have an example of how this might be done?
    Thanks, -Klaus

    Unfortunately no. The remote control will work, but the radio will not.
    The radio only works with the iPod video and the nano.

Maybe you are looking for