Please show this query, data not showing why?

I created a report and write following query,it was working well since last 4 months but today automaticly not showing data I can undertstand why?
Becuase I didnt make any changes in this query.
Please help me
Urgent
SELECT ALL MERCH_ORDER.ORDERNO, MERCH_ORDER.ORDERDATE, MERCH_ORDER.SHIP_DATE, MERCH_ORDER.PONO,
MERCH_ORDER.SUBPP, MERCH_ORDER.PJNO, BUYER.B_NAME, BUYER.B_AJENT,
MERCH_ORDER.ITEM, MERCH_ORDER.FABRIC, MERCH_ORDER.QUALITY, MERCH_ORDER.COMPOSITION,
MERCH_ORDER.P_SIZE, MERCH_ORDER.QUANTITY, MERCH_ORDER.Q_UNIT,
MERCH_ORDER.NETWHT, MERCH_ORDER.WT_UNIT, MERCH_ORDER.TERM, MERCH_ORDER.COMM,
MERCH_ORDER.PRICE, MERCH_ORDER.CUR_SYMB, MERCH_ORDER.STATUS, MERCH_ORDER.REMARKS,
MERCH_ORDER.WONO, MERCH_ORDER.PRONO, MERCH_ORDER.PES_QUANTITY,
MERCH_ORDER.PES_Q_UNIT, MERCH_ORDER.PES_PRICE, MERCH_ORDER.PES_CUR_SYMB
FROM BUYER, MERCH_ORDER
WHERE MERCH_ORDER.CANCEL IS NULL
AND (MERCH_ORDER.B_CODE = BUYER.B_CODE)
and merch_order.orderno not in
(select export_order1.orderno from export_order1)
ORDER BY MERCH_ORDER.ORDERNO
there is no any error and msg header and footer print.

Maybe , the query in "NOT IN" clause select export_order1.orderno from export_order1
return the same rows as the following portion return....
SELECT ALL MERCH_ORDER.ORDERNO, MERCH_ORDER.ORDERDATE, MERCH_ORDER.SHIP_DATE, MERCH_ORDER.PONO,
MERCH_ORDER.SUBPP, MERCH_ORDER.PJNO, BUYER.B_NAME, BUYER.B_AJENT,
MERCH_ORDER.ITEM, MERCH_ORDER.FABRIC, MERCH_ORDER.QUALITY, MERCH_ORDER.COMPOSITION,
MERCH_ORDER.P_SIZE, MERCH_ORDER.QUANTITY, MERCH_ORDER.Q_UNIT,
MERCH_ORDER.NETWHT, MERCH_ORDER.WT_UNIT, MERCH_ORDER.TERM, MERCH_ORDER.COMM,
MERCH_ORDER.PRICE, MERCH_ORDER.CUR_SYMB, MERCH_ORDER.STATUS, MERCH_ORDER.REMARKS,
MERCH_ORDER.WONO, MERCH_ORDER.PRONO, MERCH_ORDER.PES_QUANTITY,
MERCH_ORDER.PES_Q_UNIT, MERCH_ORDER.PES_PRICE, MERCH_ORDER.PES_CUR_SYMB
FROM BUYER, MERCH_ORDER
WHERE MERCH_ORDER.CANCEL IS NULL
AND (MERCH_ORDER.B_CODE = BUYER.B_CODE)
OR
there are no rows which conform to the joining condition between the two tables BUYER and MERCH_ORDER ....
Regards,
Simon

Similar Messages

  • Adhoc Query data not getting displayed on Portal

    Hi,
    I have a problem with custom Adhoc query data not getting displayed on the portal.
    It was getting displayed initially but after a user made some changes to the query its not getting displayed.
    The query is displaying data perfectly on R/3 but on portal ..Its giving the message no data found.
    Can anyone help me on this.
    Also if anyone can tell me how do i debug an Adhoc query from potal.
    Is there any tool to debug an Abap program from portal.
    I dont want to use trace,
    Thanks
    GT
    Message was edited by: GT

    Hi GT
    find out the EXACT query u want to launch if it's display
    in BW buisness explorer then change the iview property
    for that query in portal . right click on iview
    BEx Web Application Query String -> assign correct query
    regards,
    kaushal

  • This query does not exist in the database in the system

    I have created a query, but when I run it, I receive this error:
    You have attempted to open query 0DAT from the Query Designer.
    However, this query does not exist in the database in the system to which you have made a connection.
    Thanks
    Joseilton

    dear Joseilton,
    the variable 0DAT ist not in active version in your system.
    Use BC to activate the variable 0DAT from InfoObject 0CALDAY.
    or
    you have to create it in your system. therefor change the namespye to SAP-namespace (starting with 0). Open one Query in your system via RRMX and select CalenderDay to create a new variable.
    name:                0DAT
    descrition:          current calender day
    processed by:        SAP EXIT
    Characteristic:      Calender Day
    variable represents: Single Value
    best regards
    imberaureus

  • Need help " Can't find a valid editor for this file extension" not sure why I am getting and this or what to do.

    also say explorer not reading SWF files and I have to reload them? Not sure what that is either,
    Thanks
    Jim

    Hi Nancy
    Trying to update my site got to make some changes.  Do you work on sites via remote? I am on Cloud.
    : Nancy O. 
    Sent: Monday, September 01, 2014 3:47 PM
    To: James Neidner
    Subject:  Need help " Can't find a valid editor for this file extension" not sure why I am getting and this or what to do.
    Need help " Can't find a valid editor for this file extension" not sure why I am getting and this or what to do.
    created by Nancy O. <https://forums.adobe.com/people/Nancy+O.>  in Dreamweaver support forum - View the full discussion <https://forums.adobe.com/message/6692200#6692200>

  • Please see this query, not showing data Why?

    I created a report and write following query,it was working well since last 4 months but today automaticly not showing data I can undertstand why?
    Becuase I didnt make any changes in this query.
    Please help me
    Urgent
    SELECT ALL MERCH_ORDER.ORDERNO, MERCH_ORDER.ORDERDATE, MERCH_ORDER.SHIP_DATE, MERCH_ORDER.PONO,
    MERCH_ORDER.SUBPP, MERCH_ORDER.PJNO, BUYER.B_NAME, BUYER.B_AJENT,
    MERCH_ORDER.ITEM, MERCH_ORDER.FABRIC, MERCH_ORDER.QUALITY, MERCH_ORDER.COMPOSITION,
    MERCH_ORDER.P_SIZE, MERCH_ORDER.QUANTITY, MERCH_ORDER.Q_UNIT,
    MERCH_ORDER.NETWHT, MERCH_ORDER.WT_UNIT, MERCH_ORDER.TERM, MERCH_ORDER.COMM,
    MERCH_ORDER.PRICE, MERCH_ORDER.CUR_SYMB, MERCH_ORDER.STATUS, MERCH_ORDER.REMARKS,
    MERCH_ORDER.WONO, MERCH_ORDER.PRONO, MERCH_ORDER.PES_QUANTITY,
    MERCH_ORDER.PES_Q_UNIT, MERCH_ORDER.PES_PRICE, MERCH_ORDER.PES_CUR_SYMB
    FROM BUYER, MERCH_ORDER
    WHERE MERCH_ORDER.CANCEL IS NULL
    AND (MERCH_ORDER.B_CODE = BUYER.B_CODE)
    and merch_order.orderno not in
    (select export_order1.orderno from export_order1)
    ORDER BY MERCH_ORDER.ORDERNO

    Where "first table" is merch_order and "second table" is export_order1?
    How many distinct orders are in each table?
    Are there any NULL order numbers in either table?
    I'd put money on the fact that if commenting out a clause causes a number of rows to be returned, that clause is filtering out all the rows. You'll need to go through your data to figure out why the NOT IN clause is filtering out all your rows.
    Justin

  • Please tune this query.

    Hi Experts,
    My below query is taking long time.
    [code]SELECT FAX_LIST.*
        FROM (SELECT /*+ use_nl(fax, src)  */
                    ROW_NUMBER () OVER (ORDER BY fax.ID ASC NULLS FIRST) RN,
                     fax.ACCOUNT_TYPE,
                     fax.BU_FILE_LOCATION,
                     fax.COUNT_PAGES_RECEIVED,
                     NVL (fax.CUSTOMER_NAME, fax.SENDER_NAME) AS CUSTOMER_NAME,
                     fax.FAX_SOURCE,
                     fax.CUSTOMER_NUMBER,
                     fax.CUSTOMER_OMEGA_NUMBER,
                     fax.GENIFAX_RECIPIENT_ID,
                     fax.ID AS FAX_ID,
                     fax.DATE_RECEIVED AS FAX_RECEIVED,
                     fax.IS_LOCKED,
                     fax.LOCKED_BY,
                     fax.ORIGINATOR_CSI,
                     fax.MARGIN,
                     fax.PAYMENT_TYPE,
                     fax.PRIORITY_CODE,
                     fax.PRIORITY_VALUE,
                     FROM_TZ (fax.DATE_RECEIVED, 'UTC')
                        AT TIME ZONE fax.LOCAL_TZ_NAME
                        AS DATE_RECEIVED,
                     fax.SALES_PERSON,
                     fax.SENDER_EMAIL,
                     fax.SENDER_NAME,
                     fax.SUBJECT,
                     fax.WORKGROUP_ID,
                     fax.LOCKED_TIME,
                     src.DESCRIPTION,
                     src.FAX_NUMBER,
                     src.WORKFLOW_ID,
                     fax.CREATED_BY,
                     fax.CREATED_DATE,
                     fax.UPDATE_DATE,
                     fax.UPDATED_BY,
                     fax.RESERVED_BY,
                     fax.PRICE_TO_ORDER,
                     fax.SKU_COUNT_TO_ORDER,
                     NVL (ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).CHANGED_BY,
                        CASE
                           WHEN fax.LAST_TRANSITION_ID IS NULL
                                AND fax.GENIFAX_RECIPIENT_ID IS NOT NULL
                           THEN
                              'ORL FEEDER'
                           ELSE
                              'Admin'
                        END)
                        AS LAST_USER,
                     FROM_TZ (
                        NVL (ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).CHANGED_DATE,
                             fax.DATE_RECEIVED),
                        'UTC')
                        AT TIME ZONE fax.LOCAL_TZ_NAME
                        AS MOVE_DATETIME,
                     NVL (ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).REASON,
                          'Reroute')
                        AS MOVE_REASON,
                     NVL (
                        (SELECT fw.DESCRIPTION
                           FROM ORL.WORKGROUP_TRANSITION wt, ORL.WORKGROUP fw
                          WHERE wt.ID =
                                   ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).WORKGROUP_TRANSITION_ID
                                AND fw.ID = wt.CURRENT_WORKGROUP_ID),
                        CASE
                           WHEN fax.LAST_TRANSITION_ID IS NULL
                                AND fax.GENIFAX_RECIPIENT_ID IS NOT NULL
                           THEN
                              'ORL FEEDER STAGING'
                           ELSE
                              'N/A'
                        END)
                        AS OLD_STATUS,
                     (SELECT MAX (PURCHASE_ORDER_NUMBER)
                        FROM ORL.FAX_OFFER_DETAIL
                       WHERE FAX_ID = fax.ID)
                        AS MAXPO,
                     (SELECT CASE COUNT (PURCHASE_ORDER_NUMBER)
                                WHEN 0 THEN NULL
                                ELSE COUNT (PURCHASE_ORDER_NUMBER)
                             END
                                AS POCOUNT
                        FROM ORL.FAX_OFFER_DETAIL
                       WHERE FAX_ID = fax.ID)
                        AS POCOUNT,
                     (SELECT SUM (VALUE) AS ORDER_VALUE
                        FROM ORL.FAX_OFFER_DETAIL
                       WHERE FAX_ID = fax.ID)
                        AS ORDER_VALUE,
                     fax.SALESPERSON_NAME,
                     fax.GROUP_NAME,
                     fax.ROLE_NAME,
                     fax.EMAIL,
                     fax.SALES_CHANNEL
                FROM (SELECT fax.*,
                             map.ORACLE_TZ_NAME AS LOCAL_TZ_NAME,
                             ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).SALESPERSON_NAME
                                AS SALESPERSON_NAME,
                             ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).GROUP_NAME
                                AS GROUP_NAME,
                             ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).ROLE_NAME
                                AS ROLE_NAME,
                             ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).EMAIL
                                AS EMAIL,
                             ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).SALES_CHANNEL
                                AS SALES_CHANNEL
                        FROM APPS_GLOBAL.GLOBAL_BU_MAPPING map,
                             (SELECT *
                                FROM ORL.FAX_HEADER FH
                               WHERE FH.WORKGROUP_ID = 262) fax
                       WHERE map.GEDIS = 'Y'
                             AND map.BU_ID = (SELECT BUID
                                                FROM ORL.WORKGROUP
                                               WHERE ID = fax.WORKGROUP_ID)
                             AND ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).SALESPERSON_NAME =
                                    'A_CARRICK') fax,
                     (SELECT *
                        FROM ORL.FAX_SOURCE FS
                       WHERE FS.WORKFLOW_ID IN
                                (SELECT  /*+ CARDINALITY(t, 1) */
                                       TO_NUMBER (
                                           COLUMN_VALUE)
                                           AS COLUMN_VALUE
                                   FROM TABLE (
                                           SplitClob ('1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
            16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
            32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
            48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
            64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
            80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
            96, 97, 98', ',')) t)) src
               WHERE src.ID(+) = fax.FAX_SOURCE) FAX_LIST
       WHERE RN BETWEEN 1 AND 100
    ORDER BY RN ASC;[/code]
    In my query the following three functions are using.
    ORL.GET_FTH_WTR
    ORL.GET_SALESPERSON
    APPS_GLOBAL.SplitClob
    [code]CREATE OR REPLACE FUNCTION ORL.GET_FTH_WTR(p_LAST_TRANSITION_ID NUMBER)
            RETURN ORL.FTH_WTR_T
            DETERMINISTIC
        IS
            v_REASON nvarchar2(1024 char);
            v_WORKGROUP_TRANSITION_ID number;
            v_CHANGED_BY nvarchar2(64 char);
            v_CHANGED_DATE timestamp(6);
        BEGIN
        SELECT
            WTR.REASON,
            wtr.WORKGROUP_TRANSITION_ID,
            fth.CHANGED_BY,
            fth.CHANGED_DATE
        INTO
            v_REASON,
            v_WORKGROUP_TRANSITION_ID,
            v_CHANGED_BY,
            v_CHANGED_DATE
        FROM
            ORL.FAX_TRANSITION_HISTORY fth,
            ORL.WORKGROUP_TRANSITION_REASON wtr
        WHERE
             fth.ID = p_LAST_TRANSITION_ID
            AND wtr.ID(+) = fth.TRANSITION_REASON_ID;
        RETURN ORL.FTH_WTR_T(v_CHANGED_BY, v_CHANGED_DATE, v_REASON, v_WORKGROUP_TRANSITION_ID);
        EXCEPTION
            WHEN NO_DATA_FOUND THEN
            RETURN ORL.FTH_WTR_T(NULL, NULL, NULL, NULL);
        END GET_FTH_WTR;
    CREATE OR REPLACE function ORL.GET_SALESPERSON(ORG_ID number, SALESPERSON_ID number)
        return ORL.SALESPERSON_T
        deterministic
    is
        apps_bu             varchar2(30);
        salesperson_name    varchar2(150 char);
        email               varchar2(70 char);
        sales_channel       varchar2(60 char);
        role_name           varchar2(60 char);
        group_name          varchar2(60 char);
    begin
        select OWNER_NAME into apps_bu
          from APPS_GLOBAL.GLOBAL_BU_MAPPING
         where ORG_ID = GET_SALESPERSON.ORG_ID;
        execute immediate
        replace('
            select SALESPERSON_NAME
                 , EMAIL
                 , SALES_CHANNEL
                 , ROLE_NAME
                 , GROUP_NAME
              from APPS_**.ORL_ACTIVE_SALESPERSON
             where SALESPERSON_ID = :1
      and  rownum = 1
                ', 'APPS_**', apps_bu)
        into salesperson_name, email, sales_channel, role_name, group_name
        using SALESPERSON_ID;
        return SALESPERSON_T(ORG_ID, SALESPERSON_ID, salesperson_name, email, sales_channel, role_name, group_name);
    exception
        when no_data_found then
            return SALESPERSON_T(null, null, null, null, null, null, null);
    end GET_SALESPERSON;
    CREATE OR REPLACE function APPS_GLOBAL.SplitClob
        p_clob          clob
      , p_delimiter     varchar2 := ','
    return StringTable
    deterministic
    pipelined
    as
        v_current_pos   pls_integer := 1;
        v_delimiter_pos pls_integer;
    begin
        if (p_clob is not NULL) and (p_delimiter is not NULL) then
            while v_current_pos <= length(p_clob) loop
                v_delimiter_pos := instr(p_clob, p_delimiter, v_current_pos);
                if  v_delimiter_pos < 1  then   -- no more delimiters
                    v_delimiter_pos := length(p_clob) + 1;
                end if;
                pipe row( to_char( substr(p_clob,
                                          v_current_pos,
                                          v_delimiter_pos - v_current_pos) ) );
                v_current_pos := v_delimiter_pos + length(p_delimiter);
            end loop;
        end if;
    end SplitClob;
    CREATE OR REPLACE TYPE SALESPERSON_T  AS OBJECT
      SALESPERSON_ID        number(15)
    , SALESPERSON_NUMBER    varchar2(150 char)
    , FIRST_NAME            varchar2(20 char)
    , LAST_NAME             varchar2(40 char)
    , SALES_CHANNEL         varchar2(60 char)
    , ORG_ID                number(15)
    , USER_NAME             varchar2(61 char)
    , EFFECTIVE_START_DATE  date
    , EFFECTIVE_END_DATE    date
    , STATUS_FLAG           varchar2(1 char)
    , EMAIL                 varchar2(70 char)
    , WORK_TELEPHONE        varchar2(60 char)
    , MANAGERS_NAME         varchar2(50 char)
    , FAX_NO                varchar2(60 char)
    , SALESPERSON_NAME      varchar2(30 char)
    , TERRITORY             varchar2(40 char)
    , FO_LOGON              varchar2(150 char)
    , BO_LOGON              varchar2(150 char)
    , SUB_CHANNEL           varchar2(25 char)
    , BUSINESS_SEGMENT      varchar2(3 char)
    , DISCOUNT_NAME         varchar2(30 char)
    , RESPONSIBILITY_ID     number
    , RESPONSIBILITY_KEY    varchar2(30 char)
    CREATE OR REPLACE TYPE STRINGTABLE as table of varchar2(4000);[/code]
    The total number of records in each table.
    [code]SELECT COUNT(*) FROM ORL.FAX_HEADER FH --4397829
    SELECT COUNT(*) FROM APPS_GLOBAL.GLOBAL_BU_MAPPING map --31
    SELECT COUNT(*) FROM ORL.WORKGROUP_TRANSITION  --6735
    SELECT COUNT(*) FROM ORL.WORKGROUP fw --1495
    SELECT COUNT(*) FROM ORL.FAX_OFFER_DETAIL --5904039
    SELECT COUNT(*) FROM  ORL.FAX_SOURCE--2368 --2457[/code]
    Indexes on the columns.
    [code]ORL.WORKGROUP_TRANSITION(ID),
    ORL.WORKGROUP(ID),
    ORL.FAX_OFFER_DETAIL(FAX_ID),
    ORL.FAX_HEADER(WORKGROUP_ID).[/code]
    Please help me to tune this query.
    Thanks in advance.

    Hi,
    Thanks for your reply.
    For split the numbers into different rows , we are sending randomly.
    It's not constant numbers.We have used bind variables.
    For testing purpose I have hard coded the values.
    How to do this split without using user defined function.
    I am sending the actual query along with execution plan without any hints.
    [code]SELECT   FAX_LIST.*
      FROM   (SELECT   ROW_NUMBER () OVER (ORDER BY fax.ID ASC) RN,
                       fax.ACCOUNT_TYPE,
                       fax.BU_FILE_LOCATION,
                       fax.COUNT_PAGES_RECEIVED,
                       NVL (fax.CUSTOMER_NAME, fax.SENDER_NAME) AS CUSTOMER_NAME,
                       fax.FAX_SOURCE,
                       fax.CUSTOMER_NUMBER,
                       fax.CUSTOMER_OMEGA_NUMBER,
                       fax.GENIFAX_RECIPIENT_ID,
                       fax.ID AS FAX_ID,
                       fax.DATE_RECEIVED AS FAX_RECEIVED,
                       fax.IS_LOCKED,
                       fax.LOCKED_BY,
                       fax.ORIGINATOR_CSI,
                       fax.MARGIN,
                       fax.PAYMENT_TYPE,
                       fax.PRIORITY_CODE,
                       fax.PRIORITY_VALUE,
                       FROM_TZ (fax.DATE_RECEIVED, 'UTC') AT TIME ZONE map.ORACLE_TZ_NAME AS DATE_RECEIVED,
                       fax.SALES_PERSON,
                       fax.SENDER_EMAIL,
                       fax.SENDER_NAME,
                       fax.SUBJECT,
                       fax.WORKGROUP_ID,
                       fax.LOCKED_TIME,
                       src.DESCRIPTION,
                       src.FAX_NUMBER,
                       src.WORKFLOW_ID,
                       fax.CREATED_BY,
                       fax.CREATED_DATE,
                       fax.UPDATE_DATE,
                       fax.UPDATED_BY,
                       fax.RESERVED_BY,
                       fax.PRICE_TO_ORDER,
                       fax.SKU_COUNT_TO_ORDER,
                       NVL (
                          ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).CHANGED_BY,
                          CASE
                             WHEN fax.LAST_TRANSITION_ID IS NULL
                                  AND fax.GENIFAX_RECIPIENT_ID IS NOT NULL
                             THEN
                                'ORL FEEDER'
                             ELSE
                                'Admin'
                          END
                          AS LAST_USER,
                       FROM_TZ (NVL (ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).CHANGED_DATE,fax.DATE_RECEIVED),'UTC')
                       AT TIME ZONE map.ORACLE_TZ_NAME AS MOVE_DATETIME,
                       NVL (ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).REASON,'Reroute')AS MOVE_REASON,
                       NVL ((SELECT   fw.DESCRIPTION
                             FROM   ORL.WORKGROUP_TRANSITION wt, ORL.WORKGROUP fw
                            WHERE   wt.ID =
                                       ORL.GET_FTH_WTR (
                                          fax.LAST_TRANSITION_ID
                                       ).WORKGROUP_TRANSITION_ID
                                    AND fw.ID = wt.CURRENT_WORKGROUP_ID),
                          CASE
                             WHEN fax.LAST_TRANSITION_ID IS NULL
                                  AND fax.GENIFAX_RECIPIENT_ID IS NOT NULL
                             THEN
                                'ORL FEEDER STAGING'
                             ELSE
                                'N/A'
                          END
                          AS OLD_STATUS,
                       (SELECT   MAX (PURCHASE_ORDER_NUMBER)
                          FROM   ORL.FAX_OFFER_DETAIL
                         WHERE   FAX_ID = fax.ID)
                          AS MAXPO,
                       (SELECT   CASE COUNT (PURCHASE_ORDER_NUMBER)
                                    WHEN 0 THEN NULL
                                    ELSE COUNT (PURCHASE_ORDER_NUMBER)
                                 END
                                    AS POCOUNT
                          FROM   ORL.FAX_OFFER_DETAIL
                         WHERE   FAX_ID = fax.ID)
                          AS POCOUNT,
                       (SELECT   SUM (VALUE) AS ORDER_VALUE
                          FROM   ORL.FAX_OFFER_DETAIL
                         WHERE   FAX_ID = fax.ID) AS ORDER_VALUE,
                       ORL.GET_SALESPERSON (map.ORG_ID,fax.SALES_PERSON).SALESPERSON_NAME AS SALESPERSON_NAME,
                       ORL.GET_SALESPERSON (map.ORG_ID,fax.SALES_PERSON).GROUP_NAME AS GROUP_NAME,
                       ORL.GET_SALESPERSON (map.ORG_ID,fax.SALES_PERSON).ROLE_NAME AS ROLE_NAME,
                       ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).EMAIL AS EMAIL,
                       ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).SALES_CHANNEL AS SALES_CHANNEL
                FROM   ORL.FAX_HEADER fax,
                       APPS_GLOBAL.GLOBAL_BU_MAPPING map,
                       ORL.FAX_SOURCE src
               WHERE       fax.WORKGROUP_ID = :WORKGROUP_ID
                       AND map.GEDIS = 'Y'
                       AND map.BU_ID = (SELECT   BUID
                                          FROM   ORL.WORKGROUP
                                         WHERE   ID = fax.WORKGROUP_ID)
                       AND ORL.GET_SALESPERSON (map.ORG_ID,fax.SALES_PERSON).GROUP_NAME =:SALES_TEAM
                       AND ORL.GET_SALESPERSON (map.ORG_ID,fax.SALES_PERSON
                          ).SALESPERSON_NAME = :SALESPERSON_NAME
                       AND src.WORKFLOW_ID IN
                                (SELECT TO_NUMBER (COLUMN_VALUE) AS COLUMN_VALUE
                                   FROM table(SplitClob (:WORKFLOW_ID,:WORKFLOW_ID_delim)) t)
                       AND src.ID(+) = fax.FAX_SOURCE) FAX_LIST
    WHERE   RN BETWEEN 1 AND 100;
    Execution Plan
    | Id  | Operation                               | Name                    | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT                        |                         |     2 | 12092 | 88923   (1)|
    |   1 |  NESTED LOOPS                           |                         |     1 |    38 |     3   (0)|
    |   2 |   TABLE ACCESS BY INDEX ROWID           | WORKGROUP_TRANSITION    |     1 |     9 |     2   (0)|
    |   3 |    INDEX UNIQUE SCAN                    | PK_WORKGROUP_TRANSITION |     1 |       |     1   (0)|
    |   4 |   TABLE ACCESS BY INDEX ROWID           | WORKGROUP               |  1482 | 42978 |     1   (0)|
    |   5 |    INDEX UNIQUE SCAN                    | PK_WORKGROUP            |     1 |       |     0   (0)|
    |   6 |  SORT AGGREGATE                         |                         |     1 |    16 |            |
    |   7 |   TABLE ACCESS BY INDEX ROWID           | FAX_OFFER_DETAIL        |     1 |    16 |     5   (0)|
    |   8 |    INDEX RANGE SCAN                     | FAX_OFFER_DETAIL_IDX1   |     1 |       |     3   (0)|
    |   9 |  SORT AGGREGATE                         |                         |     1 |    16 |            |
    |  10 |   TABLE ACCESS BY INDEX ROWID           | FAX_OFFER_DETAIL        |     1 |    16 |     5   (0)|
    |  11 |    INDEX RANGE SCAN                     | FAX_OFFER_DETAIL_IDX1   |     1 |       |     3   (0)|
    |  12 |  SORT AGGREGATE                         |                         |     1 |    11 |            |
    |  13 |   TABLE ACCESS BY INDEX ROWID           | FAX_OFFER_DETAIL        |     1 |    11 |     5   (0)|
    |  14 |    INDEX RANGE SCAN                     | FAX_OFFER_DETAIL_IDX1   |     1 |       |     3   (0)|
    |  15 |  VIEW                                   |                         |     2 | 12092 | 88923   (1)|
    |  16 |   WINDOW SORT PUSHED RANK               |                         |     2 |  1378 | 88923   (1)|
    |  17 |    NESTED LOOPS                         |                         |       |       |            |
    |  18 |     NESTED LOOPS                        |                         |     2 |  1378 | 88920   (1)|
    |  19 |      NESTED LOOPS                       |                         | 18420 |    11M| 70490   (1)|
    |  20 |       HASH JOIN RIGHT SEMI              |                         |    69 |  3657 |    49   (3)|
    |  21 |        COLLECTION ITERATOR PICKLER FETCH| SPLITCLOB               |  8168 | 16336 |    29   (0)|
    |  22 |        TABLE ACCESS FULL                | FAX_SOURCE              |  2409 |   119K|    19   (0)|
    |  23 |       TABLE ACCESS BY INDEX ROWID       | FAX_HEADER              |   268 |   160K|  2854   (1)|
    |  24 |        INDEX RANGE SCAN                 | FAX_HEADER_FS_IDX       |  4345 |       |     7   (0)|
    |  25 |      INDEX RANGE SCAN                   | GLOBAL_BU_MAPPING_BUID  |     1 |       |     0   (0)|
    |  26 |       TABLE ACCESS BY INDEX ROWID       | WORKGROUP               |     1 |     8 |     2   (0)|
    |  27 |        INDEX UNIQUE SCAN                | PK_WORKGROUP            |     1 |       |     1   (0)|
    |  28 |     TABLE ACCESS BY INDEX ROWID         | GLOBAL_BU_MAPPING       |     1 |    24 |     1   (0)|
    Note
       - 'PLAN_TABLE' is old version
    Statistics
         894400  recursive calls
             60  db block gets
        7402741  consistent gets
              0  physical reads
              0  redo size
          46309  bytes sent via SQL*Net to client
            430  bytes received via SQL*Net from client
              8  SQL*Net roundtrips to/from client
         848304  sorts (memory)
              0  sorts (disk)
            100  rows processed[/code]
    Please help me.
    Thanks in advance.

  • Please convert this query to update.

    Hi Experts,
    Please convert this MERGE statment to UPDATE.
    MERGE INTO CUSTOMER_DTLS CDT
        USING
            SELECT CDT.CDT_ID, CDT.CDT_ITEMREQ_NO, CDT_UNIT_NO, CDT.CDT_UPDATE_DT, OST.SalesName, OST.Team, OST.Team_ID
            FROM CUSTOMER_DTLS CDT
            INNER JOIN REVEN_MAP RMP ON CDT.CDT_ID = RMP.ORG_ID
            INNER JOIN SALES_DTLS OST ON RMP.WB_IBU = OST.IBU AND OST.Rep_Code = CDT.CDT_SECSALESREP
            WHERE CDT.PRODUCT_SEC = 'M'
            AND CDT.CDT_ID = 600
        ) SALES_QUERY
        ON(
                CDT.CDT_ID = SALES_QUERY.CDT_ID
            AND CDT.CDT_ITEMREQ_NO = SALES_QUERY.CDT_ITEMREQ_NO
            AND CDT.CDT_UNIT_NO = SALES_QUERY.CDT_UNIT_NO
            AND CDT.CDT_UPDATE_DT = SALES_QUERY.CDT_UPDATE_DT
            AND CDT.PRODUCT_SEC = 'M'
        WHEN MATCHED THEN
        UPDATE SET CDT.CDT_SALES_REP  = SALES_QUERY.SalesName,
                CDT.CDT_OutSide_SALES_DTLS     = SALES_QUERY.Team,
                CDT.CDT_OutSide_Team_ID        = SALES_QUERY.Team_ID
        WHERE CDT.CDT_SALES_REP IS NULL
        AND CDT.PRODUCT_SEC = 'M'
        AND CDT.CDT_ID = 600;
    Please help me.
        Thanks.

    Hi All,
    The merge query first doing join and make it as a SALES_QUERY query.
            SELECT CDT.CDT_ID, CDT.CDT_ITEMREQ_NO, CDT_UNIT_NO, CDT.CDT_UPDATE_DT, OST.SalesName, OST.Team, OST.Team_ID
            FROM CUSTOMER_DTLS CDT
            INNER JOIN REVEN_MAP RMP ON CDT.CDT_ID = RMP.ORG_ID
            INNER JOIN SALES_DTLS OST ON RMP.WB_IBU = OST.IBU AND OST.Rep_Code = CDT.CDT_SECSALESREP
            WHERE CDT.PRODUCT_SEC = 'M'
            AND CDT.CDT_ID = 600
        ) SALES_QUERY
    On top of it using the result of SALES_QUERY checking the following matching.
    ON(
                CDT.CDT_ID = SALES_QUERY.CDT_ID
            AND CDT.CDT_ITEMREQ_NO = SALES_QUERY.CDT_ITEMREQ_NO
            AND CDT.CDT_UNIT_NO = SALES_QUERY.CDT_UNIT_NO
            AND CDT.CDT_UPDATE_DT = SALES_QUERY.CDT_UPDATE_DT
            AND CDT.PRODUCT_SEC = 'M'
    But in your update it's just joining and after that not used any of these values for comparison.
    CDT.CDT_ID, CDT.CDT_ITEMREQ_NO, CDT_UNIT_NO, CDT.CDT_UPDATE_DT, OST.SalesName, OST.Team, OST.Team_ID
    How this works.
    Please explain.
    Thanks.

  • Please find this query very urgent

    Query-->select value from mytable where value is not null
         union all
    select value from mytable where value is null
    Ex: table name::mytable
    In this table i have one column called 'value' and this column values shold be like this
    12
    null
    13
    null
    11
    null
    ....i executed above query the result will be like this
    12
    13
    11
    null
    null
    null
    the above query executes on the table it's effect only one column result
    but i need multiple columns to be effected same as above one only....Anyone please help me on it and give the query.

    I have a table..MyTable(value number(10))
    select * from Mytable;value
    12
    null
    13
    null
    11
    null
    This is the table i have and the records i have...... and i need output like this
    value
    12
    13
    11
    null
    null
    null ..............>ike this i need output for this i use this query i.e
    Query-->select value from mytable where value is not null
    union all
    select value from mytable where value is null
    ------------>and this query gives only one column result i need multiple results like below: i have table with 2 columns like below
    MyTable2(value1 number(10),value2 number(10))
    select * fromMyTable2value1 value2
    111 null
    null 201
    112 null
    null 200
    110 null
    this is the table i have......... and i need output like below
    value1 value2
    111 201
    112 200
    110 null
    null null
    null null
    NOTE:: If we use ORDER BY table records order must change, i don't want to change any order....please what is the query for that

  • Please Help "This accessory is not made to work with iPhone" iPod??

    Hiya i wondered if someone here can help me please.
    Today i went to play my ipod feature on my iPhone and it started playing on the iPhone speakers which i wanted, Then all of a sudden it stoped i checked it out and had an error message saying the following.
    "This accessory is not made to work with iPhone
    Do you wish to switch to aeroplane mode
    YES/NO"
    There is no accessory connected to the phone and also it has not been in contact with water which i heard sometimes triggers this error.
    When i press the NO option the volume cuts out and the volume slider disapears on the ipod and also the volume buttons dont work.
    I dont really want to factory restore it but if thats my only option then i will do it. Also i have only had the phone for less than 20 days.
    Any Help/Advice is really apprieciated.

    Check your iPhone's dock connector port for any dirt, lint, or foreign material, and it doesn't take much.
    If clear, the standard troubleshooting steps in order are power your iPhone off and on, an iPhone reset - which is done by pressing and holding the home button and the sleep/wake or on/off button simultaneously until you see the Apple logo and then release - ignoring the slide to turn off prompt when doing so, restoring your iPhone with iTunes from your iPhone's backup, and restoring as a new iPhone or not from your iPhone's backup.
    If no change after any of these steps in order, you can call AppleCare or make an appointment at an Apple store if there is one nearby.

  • Any Explanations y this query is not ordering ?

    SELECT dept_id, salary, job_id
    FROM employees
    ORDER BY
    ( SELECT dept_id
    FROM departments
    WHERE last_name='Abel');
    Assumptions:
    1. The inner subquery gives a value of 10 only.
    2. There is no 10th column in the Table Employees.
    3. There is only 1 employee in the department 10.
    Output it gives :
    It gives all that is there in the employees table(projected cols), However the first record is always from dept_id= 10, then it just displays without ordering.

    yes you are partially correct. The subquery will return only 10 and not 1 or 5 or any other value.
    I have an explanation to this query bt I'm not sure about it.
    Oracle checks for semantics and syntax at compile time. So if everything is correct then only it submits the query for execution. Now when a subquery executes only then oracle knows there is no 10th col in the database so it is a runtime error.

  • LSMW Please answer this query Experts

    Hi all,
    I Know how to use LSMW and upload data . Now I am trying to upload data for xk01 uisng lsmw. SO, the problem is vendor number uses internal assignment here. I don't know wether we use lsmw if lifnr uses internal assignment.Also I need to upload bank details for each vendor which are in a seperate flat file. Guys with real time experience, I think can solve this problem. Please guide me with this.
    Regards,
    Varun.

    You already have another post with the same question. Can you please close this one?

  • Why this query does not show the result?

    Why the query with the schema prefixed does not show the result and the query without schema display the correct results?
    SQL> select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS';
    select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS'
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select data_object_id,object_type from dba_objects where object_name='HR.JOBS';
    no rows selected
    SQL> select data_object_id, OWNER, object_type from dba_objects where object_name='JOBS';
    DATA_OBJECT_ID     OWNER                          OBJECT_TYPE
    69662              HR                                 TABLE
                       OE                                 SYNONYM
    SQL> SELECT USER FROM DUAL;
    USER
    SYS

    Hi,
    the column object_name refers to a object_name which is 'JOBS', the column owner refers to the owner 'HR', the value isn't stored together, so you have to select the two columns. It is the same behaviour as every other table/view. Have a look at the values in the view DBA_OBJECTS.
    Herald ten Dam
    Superconsult.nl

  • HT2905 This still does not discuss why these dupicates keep being made.  It would be really, really nice if Apple were to look at their code and fix the problem in the first place. I have to go through my library every other week to remove the duplicates.

    This also applies to iTunes for Windows.  I have been using iTunes since 2007.  In every version that I have used, random tracks get duplicated for no reason.  I will usually go a month or two at time before I touch my library.  It doesn't take much to understand that have an entire library of over 10 gigabytes being duplicated several times will eat up the small hard drive on a Macbook Pro.  Why has Apple only come up with the solution to have their customers delete the duplicates rather than change the iTunes coding to preven the duplications in the first place?

    After my PC crashed and I moved my iTunes library to a new laptop (with a lot of technical help)  it appeared that almost all my songs had been duplicated.  However, the music could only be found under one fo the titles that showed.  The one without the music has an ! inside a circle in front of it.  If I try to play any of these on my laptop I get an error message saying the song can't be found.  When I synched to my iPod I found that many of my songs were not on the iPod.  It turned out that durring synching my iPod picked only one version of each song and if it picked up the one with the ! it didn't pick up the title or the actual song - so it appeared I had lost the song.  If I go back into my iTunes library and delete the songs with the ! and then resynch, it will pick up all the tunes.  The problem is I have several thousand songs in my library - it would sure be nice if there was an automatic way to delete all the songs with the !.  

  • Apple PLEASE Read This!  When using Grab, why does Saving only allow ONE Format...Tiff?

    It would be nice for Apple's Grab program to offer multiple formats for saving.  I understand why they offer only Tiff but when I have a problem and I need to grab part of the screen or even the whole window, most Discussions require jpg or png formats.  It takes too much time to save in Tiff, go to the save file location and open the file using Preview, and then saving the file in another format that I need for my own purpose.  WHAT A WASTE OF MY TIME!
    I could use the Print option and first I may need to use Scale  to fit the image on one sheet in stead of 4-6 pages (can be 25% scale for a one page screen save), and then open the PDF drop down button, choose "Open PDF in Preview", preview the image, and if it looks ok, I save as a PDF file.  I could then open the PDF file in Preview and save the image in another format depending on my need.  WHAT A WASTE OF MY TIME!
    I am surprised that, in a Search of the forums, no one has brought this up.
    Apple save us a bunch of time and give us other save formats!  PLEASE!
    Others please chime in and maybe Apple will get the message.
    Remember, "The squeaky wheel, gets the grease"
    Andy

    Keep in mind that many (if not most) non-techies will never memorize (let alone use) a 3-key sequence when they have a handy-dandy utility that makes so much sense to them.  Grab does fill a very useful gap for the vast majority of Mac users - why make it so unfriendly in this regard?
    Wow, you should re-think that one. I think the opposite to be true.
    And, if you use a free 3rd party app, i.e. TinkerTool, you can not only change the file format for screen capture, but also the default location for the files.
    I think that most people think of Grab as dinosaur software.

  • Please resolve this query for me.

    i have table of supplier(supplier id,comp name,contractname,address, city, region, postal code, country, phone, fax),products(product id,sroduct name,supplier id,categoryid, qtyper unit, unitprice,unists in stock,units on order, reorder level,discontinued),order details(order id,productid, unitprice, qty, discount),orders(orderid,customerid,employee id,orderdate, requieredate, shipped date,shipvia, freight, shipname,shipaddress, shipcity,shipregion), customers(customerid,comp name contact name, contact title, address, city, region,postalcode, country, phone, fax), shippers(shipid,company name, phone), employee(allthe details of employee), categories(category id, catagoryname, description,picture)
    1. I want to contact all customers who have received over $1,000 in discounts on orders this year. Give me the name and phone number of the person to contact at the customers site. Also, list the orders where the total discount was greater than $100. Remember, discount is a percentage of the price.
    2. Give me a list of suppliers and products where we do not have the stock on hand to fill the orders to be shipped. List out the customer and order information for each of the products involved.
    3. Give me a list of all orders that were shipped after the required date for the week of Jan 7, 2001. I want to know the name of the employees that were responsible for the orders.
    4. We are having a golf tournament and I need some prizes. Give me a list of the top 5 suppliers by dollar amount in the last year.
    5. Some customers are taking us for a ride on shipping. Give me a list of customers and the orders involved where more than ½ of their orders are being shipped to a region other than their home region.

    Jakas,
    This forum is for the "SQL Developer" tool - you might get a better response on the "SQL and PL/SQL" forum (PL/SQL).
    theFurryOne

Maybe you are looking for