Help - Router Query

I have just set up my router and all is connecting very well, except I keep seeing this message in my router logs:
TCP Packet - Source:192.168.0.3,49678 Destination:server213-171-218-171.livedns.org.uk,80 - [BLOCK]
Can anyone help me to understand what this message actually means and more importantly, do I need to worry about it ?
Any light that can be shed is as always appreciated.

It looks like your router or a computer connected to it is requesting domain name information or contacting a DNS server for another reason; DNS servers translate numerical IP addresses into text strings, such as www.apple.com.
(26129)

Similar Messages

  • Help me query tunning

    Hi Guru's
    Can you please help me query tunning.
    Database Version : Oracle 11g - 11.2.0.3
    select  distinct  corporation_name custer_name,
            glog_util.remove_domain(SHIP_BUY.SERVPROV_GID ) SCAC,
            glog_util.remove_domain(ship_buy.shipment_gid) buy_shipment_gid,
            F_Get_SELL_ID_STRING(SHIP_BUY.SHIPMENT_GID) sell_shipment_gid,
            ship_buy.domain_name,    
            F_GET_ORDER_RELEASE_GID('B',SHIP_BUY.SHIPMENT_GID,0) ORDER_RELEASE_GID,
            f_get_refnum_string('SHIPMENT', ship_buy.shipment_gid, 'MBOL_NUMBER_CLEANSED')MBOL_NUMBER,
            F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID) POD_RECEIVED_DATE,
            f_get_exp_accrue_amt(ship_buy.shipment_gid,'SHIPMENT') Total_accrual_amount    
    from shipment ship_buy,
            invoice inv,
            invoice_shipment si,
            --voucher v,
            corporation corp
    where corp.domain_name=ship_buy.domain_name
            and corp.is_domain_master='Y'
          and 1=1
          AND ship_buy.domain_name like 'UPS/CP/DFP/%'
          and F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID)  <= to_char(to_date('31-JUL-2013', 'DD-MON-YYYY'), 'dd-mon-yyyy')
            --and V.INVOICE_GID(+) = inv.invoice_gid
            --and ship_buy.domain_name = 'UPS/CP/VZNB'
            and si.shipment_gid(+) = SHIP_BUY.SHIPMENT_GID
            AND SI.INVOICE_GID = INV.INVOICE_GID(+)
            and SHIP_BUY.INSERT_DATE > '1-JAN-2007'
            and SHIP_BUY.USER_DEFINED1_ICON_GID = 'ACCEPTED'
    UNION        
    select  distinct  corporation_name custer_name,
            glog_util.remove_domain(SHIP_BUY.SERVPROV_GID ) SCAC,
            glog_util.remove_domain(ship_buy.shipment_gid) buy_shipment_gid,
            F_GET_SELL_ID_STRING( SHIP_BUY.SHIPMENT_GID) sell_shipment_gid,
            ship_buy.domain_name,    
            F_GET_ORDER_RELEASE_GID('B',SHIP_BUY.SHIPMENT_GID,0) ORDER_RELEASE_GID,
            f_get_refnum_string('SHIPMENT', ship_buy.shipment_gid, 'MBOL_NUMBER_CLEANSED')MBOL_NUMBER,
            F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID) POD_RECEIVED_DATE,
            f_get_exp_accrue_amt(inv.invoice_gid,'INVOICE') Total_accrual_amount  
    from shipment ship_buy,
            invoice inv,
            invoice_shipment si,
          -- voucher v,
            corporation corp
    where corp.domain_name=ship_buy.domain_name
            and corp.is_domain_master='Y'
            and 1=1
            AND ship_buy.domain_name like 'UPS/CP/DFP/%'
            and F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID)  <= to_char(to_date('31-JUL-2013', 'DD-MON-YYYY'), 'dd-mon-yyyy')
          --AND INV.DOMAIN_NAME = 'UPS/CP/VZNB'
          --and V.INVOICE_GID(+) = inv.invoice_gid
            and si.shipment_gid(+) = SHIP_BUY.SHIPMENT_GID
            AND SI.INVOICE_GID = INV.INVOICE_GID(+)
            and SHIP_BUY.INSERT_DATE > '1-JAN-2007'
            and INV.USER_DEFINED1_ICON_GID = 'ACCEPTED'
    GROUP BY corporation_name,SHIP_BUY.SHIPMENT_GID,SHIP_BUY.SERVPROV_GID,ship_buy.domain_name,inv.invoice_gid
    ORDER BY CUSTER_NAME, BUY_SHIPMENT_GID;
    And I generated the execution plan :
    | Id  | Operation                          | Name                    | Rows  | Bytes | Cost (%CPU)| Time    |
    |  0 | SELECT STATEMENT                  |                        |    3 |  448 |  415  (2)| 00:00:05 |
    |  1 |  SORT UNIQUE                      |                        |    3 |  448 |  414  (87)| 00:00:05 |
    |  2 |  UNION-ALL                        |                        |      |      |            |          |
    |  3 |    NESTED LOOPS OUTER              |                        |    3 |  384 |    57  (0)| 00:00:01 |
    |*  4 |    HASH JOIN                      |                        |    3 |  294 |    54  (0)| 00:00:01 |
    |*  5 |      TABLE ACCESS BY INDEX ROWID  | SHIPMENT                |    3 |  195 |    40  (0)| 00:00:01 |
    |*  6 |      INDEX SKIP SCAN              | IND_SHIP_DOM_ICON      |    54 |      |    25  (0)| 00:00:01 |
    |*  7 |      TABLE ACCESS FULL            | CORPORATION            |    4 |  132 |    14  (0)| 00:00:01 |
    |*  8 |    INDEX RANGE SCAN              | IND_INVOICESHIP_SHP_GID |    1 |    30 |    1  (0)| 00:00:01 |
    |  9 |    HASH GROUP BY                  |                        |    1 |  192 |  356  (1)| 00:00:05 |
    |* 10 |    HASH JOIN                      |                        |    1 |  192 |  354  (1)| 00:00:05 |
    |  11 |      NESTED LOOPS                  |                        |      |      |            |          |
    |  12 |      NESTED LOOPS                |                        |    1 |  159 |  339  (0)| 00:00:05 |
    |  13 |        NESTED LOOPS                |                        |  145 | 13920 |  194  (0)| 00:00:03 |
    |  14 |        TABLE ACCESS BY INDEX ROWID| INVOICE                |  145 |  5220 |    49  (0)| 00:00:01 |
    |* 15 |          INDEX SKIP SCAN          | IDX_INV_TYP_ICON_NAM    |  145 |      |    17  (0)| 00:00:01 |
    |* 16 |        INDEX RANGE SCAN          | UK_INVOICE_SHIPMENT    |    1 |    60 |    1  (0)| 00:00:01 |
    |* 17 |        INDEX UNIQUE SCAN          | PK_SHIPMENT            |    1 |      |    1  (0)| 00:00:01 |
    |* 18 |      TABLE ACCESS BY INDEX ROWID  | SHIPMENT                |    1 |    63 |    1  (0)| 00:00:01 |
    |* 19 |      TABLE ACCESS FULL            | CORPORATION            |    4 |  132 |    14  (0)| 00:00:01 |
    Predicate Information (identified by operation id):
      4 - access("CORP"."DOMAIN_NAME"="SHIP_BUY"."DOMAIN_NAME")
      5 - filter("F_GET_POD_RECEIVED_DATE"("SHIP_BUY"."SHIPMENT_GID")<=TO_DATE(' 2013-07-31 00:00:00',
                  'syyyy-mm-dd hh24:mi:ss') AND "SHIP_BUY"."INSERT_DATE">TO_DATE(' 2007-01-01 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss'))
      6 - access("SHIP_BUY"."USER_DEFINED1_ICON_GID"='ACCEPTED' AND "SHIP_BUY"."DOMAIN_NAME" LIKE
                  'UPS/CP/DFP/%')
          filter("SHIP_BUY"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%' AND
                  "SHIP_BUY"."USER_DEFINED1_ICON_GID"='ACCEPTED')
      7 - filter("CORP"."IS_DOMAIN_MASTER"='Y' AND "CORP"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%')
      8 - access("SI"."SHIPMENT_GID"(+)="SHIP_BUY"."SHIPMENT_GID")
      10 - access("CORP"."DOMAIN_NAME"="SHIP_BUY"."DOMAIN_NAME")
      15 - access("INV"."USER_DEFINED1_ICON_GID"='ACCEPTED')
          filter("INV"."USER_DEFINED1_ICON_GID"='ACCEPTED')
      16 - access("SI"."INVOICE_GID"="INV"."INVOICE_GID")
      17 - access("SI"."SHIPMENT_GID"="SHIP_BUY"."SHIPMENT_GID")
          filter("F_GET_POD_RECEIVED_DATE"("SHIP_BUY"."SHIPMENT_GID")<=TO_DATE(' 2013-07-31 00:00:00',
                  'syyyy-mm-dd hh24:mi:ss'))
      18 - filter("SHIP_BUY"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%' AND "SHIP_BUY"."INSERT_DATE">TO_DATE('
                  2007-01-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      19 - filter("CORP"."IS_DOMAIN_MASTER"='Y' AND "CORP"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%')
    Statistics
        246247  recursive calls
              2  db block gets
        1660067  consistent gets
          13839  physical reads
              0  redo size
        592054  bytes sent via SQL*Net to client
          6024  bytes received via SQL*Net from client
            502  SQL*Net roundtrips to/from client
          15296  sorts (memory)
              0  sorts (disk)
          7513  rows processed

    Hmmm...why does this look familiar?
    F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID)  <= to_char(to_date('31-JUL-2013', 'DD-MON-YYYY'), 'dd-mon-yyyy')
    SHIP_BUY.INSERT_DATE > '1-JAN-2007'
    Like I said in your other thread about this, these two lines need to be fixed and your function needs to be fixed so the return statement doesn't do an implicit date conversion.
    Can't you see what that first line is doing?  You're taking a character string, turning it into a date, then back to a character string.
    If nothing else, these lines should be...
    F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID)  <= to_date('31-JUL-2013', 'DD-MON-YYYY')
    SHIP_BUY.INSERT_DATE > to_date('01-JAN-2007','DD-MON-YYYY')
    (assuming insert_date is a proper date format, fingers crossed)

  • Need Help to query Lync Database for User Information

    Need Help to Query the lync database to retrieve below user information.
    1. SIP Address of the registered user
            2. Phone Number configured to the particular account.
            3. IP Address
           4. Last Logged in time.
    I am trying to pull the above information from rtc database for all the registered users. Please let me know if this is possible and it would be great if you can throw some light on what tables to look for the data. Thank You.

    Hi,
    For SIP address and Phone number you can check RTC database.
    IP Address:
    You can refer to the link below to query IP address: 
    http://h30499.www3.hp.com/t5/Business-Service-Management-BAC/Monitoring-Lync-with-the-User-Registrations-Viewer-Free-NMC-tool/ba-p/5961497#.UtOU43mIrwo
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
    Last Logged in time:
    You can refer to the link below:
    http://blogs.technet.com/b/dodeitte/archive/2011/05/11/how-to-get-the-last-time-a-user-registered-with-a-front-end.aspx
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • CSCul66951 LDAP routing query fails when user name is the same (6 july 2014)

    in the case CSCul66951 LDAP routing query fails when user name is the same it is mentionned that the version 8.0.2-055 correct this bug ? How come i don't see this version on my menu Available upgrades from my IronPort C370 ?
    Is there someone on the support team that have try this LDAP query on a IronPort C370 with this version in the development lab ?
    Do i have to open a support Case to have this version of AsyncOS ?
    Best regards,
    Benoit Belair
    University of Quebec in Montreal

    Yes - CSCul66951 - this was included w/ the 8.0.1-HP1, and is rolled into 8.5.6-074 GA release.
    See release notes, resolved issues:
    http://www.cisco.com/c/dam/en/us/td/docs/security/esa/esa8-0/release_notes/ESA_8-0-1_HP1_Release_Notes.pdf
    CSCun02766 - 8.5.6-063, which was superseded by the 8.5.6-074 GA release.  
    See release notes, resolved issues:
    http://www.cisco.com/c/dam/en/us/td/docs/security/esa/esa8-5-6/ESA_8-5-6_Release_Notes.pdf

  • [Oracle 8i] Help with query performance

    The following query is running VERY slowly for me:
    SELECT     oord.part_nbr
    ,     sopn.ord_nbr
    ,     sopn.sub_ord_nbr
    ,     sopn.major_seq_nbr
    ,     sopn.wctr_id
    ,     sopn.oper_desc
    ,     SUM(pact.act_dlrs_earned+pact.act_brdn_dls_earned+pact.tool_dlrs_earned+pact.act_fix_brdn_dls_ea)
    ,     pact.activity_date
    FROM     PACT pact
    ,     SOPN sopn
    ,     OORD oord
    WHERE     pact.order_nbr          = sopn.ord_nbr          AND
         pact.maj_seq_nbr     = sopn.major_seq_nbr     AND
         sopn.sub_ord_nbr     = pact.sub_order_nbr     AND
         sopn.ord_nbr          = oord.ord_nbr          AND
         sopn.sub_ord_nbr     = oord.sub_ord_nbr     AND
              pact.activity_date     >= ?          AND
              sopn.rework_ind          = 'N'          AND
              (oord.part_nbr, sopn.major_seq_nbr, sopn.wctr_id)
              NOT IN     (
                        SELECT     rout.doc_nbr
                        ,     rout.major_seq_nbr
                        ,     rout.wctr_id
                        FROM ROUT rout
                        WHERE     (rout.begn_eff_dt    <=SYSDATE)     AND
                             (rout.end_eff_dt    >SYSDATE)     AND
                             (rout.po_rework_ind    ='N')       
    GROUP BY     oord.part_nbr
    ,          sopn.ord_nbr
    ,          sopn.sub_ord_nbr
    ,          sopn.major_seq_nbr
    ,          sopn.wctr_id
    ,          sopn.oper_desc
    ,          pact.activity_dateI sent a request off to my IT department (specifically asking for the explain plan and tkprof, as described in the [main post on this topic|http://forums.oracle.com/forums/thread.jspa?threadID=501834] ), and they replied with a screen shot of the 'explain plan' the tool they use (Toad) provides.
    !http://temp-sample.webs.com/explain_plan.jpg!
    I don't know if anyone can help me based off this, since I know it's not really what the main post says to provide, but it's all I was given.
    My IT department also made a few changes to my original query (see below) and told me it got rid of one of the full scans of the PACT table, but they aren't sure why it helped, and I have to say I'm suspect of any fixes where it's not understood why it helped.
    SELECT     oord.part_nbr
    ,     sopn.ord_nbr
    ,     sopn.sub_ord_nbr
    ,     sopn.major_seq_nbr
    ,     sopn.wctr_id
    ,     sopn.oper_desc
    ,     SUM(pact.act_dlrs_earned+pact.act_brdn_dls_earned+pact.tool_dlrs_earned+pact.act_fix_brdn_dls_ea)
    ,     pact.activity_date
    FROM     PACT pact
    ,     SOPN sopn
    ,     OORD oord
    WHERE     sopn.ord_nbr          = pact.order_nbr     AND
         sopn.major_seq_nbr     = pact.maj_seq_nbr     AND
         pact.sub_order_nbr     = sopn.sub_ord_nbr     AND
         oord.ord_nbr           = sopn.ord_nbr          AND
         oord.sub_ord_nbr     = sopn.sub_ord_nbr     AND
         (pact.activity_date >= ?)               AND
         'N'               = sopn.rework_ind     AND
         pact.order_nbr          = oord.ord_nbr          AND
         oord.sub_ord_nbr = pact.sub_order_nbr          AND
         (oord.part_nbr, pact.maj_seq_nbr, sopn.wctr_id) NOT IN
              SELECT /*+ INDEX_JOIN(ROUT) */     rout.doc_nbr
              ,                    rout.major_seq_nbr
              ,                    rout.wctr_id
              FROM     ROUT rout
              WHERE     rout.begn_eff_dt     <= SYSDATE     AND
                   rout.end_eff_dt      > SYSDATE     AND
                   'N' = rout.po_rework_ind
    GROUP BY     oord.part_nbr
    ,          sopn.ord_nbr
    ,          sopn.sub_ord_nbr
    ,          sopn.major_seq_nbr
    ,          sopn.wctr_id
    ,          sopn.oper_desc
    ,          pact.activity_dateAny help on this would be appreciated... when I run this (right now) for 2-3 months of data, it takes a minimum of 3 hours to complete, and I'll eventually need to run this for up to a year's worth of data.

    Hi,
    Well, let's see.
    You get 156 rows returned using IN and 121 rows using exists.
    You need identify the 'missing records' and conclude if that's correct or not, I'm not able to do that from remote, without knowing your data or system.
    It would be helpful if we could see cost and cardinalities, you (or your IT dept.) can get them easily be running the queries from your SQL*Plus prompt.
    Type
    SET AUTOTRACE TRACEONLYbefore running the queries.
    That gives you the explain plan and additional statistics (sorts in memory and sorts to disk).
    Since you use a group by, and you're on 8i can you also post results of these queries:
    select banner from v$version;
    select name, value, isdefault from v$parameter where name like '%area%';Finally, does below query give you a different plan?
    select oord.part_nbr
    ,      oord.ord_nbr
    ,      oord.sub_ord_nbr
    ,      pact.major_seq_nbr
    ,      sopn.wctr_id
    ,      sopn.oper_desc
    ,      sum(pact.act_dlrs_earned + pact.act_brdn_dls_earned + pact.tool_dlrs_earned + pact.act_fix_brdn_dls_ea)
    ,      pact.activity_date
    from   oord oord 
    ,      pact pact
    ,      sopn sopn
    where  oord.ord_nbr       = pact.order_nbr
    and    oord.sub_ord_nbr   = pact.sub_order_nbr
    and    oord.ord_nbr       = sopn.ord_nbr
    and    oord.sub_ord_nbr   = sopn.sub_ord_nbr
    and    sopn.major_seq_nbr = pact.maj_seq_nbr
    and    (pact.activity_date >= ?)
    and    'N' = sopn.rework_ind
    and    (oord.part_nbr, pact.maj_seq_nbr, sopn.wctr_id) not in ( select rout.doc_nbr
                                                                    ,      rout.major_seq_nbr
                                                                    ,      rout.wctr_id
                                                                    from   rout rout
                                                                    where  rout.begn_eff_dt <= sysdate
                                                                    and    rout.end_eff_dt > sysdate
                                                                    and    'N' = rout.po_rework_ind)
    group  by oord.part_nbr
    ,         oord.ord_nbr
    ,         oord.sub_ord_nbr
    ,         pact.major_seq_nbr
    ,         sopn.wctr_id
    ,         sopn.oper_desc
    ,         pact.activity_date

  • Need Help Displaying Query

    I am having problems with this, I need to re-write this into
    3 different routes the CFIF can take. Currently this works because
    the query only returns 9 records, they are being displayed as 3
    rows with 3 columns. I need to re-write and have it where if the
    record count is LT9 to only have the output be on 2 columns with 3
    rows....and if the count is LT6 then i only want 1 row with 3
    columns. I am having problems figuring out how to modify this code
    to accomplish this task. Any help would be greeeeeeeeeeeeat.
    <cfif alsobought_counter LTE 9>
    <cfif (prodCount+(detailsColCount-1)) MOD detailsColCount
    EQ 0><div class="clearfix"></cfif>
    <div class="productThumbCont">
    <cfset product_link = link("product",
    alsoBought_product_id, product_title)>
    <div class="productThumbImg">
    <a href="#product_link#" class="picksLink"
    title="#linktitle#"><img
    src="#cfimage[alsobought_counter].thumb.path#" alt="" border="0"
    tooltip="#alsoBought_product_id#" />
    <cfif len(trim(qryAlso_Bought.is_ondemand)) and
    qryrelated_products.is_ondemand EQ 1 AND qryAlso_Bought.is_disabled
    NEQ 1 AND request.allowVOD eq 1><div
    class="on-demand-call-out"
    style="cursor:pointer;margin-top:-22px;margin-top:-25/**/px;margin-left:21px;background:
    url(../skins/graphics/btns/ondemand-overlay.gif) 0 0
    no-repeat;width:79px;height:22px;filter:alpha(opacity=80);-moz-opacity:.80;opacity:.80;">< /div></cfif></a>
    </div>
    <div class="productThumbTitle">
    <a href="#product_link#" class="picksLink"
    title="#linktitle#">#product_title#<cfif
    len(trim(extendedTitle))>
    (#extendedTitle#)</cfif></a>
    <!--- <cfif len(trim(qryAlso_Bought.hotmovies_id)) AND
    qryAlso_Bought.is_disabled NEQ 1 AND request.allowVOD eq
    1><div
    style="padding-top:5px;"><img
    src="../skins/graphics/btns/ondemand.gif" alt="Available
    On-Demand"
    border="0" /></div></cfif> --->
    </div>
    </div>
    <cfif prodCount MOD detailsColCount EQ
    0></div></cfif>
    <cfset prodCount = IncrementValue(prodCount)>
    <cfset alsobought_counter =
    IncrementValue(alsobought_counter)>
    </cfif>
    </cfoutput>
    <cfif (prodCount-1) MOD detailsColCount NEQ
    0></div></cfif>
    </div>
    Text

    After you run your query, look at the record count. Run all
    the if/else logic you have to to determine the number of columns
    you want. Don't worry about the number of rows, that will take care
    of itself.
    Once you have the number of columns figured out, output your
    data as simply as possible, no style tags, no links, just data. Use
    the modulus operator to decide when to start a new row.
    Once you've accomplished that, start adding the rest of your
    stuff.

  • Looking to switch: router query.

    Hi, i'm looking to switch broadband providers but i have a query first.
    At the moment my wifi is provided by Apple Airport Express and Apple extenders and is linked to the router with ethernet cable. Does the BT router have an ethernet connection so i can still use the Apple wifi and if so will i be apple to turn off the BT wifi while i use this method.
    Solved!
    Go to Solution.

    yes the home hub has 4 ethernet connections and you can turn wireless off if you wish
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • Help on query

    Hi,
    Looking for your help,
    SELECT c.Seq,
    case
    when s2.Str_Name like 'STR'
    then s2.Str_Name
    end
    as name1,
    case
    when s2.Str_Name like 'AVE'
    then s2.Str_Name
    end
    as name2
    FROM assign a
    INNER JOIN customer c on a.seq = c.seq
    INNER JOIN address s2 on a.seq = s2.seq
    I have a table 'Address' and one field name is Str_Name
    and data in this filed can be - STR,AVE,DRI,BLV
    when i use the above query -
    getting the result with four records like one record for 'STR'(here name2 is blank) and another Record for 'AVE'
    (here name1 is blank) and two other records with name1 and name1 both are blank
    but, i need only one record as below
    seq name1 name2
    100 STR AVE
    Thanks
    Edited by: user13347538 on Jun 30, 2010 9:36 AM

    Based on test data you provided here is the SQL that will provide you the necessary output ...
    SELECT c.Seq,
    max( decode( s2.str_name, 'STR', s2.str_name, NULL ) ) as Name1,
    max( decode( s2.str_name, 'AVE', s2.str_name, NULL ) ) as Name2,
    max( decode( s2.str_name, 'BLV', s2.str_name, NULL ) ) as Name3,
    max( decode( s2.str_name, 'DRI', s2.str_name, NULL ) ) as Name4
    FROM assign a
    INNER JOIN customer c
    on a.seq = c.seq
    INNER JOIN address s2
    on a.seq = s2.seq
    GROUP BY c.seq ;
    and here is the output ...
    SEQ     NAME1     NAME2     NAME3     NAME4
    100     STR     AVE     BLV     DRI
    Tranposing rows into columns is called pivoting. Starting with 11g R2 there is a built-in function available - pivot(). Prior to that release pivoting could be achieved by using DECODE() and aggregate functions.
    Here is an useful article by Tom Kyte that explains this concept:
    http://www.oracle.com/technology/oramag/oracle/10-jul/o40asktom.html
    (refer section - Pivot Query Examples)
    Edited by: VishnuR on Jun 30, 2010 7:26 PM

  • Help with Query function on EAI Siebel Adapter

    Can anyone help?
    I have a workflow that uses the Query method on EAI Siebel Adapter to search for a Contact in Siebel. The Root component is Contact and the Child component is Address.
    When I pass in a message that contains Contact data (i.e. LastName='Jones') and Address data (City='Perth') to query on, it returns all Contacts that match the Contact data, and for each of those Contacts if the address data matches it also returns the address.
    What I want it to do is only return those Contacts that match both the Contact data 'AND' the address data, not all of the Contacts that match the contact data.
    I hope this makes sense.
    I've also tried using the searchspec function too, but this does not do what I want it to do either.
    Hope you can help.
    Thanks,
    Carl
    Can a

    Hi,
    can you create a MVG in Contact which will refer to Business Address & then try to use searchspec argument. I hope it will work for you.

  • Help in query using regular expression

    HI,
    I need a help to get the below output using regular expression query. Please help me.
    SELECT REGEXP_SUBSTR ('PWRPKG(P/W+P/L+CC)', '[^+]+', 1, lvl) val, lvl
    FROM DUAL,(SELECT LEVEL lvl FROM DUAL
    CONNECT BY LEVEL <=(SELECT MAX ( LENGTH ('PWRPKG(P/W+P/L+CC)') - LENGTH (REPLACE ('PWRPKG(P/W+P/L+CC)','+',NULL))+ 1) FROM DUAL));
    I need the output as
    correct result:
    ==============
    val lvl
    P/W 1
    P/L 2
    CC 3
    But i tried the above it is not coming the above result. Please help me where i did a mistake.
    Thanks in advance

    Frank gave you a solution in your other thread. You could simplify it if you are on 11g:
    SQL> select * from table_x
      2  /
    TXT
    TECHPKG(INTELLI CC+FRT SONAR)
    PWRPKG(P/W+P/L+CC)
    select  txt,
            regexp_substr(
                          txt,
                          '(.*\()*([^+)]+)',
                          1,
                          column_value,
                          null,
                          2
                         ) element,
            column_value element_number
      from  table_x,
            table(
                  cast(
                       multiset(
                                select  level
                                  from  dual
                                  connect by level <= regexp_count(txt,'\+') + 1
                       as sys.OdciNumberList
      order by rowid,
               column_value
    TXT                                      ELEMENT    ELEMENT_NUMBER
    TECHPKG(INTELLI CC+FRT SONAR)            INTELLI CC              1
    TECHPKG(INTELLI CC+FRT SONAR)            FRT SONAR               2
    PWRPKG(P/W+P/L+CC)                       P/W                     1
    PWRPKG(P/W+P/L+CC)                       P/L                     2
    PWRPKG(P/W+P/L+CC)                       CC                      3
    SQL>  SY.

  • Help with query to return results from group within table?

    Hi
    Im a total noob, so please be gentle....!
    I am looking at a table that has a WORD column and a WORD_TYPE_ID column.
    Words can have the same type_id.
    What I am trying to do is write a query that will return the longest word for each word_type_id.
    I have been trying for hours to get this and all I seem to get is either error messages or I return the longest word in the whole WORD column.
    The furthest I can get before things break down is.....
    select word
    from table
    where
    length(word) =
    select
    max(length(word))
    from table
    Any help on this or if I could be pointed in the right direction it would be greatly appreciated.
    Thanks

    Hi,
    Welcome to the forum!
    Here's one way:
    SELECT    word_type_id
    ,       MIN (word) KEEP (DENSE_RANK LAST ORDDER BY LENGTH (word))     AS longest_word
    FROM       table_x
    GROUP BY  word_type_id;If there happens to be a tie within some word_type_id (that is, 2 or more words have exactly the same length, which is the longest in that group) the expression above will return the first one, in alphabetic order. (That's what MIN means here.)
    Edited by: Frank Kulash on Aug 11, 2009 1:56 PM
    You almost had it.
    As you noticed, you were getting the longest row in the whole table. That's because your sub-query was looking at the whole table.
    If you correlate the sub-query to the row in the main table, as shown below, you can get the longest word in each group:
    select  word
    from     table     m                              -- m for main
    where      length (word) = (
                                select  max (length(word))
                   from     table
                   where     word_type_id  = m.word_type_id     -- New
                   );

  • Help with query to return last possible value

    Can someone please help me create a query for the situation below?
    Table: TABLEA
    Columns:
    FACID VARCHAR2(10),
    DEPTID VARCHAR2(10),
    CHARGENUMBER NUMBER(10)
    I have the following data:
    A, B, 1
    A, B, 2
    C, D, 3
    C, D, 4
    Would like to return the following:
    A, B, 2
    C, D, 4
    In other words, I would like to return the last possible CHARGENUMBER for FACID and DEPTID.
    The table does not have any indexes and it gets loaded from a spreadsheet in that order.
    Thanks so much!

    amazongirl wrote:
    Can someone please help me create a query for the situation below?
    Table: TABLEA
    Columns:
    FACID VARCHAR2(10),
    DEPTID VARCHAR2(10),
    CHARGENUMBER NUMBER(10)
    I have the following data:
    A, B, 1
    A, B, 2
    C, D, 3
    C, D, 4
    Would like to return the following:
    A, B, 2
    C, D, 4
    In other words, I would like to return the last possible CHARGENUMBER for FACID and DEPTID.
    The table does not have any indexes and it gets loaded from a spreadsheet in that order.
    Thanks so much!Hi girl from amazon,
    I hope you give me a note because I answered for a lot of questions and nobody aprecieted that. If you don't me a little point I wil leave this forum because isn't so funny to work for nothing.
    You are my last chance to stay here!
    FACID      DEPTID     CHARGENUMBER
    A          B                     1
    A          B                     2
    C          D                     3
    C          D                     4
    HR: XE > select x.FACID, x.DEPTID , x.CHARGENUMBER from tableA x,
      2   (select DEPTID, FACID, max(CHARGENUMBER) max_val from tableA
      3    group by  DEPTID, FACID ) y
      4    WHERE x.DEPTID = y.DEPTID and
      5          x.FACID  = y.FACID and
      6          x.CHARGENUMBER =max_val;
    FACID      DEPTID     CHARGENUMBER
    A          B                     2
    C          D                     4Regards,
    Ion

  • Help with query output

    Hello, I have the following query that I'm running in Oracle SQL Developer 1.2.1
    WITH group_by_4_column_results AS
    (SELECT m_atschunk.employee AS employee,
    SUM(CASE
    WHEN
    M_ATSCHUNK.rolloffDaysCount = '108545043' AND m_atschunk.infractiondate BETWEEN SYSDATE - 365 AND SYSDATE THEN 1 ELSE 0 END) as rolloffs,
    M_ATSCHUNK.INFRACTIONDATE + 365 as infractionDate
    FROM M_ATSCHUNK
    group by employee, infractionDate, rolloffDaysCount
    SELECT g4.*,
    SUM (rolloffs) OVER (PARTITION BY employee) AS total_rolloffs
    FROM group_by_4_column_results g4
    It will output the key elements of what I need. But where it sums up the 'total_rolloffs', I need to add that number back into the infractiondate column. Any help would be greatly appreciated.
    CREATE TABLE M_ATSCHUNK
    (EMPLOYEE varchar(50),
    ROLLOFFDAYSCOUNT varchar(3),
    INFRACTIONDATE date)
    INSERT INTO M_ATSCHUNK (EMPLOYEE, ROLLINGOFFDAYSCOUNT, INFRACTIONDATE)
    VALUES ('PHIL','YES', (to_date('2010/01/01 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('PHIL','YES', (to_date('2010/01/02 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('PHIL','YES', (to_date('2010/01/03 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('PHIL','YES', (to_date('2010/01/04 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('PHIL','YES', (to_date('2010/01/05 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('PHIL','NO', (to_date('2010/02/01 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('PHIL','NO', (to_date('2010/03/01 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('NIKI','YES', (to_date('2010/01/01 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('NIKI','YES', (to_date('2010/01/01 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('NIKI','YES', (to_date('2010/01/01 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('NIKI','NO', (to_date('2010/01/01 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('NIKI','NO', (to_date('2010/01/01 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('NIKI','NO', (to_date('2010/01/01 08:00:00', 'yyyy/mm/dd hh24:mi:ss'))),
    VALUES ('NIKI','NO', (to_date('2010/01/01 08:00:00', 'yyyy/mm/dd hh24:mi:ss')))

    Phil3061 wrote:
    I need to add that number back into the infractiondate column.Well, in general you need to use UPDATE or better MERGE. Howebver, your data sample does not show any rollofs:
    SQL> SELECT * FROM M_ATSCHUNK;
    EMPLOYEE                                           ROL INFRACTIO
    PHIL                                               YES 01-JAN-10
    PHIL                                               YES 02-JAN-10
    PHIL                                               YES 03-JAN-10
    PHIL                                               YES 04-JAN-10
    PHIL                                               YES 05-JAN-10
    PHIL                                               NO  01-FEB-10
    PHIL                                               NO  01-MAR-10
    NIKI                                               YES 01-JAN-10
    NIKI                                               YES 01-JAN-10
    NIKI                                               YES 01-JAN-10
    NIKI                                               NO  01-JAN-10
    EMPLOYEE                                           ROL INFRACTIO
    NIKI                                               NO  01-JAN-10
    NIKI                                               NO  01-JAN-10
    NIKI                                               NO  01-JAN-10
    14 rows selected.
    SQL> WITH group_by_4_column_results AS
      2  (SELECT m_atschunk.employee AS employee,
      3  SUM(CASE
      4  WHEN
      5  M_ATSCHUNK.rolloffDaysCount = '108545043' AND m_atschunk.infractiondate BETWEEN SYSDATE - 365 AND SYSDATE THEN 1 ELSE 0 END) as
    rolloffs,
      6  M_ATSCHUNK.INFRACTIONDATE + 365 as infractionDate
      7  FROM M_ATSCHUNK
      8  group by employee, infractionDate, rolloffDaysCount
      9  )
    10  SELECT g4.*,
    11  SUM (rolloffs) OVER (PARTITION BY employee) AS total_rolloffs
    12  FROM group_by_4_column_results g4
    13  /
    EMPLOYEE                                             ROLLOFFS INFRACTIO TOTAL_ROLLOFFS
    NIKI                                                        0 01-JAN-11              0
    NIKI                                                        0 01-JAN-11              0
    PHIL                                                        0 01-JAN-11              0
    PHIL                                                        0 02-JAN-11              0
    PHIL                                                        0 03-JAN-11              0
    PHIL                                                        0 04-JAN-11              0
    PHIL                                                        0 05-JAN-11              0
    PHIL                                                        0 01-FEB-11              0
    PHIL                                                        0 01-MAR-11              0
    9 rows selected.
    SQL> So adjust data sample and based on it tell us what are the expected results.
    SY.

  • Help optimizing query with function

    Hello experts,
    I need your help optmizing this query which has a condition that matches on results of non-deterministic function. The non-deterministic functino is fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY. Values that it returns depends on contents of a table, so I can't really create a function index.
    Any input will be appreciated. Thanks in advance!
    Sorry I couln't format the query plan properly. Can somebody advise how? Thanks again!
    Giovanni
    explain plan for
    WITH tg AS
    (SELECT taxgroup_code FROM taxgroup
    WHERE taxgroup_code = 'TAXGROUP2' --?
    AND taxgroup_delete_ind = 'N' AND taxgroup_active_ind = 'A'),
    le_hb AS
    (SELECT tgi.taxgroup_code, tgi.legalentity_id, tgi.hyperionbase_id, ou.orgunit_code, ou.hyperionbase_code
    FROM tg, taxgroupitem tgi, orgunit_vw ou
    WHERE tg.taxgroup_code = tgi.taxgroup_code
    AND tgi.legalentity_id = ou.legalentity_id AND tgi.hyperionbase_id = ou.hyperionbase_id
    UNION
    SELECT tgi.taxgroup_code, tgi.legalentity_id, ou.hyperionbase_id, ou.orgunit_code, ou.hyperionbase_code
    FROM tg, taxgroupitem tgi, orgunit_vw ou
    WHERE tg.taxgroup_code = tgi.taxgroup_code
    AND tgi.legalentity_id = ou.legalentity_id AND tgi.hyperionbase_id IS NULL),
    au AS
    (SELECT appusage_code FROM appusage WHERE appusage_code = 'CONSOLIDATION'),
    prs AS
    (SELECT prs_key,
    (CASE WHEN instr(prs_key, ':') = 0 THEN prs_key
    ELSE SUBSTR(prs_key, 1, (instr(prs_key, ':')-1) ) END) first_val
    FROM
    (SELECT fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(164415 --?
    ) prs_key
    FROM dual
    grs AS
    (SELECT prs.*, fd.fielddata_group_sequence fd_grpseq
    FROM prs, fielddata fd, le_hb
    WHERE prs.first_val = fd.fielddata_value
    AND le_hb.legalentity_id = fd.legalentity_id
    AND le_hb.hyperionbase_id = fd.hyperionbase_id),
    fdk AS
    (SELECT
    cd.celldef_id, fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_group_sequence) fd_key,
    fd.fielddata_value fd_val, fd.fielddata_group_sequence fd_grpseq,
    ROW_NUMBER() OVER (PARTITION BY cd.celldef_id, fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_group_sequence)
    ORDER BY fd.fielddata_group_sequence) rn,
    grs.prs_key
    FROM le_hb, grs, fielddata fd, tablecell tc, celldef cd, tabledef td, appusage au
    WHERE le_hb.legalentity_id = fd.legalentity_id AND le_hb.hyperionbase_id = fd.hyperionbase_id
    AND fd.fielddata_id = tc.fielddata_id AND tc.celldef_id = cd.celldef_id
    AND cd.tabledef_id = td.tabledef_id
    AND grs.fd_grpseq = fd.fielddata_parent_row_sequence
    and grs.prs_key = fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_parent_row_sequence)
    AND cd.celldef_key_ind = 'Y'
    AND fd.fielddata_delete_ind = 'N'
    AND td.tabledef_id = 2265
    fda AS
    (SELECT
    cd.celldef_id, fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_group_sequence) fd_key,
    TO_CHAR(TO_NUMBER(SUM(fd.fielddata_value))) fd_val,
    MIN(fd.fielddata_group_sequence) fd_grpseq,
    grs.prs_key
    FROM le_hb, grs, fielddata fd, tablecell tc, celldef cd, tabledef td
    WHERE le_hb.legalentity_id = fd.legalentity_id AND le_hb.hyperionbase_id = fd.hyperionbase_id
    AND fd.fielddata_id = tc.fielddata_id AND tc.celldef_id = cd.celldef_id
    AND cd.tabledef_id = td.tabledef_id
    AND grs.fd_grpseq = fd.fielddata_parent_row_sequence
    and grs.prs_key = fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_parent_row_sequence)
    AND cd.celldef_adjustable_ind = 'Y'
    AND fd.fielddata_delete_ind = 'N'
    AND td.tabledef_id = 2265
    GROUP BY cd.celldef_id, fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_group_sequence),
    grs.prs_key
    SELECT NULL LEGALENTITY_ID, NULL hyperionbase_id, fdk.celldef_id, TO_CHAR(NULL) role_code, NULL userinfo_id, cd.celldef_adjustable_ind,
    'N' celldef_editable_ind, cd.celldef_filter_code, cd.celldef_validate_rule, cd.celldef_list_code,
    cd.celldef_longstring_ind, aua.appusageaccess_visible_ind celldef_viewable_ind,
    cd.celldef_column_sequence, cd.celldef_column_label,
    cd.celldef_column_sort_order, NULL tablecell_id, fdk.fd_grpseq tablecell_row_sequence, NULL tablecell_row_label,
    'N' tablecell_delete_ind, NULL tablecell_create_by, TO_DATE(NULL) tablecell_create_dt, TO_CHAR(NULL) tablecell_update_by,
    TO_DATE(NULL) tablecell_update_dt, NULL fielddata_id, TO_CHAR(NULL) datatype_code, NULL fielddata_adjref_id,
    fdk.fd_grpseq fielddata_group_sequence, NULL fielddata_parent_row_sequence, NULL lookup_id,
    fdk.fd_val fielddata_value, 'N' fielddata_delete_ind, TO_CHAR(NULL) fielddata_create_by,
    TO_DATE(NULL) fielddata_create_dt, TO_CHAR(NULL) fielddata_update_by, TO_DATE(NULL) fielddata_update_dt,
    fdk.fd_key
    FROM fdk, celldef cd, appusageaccess aua, au
    WHERE fdk.celldef_id = cd.celldef_id
    AND cd.celldef_id = aua.celldef_id
    AND aua.appusage_code = au.appusage_code
    AND fdk.rn = 1
    UNION ALL
    SELECT NULL LEGALENTITY_ID, NULL hyperionbase_id, fda.celldef_id, TO_CHAR(NULL) role_code, NULL userinfo_id, cd.celldef_adjustable_ind,
    'N' celldef_editable_ind, cd.celldef_filter_code, cd.celldef_validate_rule, cd.celldef_list_code,
    cd.celldef_longstring_ind, aua.appusageaccess_visible_ind celldef_viewable_ind,
    cd.celldef_column_sequence, cd.celldef_column_label,
    cd.celldef_column_sort_order, NULL tablecell_id, fda.fd_grpseq tablecell_row_sequence, NULL tablecell_row_label,
    'N' tablecell_delete_ind, NULL tablecell_create_by, TO_DATE(NULL) tablecell_create_dt, TO_CHAR(NULL) tablecell_update_by,
    TO_DATE(NULL) tablecell_update_dt, NULL fielddata_id, TO_CHAR(NULL) datatype_code, NULL fielddata_adjref_id,
    fda.fd_grpseq fielddata_group_sequence, NULL fielddata_parent_row_sequence, NULL lookup_id,
    fda.fd_val fielddata_value, 'N' fielddata_delete_ind, TO_CHAR(NULL) fielddata_create_by,
    TO_DATE(NULL) fielddata_create_dt, TO_CHAR(NULL) fielddata_update_by, TO_DATE(NULL) fielddata_update_dt,
    fda.fd_key
    FROM fda, celldef cd, appusageaccess aua, au
    WHERE fda.celldef_id = cd.celldef_id
    AND cd.celldef_id = aua.celldef_id
    AND aua.appusage_code = au.appusage_code
    ORDER BY fielddata_group_sequence, celldef_column_sequence
    Query Plan:
    Plan hash value: 522363234
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 2 | 6227 | 249 (2)| 00:00:03 |
    | 1 | TEMP TABLE TRANSFORMATION | | | | | |
    | 2 | LOAD AS SELECT | | | | | |
    |* 3 | TABLE ACCESS BY INDEX ROWID | TAXGROUP | 1 | 14 | 1 (0)| 00:00:01 |
    |* 4 | INDEX UNIQUE SCAN | PK_TAXGROUP | 1 | | 0 (0)| 00:00:01 |
    | 5 | LOAD AS SELECT | | | | | |
    | 6 | SORT UNIQUE | | 4 | 224 | 12 (59)| 00:00:01 |
    | 7 | UNION-ALL | | | | | |
    | 8 | TABLE ACCESS BY INDEX ROWID | ORGUNIT | 1 | 29 | 2 (0)| 00:00:01 |
    | 9 | NESTED LOOPS | | 1 | 56 | 5 (0)| 00:00:01 |
    | 10 | NESTED LOOPS | | 1 | 27 | 3 (0)| 00:00:01 |
    | 11 | VIEW | | 1 | 10 | 2 (0)| 00:00:01 |
    | 12 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B51_2EBE182 | 1 | 10 | 2 (0)| 00:00:01 |
    |* 13 | TABLE ACCESS BY INDEX ROWID | TAXGROUPITEM | 1 | 17 | 1 (0)| 00:00:01 |
    |* 14 | INDEX RANGE SCAN | XF1_TAXGROUPITEM_TAXGROUP | 1 | | 0 (0)| 00:00:01 |
    |* 15 | INDEX RANGE SCAN | XF1_ORGUNIT_ID | 1 | | 1 (0)| 00:00:01 |
    | 16 | TABLE ACCESS BY INDEX ROWID | ORGUNIT | 3 | 87 | 2 (0)| 00:00:01 |
    | 17 | NESTED LOOPS | | 3 | 168 | 5 (0)| 00:00:01 |
    | 18 | NESTED LOOPS | | 1 | 27 | 3 (0)| 00:00:01 |
    | 19 | VIEW | | 1 | 10 | 2 (0)| 00:00:01 |
    | 20 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B51_2EBE182 | 1 | 10 | 2 (0)| 00:00:01 |
    |* 21 | TABLE ACCESS BY INDEX ROWID | TAXGROUPITEM | 1 | 17 | 1 (0)| 00:00:01 |
    |* 22 | INDEX RANGE SCAN | XF1_TAXGROUPITEM_TAXGROUP | 1 | | 0 (0)| 00:00:01 |
    |* 23 | INDEX RANGE SCAN | XF1_ORGUNIT_ID | 3 | | 1 (0)| 00:00:01 |
    | 24 | LOAD AS SELECT | | | | | |
    |* 25 | INDEX UNIQUE SCAN | PK_APPUSAGE | 1 | 10 | 0 (0)| 00:00:01 |
    | 26 | LOAD AS SELECT | | | | | |
    |* 27 | TABLE ACCESS BY INDEX ROWID | FIELDDATA | 7 | 147 | 28 (0)| 00:00:01 |
    | 28 | NESTED LOOPS | | 27 | 1269 | 117 (1)| 00:00:02 |
    | 29 | NESTED LOOPS | | 4 | 104 | 4 (0)| 00:00:01 |
    | 30 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
    | 31 | VIEW | | 4 | 104 | 2 (0)| 00:00:01 |
    | 32 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B52_2EBE182 | 4 | 388 | 2 (0)| 00:00:01 |
    |* 33 | INDEX RANGE SCAN | XF11_DATA_LE_HB | 117 | | 12 (0)| 00:00:01 |
    | 34 | SORT ORDER BY | | 2 | 6227 | 248 (51)| 00:00:03 |
    | 35 | UNION-ALL | | | | | |
    | 36 | NESTED LOOPS | | 1 | 4110 | 125 (2)| 00:00:02 |
    | 37 | MERGE JOIN CARTESIAN | | 1 | 4093 | 124 (2)| 00:00:02 |
    | 38 | NESTED LOOPS | | 1 | 4076 | 122 (2)| 00:00:02 |
    |* 39 | VIEW | | 1 | 4043 | 121 (2)| 00:00:02 |
    |* 40 | WINDOW SORT PUSHED RANK | | 1 | 2099 | 121 (2)| 00:00:02 |
    | 41 | MERGE JOIN CARTESIAN | | 1 | 2099 | 120 (1)| 00:00:02 |
    | 42 | NESTED LOOPS | | 1 | 2099 | 119 (1)| 00:00:02 |
    | 43 | NESTED LOOPS | | 1 | 2088 | 118 (1)| 00:00:02 |
    |* 44 | HASH JOIN | | 1 | 2077 | 117 (1)| 00:00:02 |
    |* 45 | TABLE ACCESS BY INDEX ROWID| FIELDDATA | 117 | 3744 | 28 (0)| 00:00:01 |
    | 46 | NESTED LOOPS | | 466 | 28892 | 114 (0)| 00:00:02 |
    | 47 | NESTED LOOPS | | 4 | 120 | 2 (0)| 00:00:01 |
    |* 48 | INDEX UNIQUE SCAN | PK_TABLEDEF | 1 | 4 | 0 (0)| 00:00:01 |
    | 49 | VIEW | | 4 | 104 | 2 (0)| 00:00:01 |
    | 50 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B52_2EBE182 | 4 | 388 | 2 (0)| 00:00:01 |
    |* 51 | INDEX RANGE SCAN | XF11_DATA_LE_HB | 117 | | 12 (0)| 00:00:01 |
    | 52 | VIEW | | 27 | 54405 | 2 (0)| 00:00:01 |
    | 53 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B54_2EBE182 | 27 | 1269 | 2 (0)| 00:00:01 |
    | 54 | TABLE ACCESS BY INDEX ROWID | TABLECELL | 1 | 11 | 1 (0)| 00:00:01 |
    |* 55 | INDEX UNIQUE SCAN | XF1_TBLCEL_DATA | 1 | | 0 (0)| 00:00:01 |
    |* 56 | TABLE ACCESS BY INDEX ROWID | CELLDEF | 1 | 11 | 1 (0)| 00:00:01 |
    |* 57 | INDEX UNIQUE SCAN | PK_CELLDEF | 1 | | 0 (0)| 00:00:01 |
    | 58 | BUFFER SORT | | 5 | | 120 (2)| 00:00:02 |
    | 59 | INDEX FULL SCAN | PK_APPUSAGE | 5 | | 1 (0)| 00:00:01 |
    | 60 | TABLE ACCESS BY INDEX ROWID | CELLDEF | 1 | 33 | 1 (0)| 00:00:01 |
    |* 61 | INDEX UNIQUE SCAN | PK_CELLDEF | 1 | | 0 (0)| 00:00:01 |
    | 62 | BUFFER SORT | | 1 | 17 | 123 (2)| 00:00:02 |
    | 63 | VIEW | | 1 | 17 | 2 (0)| 00:00:01 |
    | 64 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B53_2EBE182 | 1 | 10 | 2 (0)| 00:00:01 |
    | 65 | TABLE ACCESS BY INDEX ROWID | APPUSAGEACCESS | 1 | 17 | 1 (0)| 00:00:01 |
    |* 66 | INDEX UNIQUE SCAN | AK_APPUSAGEACCESS | 1 | | 0 (0)| 00:00:01 |
    | 67 | NESTED LOOPS | | 1 | 2117 | 124 (2)| 00:00:02 |
    | 68 | MERGE JOIN CARTESIAN | | 1 | 2100 | 123 (2)| 00:00:02 |
    | 69 | NESTED LOOPS | | 1 | 2083 | 121 (2)| 00:00:02 |
    | 70 | VIEW | | 1 | 2050 | 120 (2)| 00:00:02 |
    | 71 | HASH GROUP BY | | 1 | 2091 | 120 (2)| 00:00:02 |
    | 72 | NESTED LOOPS | | 1 | 2091 | 119 (1)| 00:00:02 |
    | 73 | NESTED LOOPS | | 1 | 2080 | 118 (1)| 00:00:02 |
    |* 74 | HASH JOIN | | 1 | 2069 | 117 (1)| 00:00:02 |
    |* 75 | TABLE ACCESS BY INDEX ROWID | FIELDDATA | 117 | 3744 | 28 (0)| 00:00:01 |
    | 76 | NESTED LOOPS | | 466 | 28892 | 114 (0)| 00:00:02 |
    | 77 | NESTED LOOPS | | 4 | 120 | 2 (0)| 00:00:01 |
    |* 78 | INDEX UNIQUE SCAN | PK_TABLEDEF | 1 | 4 | 0 (0)| 00:00:01 |
    | 79 | VIEW | | 4 | 104 | 2 (0)| 00:00:01 |
    | 80 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B52_2EBE182 | 4 | 388 | 2 (0)| 00:00:01 |
    |* 81 | INDEX RANGE SCAN | XF11_DATA_LE_HB | 117 | | 12 (0)| 00:00:01 |
    | 82 | VIEW | | 27 | 54189 | 2 (0)| 00:00:01 |
    | 83 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B54_2EBE182 | 27 | 1269 | 2 (0)| 00:00:01 |
    | 84 | TABLE ACCESS BY INDEX ROWID | TABLECELL | 1 | 11 | 1 (0)| 00:00:01 |
    |* 85 | INDEX UNIQUE SCAN | XF1_TBLCEL_DATA | 1 | | 0 (0)| 00:00:01 |
    |* 86 | TABLE ACCESS BY INDEX ROWID | CELLDEF | 1 | 11 | 1 (0)| 00:00:01 |
    |* 87 | INDEX UNIQUE SCAN | PK_CELLDEF | 1 | | 0 (0)| 00:00:01 |
    | 88 | TABLE ACCESS BY INDEX ROWID | CELLDEF | 1 | 33 | 1 (0)| 00:00:01 |
    |* 89 | INDEX UNIQUE SCAN | PK_CELLDEF | 1 | | 0 (0)| 00:00:01 |
    | 90 | BUFFER SORT | | 1 | 17 | 122 (2)| 00:00:02 |
    | 91 | VIEW | | 1 | 17 | 2 (0)| 00:00:01 |
    | 92 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B53_2EBE182 | 1 | 10 | 2 (0)| 00:00:01 |
    | 93 | TABLE ACCESS BY INDEX ROWID | APPUSAGEACCESS | 1 | 17 | 1 (0)| 00:00:01 |
    |* 94 | INDEX UNIQUE SCAN | AK_APPUSAGEACCESS | 1 | | 0 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    3 - filter("TAXGROUP_DELETE_IND"='N' AND "TAXGROUP_ACTIVE_IND"='A')
    4 - access("TAXGROUP_CODE"='TAXGROUP2')
    13 - filter("TGI"."HYPERIONBASE_ID" IS NOT NULL)
    14 - access("TG"."TAXGROUP_CODE"="TGI"."TAXGROUP_CODE")
    15 - access("TGI"."LEGALENTITY_ID"="OU"."ORGUNIT_ID" AND "TGI"."HYPERIONBASE_ID"="OU"."HYPERIONBASE_ID")
    21 - filter("TGI"."HYPERIONBASE_ID" IS NULL)
    22 - access("TG"."TAXGROUP_CODE"="TGI"."TAXGROUP_CODE")
    23 - access("TGI"."LEGALENTITY_ID"="OU"."ORGUNIT_ID")
    25 - access("APPUSAGE_CODE"='CONSOLIDATION')
    27 - filter("FD"."FIELDDATA_VALUE"=CASE INSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415),':') WHEN 0
    THEN "FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415) ELSE
    SUBSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415),1,INSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(16441
    5),':')-1) END )
    33 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
    "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
    39 - filter("FDK"."RN"=1)
    40 - filter(ROW_NUMBER() OVER ( PARTITION BY "CD"."CELLDEF_ID","FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"
    ."FIELDDATA_GROUP_SEQUENCE") ORDER BY "FD"."FIELDDATA_GROUP_SEQUENCE")<=1)
    44 - access("GRS"."FD_GRPSEQ"="FD"."FIELDDATA_PARENT_ROW_SEQUENCE" AND
    "GRS"."PRS_KEY"="FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"."FIELDDATA_PARENT_ROW_SEQUENCE"))
    45 - filter("FD"."FIELDDATA_DELETE_IND"='N')
    48 - access("TD"."TABLEDEF_ID"=2265)
    51 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
    "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
    55 - access("FD"."FIELDDATA_ID"="TC"."FIELDDATA_ID")
    56 - filter("CD"."TABLEDEF_ID"=2265 AND "CD"."CELLDEF_KEY_IND"='Y')
    57 - access("TC"."CELLDEF_ID"="CD"."CELLDEF_ID")
    61 - access("FDK"."CELLDEF_ID"="CD"."CELLDEF_ID")
    66 - access("AUA"."APPUSAGE_CODE"="AU"."APPUSAGE_CODE" AND "CD"."CELLDEF_ID"="AUA"."CELLDEF_ID")
    74 - access("GRS"."FD_GRPSEQ"="FD"."FIELDDATA_PARENT_ROW_SEQUENCE" AND
    "GRS"."PRS_KEY"="FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"."FIELDDATA_PARENT_ROW_SEQUENCE"))
    75 - filter("FD"."FIELDDATA_DELETE_IND"='N')
    78 - access("TD"."TABLEDEF_ID"=2265)
    81 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
    "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
    85 - access("FD"."FIELDDATA_ID"="TC"."FIELDDATA_ID")
    86 - filter("CD"."TABLEDEF_ID"=2265 AND "CD"."CELLDEF_ADJUSTABLE_IND"='Y')
    87 - access("TC"."CELLDEF_ID"="CD"."CELLDEF_ID")
    89 - access("FDA"."CELLDEF_ID"="CD"."CELLDEF_ID")
    94 - access("AUA"."APPUSAGE_CODE"="AU"."APPUSAGE_CODE" AND "CD"."CELLDEF_ID"="AUA"."CELLDEF_ID")

    Thanks cd.
    Here's the query plan:
    Query Plan:
    Plan hash value: 522363234
    | Id  | Operation                               | Name                       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                        |                            |     2 |  6227 |   249   (2)| 00:00:03 |
    |   1 |  TEMP TABLE TRANSFORMATION              |                            |       |       |            |          |
    |   2 |   LOAD AS SELECT                        |                            |       |       |            |          |
    |*  3 |    TABLE ACCESS BY INDEX ROWID          | TAXGROUP                   |     1 |    14 |     1   (0)| 00:00:01 |
    |*  4 |     INDEX UNIQUE SCAN                   | PK_TAXGROUP                |     1 |       |     0   (0)| 00:00:01 |
    |   5 |   LOAD AS SELECT                        |                            |       |       |            |          |
    |   6 |    SORT UNIQUE                          |                            |     4 |   224 |    12  (59)| 00:00:01 |
    |   7 |     UNION-ALL                           |                            |       |       |            |          |
    |   8 |      TABLE ACCESS BY INDEX ROWID        | ORGUNIT                    |     1 |    29 |     2   (0)| 00:00:01 |
    |   9 |       NESTED LOOPS                      |                            |     1 |    56 |     5   (0)| 00:00:01 |
    |  10 |        NESTED LOOPS                     |                            |     1 |    27 |     3   (0)| 00:00:01 |
    |  11 |         VIEW                            |                            |     1 |    10 |     2   (0)| 00:00:01 |
    |  12 |          TABLE ACCESS FULL              | SYS_TEMP_0FD9D9B51_2EBE182 |     1 |    10 |     2   (0)| 00:00:01 |
    |* 13 |         TABLE ACCESS BY INDEX ROWID     | TAXGROUPITEM               |     1 |    17 |     1   (0)| 00:00:01 |
    |* 14 |          INDEX RANGE SCAN               | XF1_TAXGROUPITEM_TAXGROUP  |     1 |       |     0   (0)| 00:00:01 |
    |* 15 |        INDEX RANGE SCAN                 | XF1_ORGUNIT_ID             |     1 |       |     1   (0)| 00:00:01 |
    |  16 |      TABLE ACCESS BY INDEX ROWID        | ORGUNIT                    |     3 |    87 |     2   (0)| 00:00:01 |
    |  17 |       NESTED LOOPS                      |                            |     3 |   168 |     5   (0)| 00:00:01 |
    |  18 |        NESTED LOOPS                     |                            |     1 |    27 |     3   (0)| 00:00:01 |
    |  19 |         VIEW                            |                            |     1 |    10 |     2   (0)| 00:00:01 |
    |  20 |          TABLE ACCESS FULL              | SYS_TEMP_0FD9D9B51_2EBE182 |     1 |    10 |     2   (0)| 00:00:01 |
    |* 21 |         TABLE ACCESS BY INDEX ROWID     | TAXGROUPITEM               |     1 |    17 |     1   (0)| 00:00:01 |
    |* 22 |          INDEX RANGE SCAN               | XF1_TAXGROUPITEM_TAXGROUP  |     1 |       |     0   (0)| 00:00:01 |
    |* 23 |        INDEX RANGE SCAN                 | XF1_ORGUNIT_ID             |     3 |       |     1   (0)| 00:00:01 |
    |  24 |   LOAD AS SELECT                        |                            |       |       |            |          |
    |* 25 |    INDEX UNIQUE SCAN                    | PK_APPUSAGE                |     1 |    10 |     0   (0)| 00:00:01 |
    |  26 |   LOAD AS SELECT                        |                            |       |       |            |          |
    |* 27 |    TABLE ACCESS BY INDEX ROWID          | FIELDDATA                  |     7 |   147 |    28   (0)| 00:00:01 |
    |  28 |     NESTED LOOPS                        |                            |    27 |  1269 |   117   (1)| 00:00:02 |
    |  29 |      NESTED LOOPS                       |                            |     4 |   104 |     4   (0)| 00:00:01 |
    |  30 |       FAST DUAL                         |                            |     1 |       |     2   (0)| 00:00:01 |
    |  31 |       VIEW                              |                            |     4 |   104 |     2   (0)| 00:00:01 |
    |  32 |        TABLE ACCESS FULL                | SYS_TEMP_0FD9D9B52_2EBE182 |     4 |   388 |     2   (0)| 00:00:01 |
    |* 33 |      INDEX RANGE SCAN                   | XF11_DATA_LE_HB            |   117 |       |    12   (0)| 00:00:01 |
    |  34 |   SORT ORDER BY                         |                            |     2 |  6227 |   248  (51)| 00:00:03 |
    |  35 |    UNION-ALL                            |                            |       |       |            |          |
    |  36 |     NESTED LOOPS                        |                            |     1 |  4110 |   125   (2)| 00:00:02 |
    |  37 |      MERGE JOIN CARTESIAN               |                            |     1 |  4093 |   124   (2)| 00:00:02 |
    |  38 |       NESTED LOOPS                      |                            |     1 |  4076 |   122   (2)| 00:00:02 |
    |* 39 |        VIEW                             |                            |     1 |  4043 |   121   (2)| 00:00:02 |
    |* 40 |         WINDOW SORT PUSHED RANK         |                            |     1 |  2099 |   121   (2)| 00:00:02 |
    |  41 |          MERGE JOIN CARTESIAN           |                            |     1 |  2099 |   120   (1)| 00:00:02 |
    |  42 |           NESTED LOOPS                  |                            |     1 |  2099 |   119   (1)| 00:00:02 |
    |  43 |            NESTED LOOPS                 |                            |     1 |  2088 |   118   (1)| 00:00:02 |
    |* 44 |             HASH JOIN                   |                            |     1 |  2077 |   117   (1)| 00:00:02 |
    |* 45 |              TABLE ACCESS BY INDEX ROWID| FIELDDATA                  |   117 |  3744 |    28   (0)| 00:00:01 |
    |  46 |               NESTED LOOPS              |                            |   466 | 28892 |   114   (0)| 00:00:02 |
    |  47 |                NESTED LOOPS             |                            |     4 |   120 |     2   (0)| 00:00:01 |
    |* 48 |                 INDEX UNIQUE SCAN       | PK_TABLEDEF                |     1 |     4 |     0   (0)| 00:00:01 |
    |  49 |                 VIEW                    |                            |     4 |   104 |     2   (0)| 00:00:01 |
    |  50 |                  TABLE ACCESS FULL      | SYS_TEMP_0FD9D9B52_2EBE182 |     4 |   388 |     2   (0)| 00:00:01 |
    |* 51 |                INDEX RANGE SCAN         | XF11_DATA_LE_HB            |   117 |       |    12   (0)| 00:00:01 |
    |  52 |              VIEW                       |                            |    27 | 54405 |     2   (0)| 00:00:01 |
    |  53 |               TABLE ACCESS FULL         | SYS_TEMP_0FD9D9B54_2EBE182 |    27 |  1269 |     2   (0)| 00:00:01 |
    |  54 |             TABLE ACCESS BY INDEX ROWID | TABLECELL                  |     1 |    11 |     1   (0)| 00:00:01 |
    |* 55 |              INDEX UNIQUE SCAN          | XF1_TBLCEL_DATA            |     1 |       |     0   (0)| 00:00:01 |
    |* 56 |            TABLE ACCESS BY INDEX ROWID  | CELLDEF                    |     1 |    11 |     1   (0)| 00:00:01 |
    |* 57 |             INDEX UNIQUE SCAN           | PK_CELLDEF                 |     1 |       |     0   (0)| 00:00:01 |
    |  58 |           BUFFER SORT                   |                            |     5 |       |   120   (2)| 00:00:02 |
    |  59 |            INDEX FULL SCAN              | PK_APPUSAGE                |     5 |       |     1   (0)| 00:00:01 |
    |  60 |        TABLE ACCESS BY INDEX ROWID      | CELLDEF                    |     1 |    33 |     1   (0)| 00:00:01 |
    |* 61 |         INDEX UNIQUE SCAN               | PK_CELLDEF                 |     1 |       |     0   (0)| 00:00:01 |
    |  62 |       BUFFER SORT                       |                            |     1 |    17 |   123   (2)| 00:00:02 |
    |  63 |        VIEW                             |                            |     1 |    17 |     2   (0)| 00:00:01 |
    |  64 |         TABLE ACCESS FULL               | SYS_TEMP_0FD9D9B53_2EBE182 |     1 |    10 |     2   (0)| 00:00:01 |
    |  65 |      TABLE ACCESS BY INDEX ROWID        | APPUSAGEACCESS             |     1 |    17 |     1   (0)| 00:00:01 |
    |* 66 |       INDEX UNIQUE SCAN                 | AK_APPUSAGEACCESS          |     1 |       |     0   (0)| 00:00:01 |
    |  67 |     NESTED LOOPS                        |                            |     1 |  2117 |   124   (2)| 00:00:02 |
    |  68 |      MERGE JOIN CARTESIAN               |                            |     1 |  2100 |   123   (2)| 00:00:02 |
    |  69 |       NESTED LOOPS                      |                            |     1 |  2083 |   121   (2)| 00:00:02 |
    |  70 |        VIEW                             |                            |     1 |  2050 |   120   (2)| 00:00:02 |
    |  71 |         HASH GROUP BY                   |                            |     1 |  2091 |   120   (2)| 00:00:02 |
    |  72 |          NESTED LOOPS                   |                            |     1 |  2091 |   119   (1)| 00:00:02 |
    |  73 |           NESTED LOOPS                  |                            |     1 |  2080 |   118   (1)| 00:00:02 |
    |* 74 |            HASH JOIN                    |                            |     1 |  2069 |   117   (1)| 00:00:02 |
    |* 75 |             TABLE ACCESS BY INDEX ROWID | FIELDDATA                  |   117 |  3744 |    28   (0)| 00:00:01 |
    |  76 |              NESTED LOOPS               |                            |   466 | 28892 |   114   (0)| 00:00:02 |
    |  77 |               NESTED LOOPS              |                            |     4 |   120 |     2   (0)| 00:00:01 |
    |* 78 |                INDEX UNIQUE SCAN        | PK_TABLEDEF                |     1 |     4 |     0   (0)| 00:00:01 |
    |  79 |                VIEW                     |                            |     4 |   104 |     2   (0)| 00:00:01 |
    |  80 |                 TABLE ACCESS FULL       | SYS_TEMP_0FD9D9B52_2EBE182 |     4 |   388 |     2   (0)| 00:00:01 |
    |* 81 |               INDEX RANGE SCAN          | XF11_DATA_LE_HB            |   117 |       |    12   (0)| 00:00:01 |
    |  82 |             VIEW                        |                            |    27 | 54189 |     2   (0)| 00:00:01 |
    |  83 |              TABLE ACCESS FULL          | SYS_TEMP_0FD9D9B54_2EBE182 |    27 |  1269 |     2   (0)| 00:00:01 |
    |  84 |            TABLE ACCESS BY INDEX ROWID  | TABLECELL                  |     1 |    11 |     1   (0)| 00:00:01 |
    |* 85 |             INDEX UNIQUE SCAN           | XF1_TBLCEL_DATA            |     1 |       |     0   (0)| 00:00:01 |
    |* 86 |           TABLE ACCESS BY INDEX ROWID   | CELLDEF                    |     1 |    11 |     1   (0)| 00:00:01 |
    |* 87 |            INDEX UNIQUE SCAN            | PK_CELLDEF                 |     1 |       |     0   (0)| 00:00:01 |
    |  88 |        TABLE ACCESS BY INDEX ROWID      | CELLDEF                    |     1 |    33 |     1   (0)| 00:00:01 |
    |* 89 |         INDEX UNIQUE SCAN               | PK_CELLDEF                 |     1 |       |     0   (0)| 00:00:01 |
    |  90 |       BUFFER SORT                       |                            |     1 |    17 |   122   (2)| 00:00:02 |
    |  91 |        VIEW                             |                            |     1 |    17 |     2   (0)| 00:00:01 |
    |  92 |         TABLE ACCESS FULL               | SYS_TEMP_0FD9D9B53_2EBE182 |     1 |    10 |     2   (0)| 00:00:01 |
    |  93 |      TABLE ACCESS BY INDEX ROWID        | APPUSAGEACCESS             |     1 |    17 |     1   (0)| 00:00:01 |
    |* 94 |       INDEX UNIQUE SCAN                 | AK_APPUSAGEACCESS          |     1 |       |     0   (0)| 00:00:01 |
    ---------------------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id):
       3 - filter("TAXGROUP_DELETE_IND"='N' AND "TAXGROUP_ACTIVE_IND"='A')
       4 - access("TAXGROUP_CODE"='TAXGROUP2')
      13 - filter("TGI"."HYPERIONBASE_ID" IS NOT NULL)
      14 - access("TG"."TAXGROUP_CODE"="TGI"."TAXGROUP_CODE")
      15 - access("TGI"."LEGALENTITY_ID"="OU"."ORGUNIT_ID" AND "TGI"."HYPERIONBASE_ID"="OU"."HYPERIONBASE_ID")
      21 - filter("TGI"."HYPERIONBASE_ID" IS NULL)
      22 - access("TG"."TAXGROUP_CODE"="TGI"."TAXGROUP_CODE")
      23 - access("TGI"."LEGALENTITY_ID"="OU"."ORGUNIT_ID")
      25 - access("APPUSAGE_CODE"='CONSOLIDATION')
      27 - filter("FD"."FIELDDATA_VALUE"=CASE INSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415),':') WHEN 0
                  THEN "FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415) ELSE
                  SUBSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415),1,INSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(16441
                  5),':')-1) END )
      33 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
                  "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
      39 - filter("FDK"."RN"=1)
      40 - filter(ROW_NUMBER() OVER ( PARTITION BY "CD"."CELLDEF_ID","FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"
                  ."FIELDDATA_GROUP_SEQUENCE") ORDER BY "FD"."FIELDDATA_GROUP_SEQUENCE")<=1)
      44 - access("GRS"."FD_GRPSEQ"="FD"."FIELDDATA_PARENT_ROW_SEQUENCE" AND
                  "GRS"."PRS_KEY"="FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"."FIELDDATA_PARENT_ROW_SEQUENCE"))
      45 - filter("FD"."FIELDDATA_DELETE_IND"='N')
      48 - access("TD"."TABLEDEF_ID"=2265)
      51 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
                  "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
      55 - access("FD"."FIELDDATA_ID"="TC"."FIELDDATA_ID")
      56 - filter("CD"."TABLEDEF_ID"=2265 AND "CD"."CELLDEF_KEY_IND"='Y')
      57 - access("TC"."CELLDEF_ID"="CD"."CELLDEF_ID")
      61 - access("FDK"."CELLDEF_ID"="CD"."CELLDEF_ID")
      66 - access("AUA"."APPUSAGE_CODE"="AU"."APPUSAGE_CODE" AND "CD"."CELLDEF_ID"="AUA"."CELLDEF_ID")
      74 - access("GRS"."FD_GRPSEQ"="FD"."FIELDDATA_PARENT_ROW_SEQUENCE" AND
                  "GRS"."PRS_KEY"="FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"."FIELDDATA_PARENT_ROW_SEQUENCE"))
      75 - filter("FD"."FIELDDATA_DELETE_IND"='N')
      78 - access("TD"."TABLEDEF_ID"=2265)
      81 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
                  "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
      85 - access("FD"."FIELDDATA_ID"="TC"."FIELDDATA_ID")
      86 - filter("CD"."TABLEDEF_ID"=2265 AND "CD"."CELLDEF_ADJUSTABLE_IND"='Y')
      87 - access("TC"."CELLDEF_ID"="CD"."CELLDEF_ID")
      89 - access("FDA"."CELLDEF_ID"="CD"."CELLDEF_ID")
      94 - access("AUA"."APPUSAGE_CODE"="AU"."APPUSAGE_CODE" AND "CD"."CELLDEF_ID"="AUA"."CELLDEF_ID")

  • Need help with query that can look data back please help.

    hi guys i have a table like such
    CREATE TABLE "FGL"
        "FGL_GRNT_CODE" VARCHAR2(60),
        "FGL_FUND_CODE" VARCHAR2(60),
        "FGL_ACCT_CODE" VARCHAR2(60),
        "FGL_ORGN_CODE" VARCHAR2(60),
        "FGL_PROG_CODE" VARCHAR2(60),
        "FGL_GRNT_YEAR" VARCHAR2(60),
        "FGL_PERIOD"    VARCHAR2(60),
        "FGL_BUDGET"    VARCHAR2(60)
      )and i have a data like such
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','11','1','400');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','10','1','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','1','0');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','14','200');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','10','14','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','10','2','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7470','4730','02','10','2','200');I bascially need to get the total of the budget column. however its not as simple as it sound(well atleast not for me.) the totals carry over to the new period. youll noticed the you have a period column. basically what im saying is that
    fgl_grant_year 10 period 1 = for account 7600 its $100 and $100 for period 2 you see 100 dollars again this is not to be added this is the carried over balance. which remains $100.
    so im trying to write a query that basically does the following.
    im given a period for the sake of this example lets say period 1 i get nothing else. I have to find the greates grant year grab the amount for period 14(which is the total from the previous year) and add it to the amount of the current period. in this case period 1 grnt_year 11
    so the expected outcome should be $700
    240055     240055     7240     4730     02     10     14     200
    240055     240055     7600     4730     02     10     14     100
    240055     240055     7600     4730     02     11     1     400keep in mind that im not given a year just a period.
    any help that you guys can offer would be immensely appreciated. I have been trying to get this to work for over 3 days now.
    finally broke down and put together this post
    Edited by: mlov83 on Sep 14, 2011 8:48 PM

    Frank
    wondering if you can help me modify this sql statement that you provided me with .
    table values have been modified a bit.
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','11','00','400');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','1','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','1','0');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','11','1','400');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('360055','360055','7200','4730','02','10','1','400');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('360055','360055','7600','4730','02','10','1','400');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','14','200');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','10','14','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','14','200');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','2','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','11','2','600');i need to take one more thing into consideration. if the greatest year has a value on period 00 i need to ignore the period 14 and the current period total would be
    the current period +(current period - greatest year 00)
    hope that makes sense so in other words with the new data above. if i was querying period two of grant year 11. i would end up with $800
    because the greatest year is 11 it contains a period 0 with amount of $400 so my total should be
    period 2 amount $ 600
    period 0 amount $ 400 - period 2 amount of $600 = 200
    600+200 = $800
    if i query period 1 of grant 360055 i would just end up with 800 of grnt year 10.
    i have tried to modify that query you supplied to me with no luck. I have tried for several day but im embarrased to say i just can get it to do what im trying to do .
    can you please help me out.
    Miguel

Maybe you are looking for

  • Deleted Items deletes email weekly

    I am using the Exchange setup on the iPhone for my work email (Exchange Server). Everything works great for email except that messages in the Deleted Items folder get trashed after one week. And, yes, we do have IMAP enabled on the server. The iPhone

  • How to update 2 datagrids in 2 different app at the same time?

    I'm very new to flex/flash builder and my question is: first I have to explain how the applications works. The first applications have a form for a customer to fill and datagrid to show the results.The data is send using PHP to a database in the serv

  • Change fields in avl

    Hey, I'm trying to create a simple alv list but i'm not able to change anything.  I'm surfing already a whole day on this site and still didn't find the awnser.  So, what do i want to do.  I have a database-table created.  With another program i fill

  • Connected Phone Was Not Recognized!!!

    When i'm trying to update my phone software the nokia software updater shown this msg (Connected Phone Was Not Recognized). I'm complete uninstall & reinstall NSU but there was same problem. Guys tel me what can I do now?????

  • Extract structure name space

    Hi ,    When I try to create a datasource in RS02 transaction, by defalut SAP assigns a ZXXXXXX to extract structure. Is there way to change it to some other name space like YXXXXX or /MG/XXXX. Is there a setting to change it.? Appreciate your help.