Error when use"select case when sum() group by"

SELECT REGION_CODE
,REGION_DESC
,CASE WHEN SUM(UP_SMS_TIMES) BETWEEN T2.SMS_MIN AND T2.SMS_MAX THEN T2.SMS_LVL_CODE END
FROM PMID.TB_MID_PAR_EXT_USER_MON T1, PCDE.TB_CDE_SMS_LVL T2
WHERE DEAL_DATE='200811'
GROUP BY REGION_CODE, REGION_DESC
{color:#ff0000}error:ORA-00979: not a GROUP BY expression
{color}{color:#000000}How can i fix the error,Thanks{color}

-- CREATE TABLE TB_MID_PAR_EXT_USER_MO
create table TB_MID_PAR_EXT_USER_MON
DEAL_DATE CHAR(6),
REGION_CODE CHAR(2),
REGION_DESC VARCHAR2(20),
UP_SMS_TIMES NUMBER(14) default 0,
--INSERT SAMPLE DATA TO TB_MID_PAR_EXT_USER_MO
insert into TB_MID_PAR_EXT_USER_MON(DEAL_DATE,REGION_CODE,REGION_DESC,UP_SMS_TIMES)
VALUES('200812','BJ','BEIJING'11)
insert into TB_MID_PAR_EXT_USER_MON(DEAL_DATE,REGION_CODE,REGION_DESC,UP_SMS_TIMES)
VALUES('200812','SH','SHANGHAI',7)
insert into TB_MID_PAR_EXT_USER_MON(DEAL_DATE,REGION_CODE,REGION_DESC,UP_SMS_TIMES)
VALUES('200812','SH','SHANGHAI',9)
insert into TB_MID_PAR_EXT_USER_MON(DEAL_DATE,REGION_CODE,REGION_DESC,UP_SMS_TIMES)
VALUES('200812','BJ','BEIJING',10)
insert into TB_MID_PAR_EXT_USER_MON(DEAL_DATE,REGION_CODE,REGION_DESC,UP_SMS_TIMES)
VALUES('200812','BJ','BEIJING',5)
insert into TB_MID_PAR_EXT_USER_MON(DEAL_DATE,REGION_CODE,REGION_DESC,UP_SMS_TIMES)
VALUES('200812','BJ','BEIJING',19)
---- CREATE TABLE TB_CDE_SMS_LVL
create table TB_CDE_SMS_LVL
SMS_LVL_CODE INTEGER,
SMS_LVL_DESC VARCHAR2(20),
SMS_MIN NUMBER(14,2),
SMS_MAX NUMBER(14,2)
--INSERT SAMPLE DATA TO TB_CDE_SMS_LVL
INSERT INTO TB_CDE_SMS_LVL(SMS_LVL_CODE,SMS_LVL_DESC,SMS_MIN,SMS_MAX)
VALUES(1,'0 ITEM',-1.00,0.00)
INSERT INTO TB_CDE_SMS_LVL(SMS_LVL_CODE,SMS_LVL_DESC,SMS_MIN,SMS_MAX)
VALUES(2,'0-20 ITEM',0.00,20.00)
INSERT INTO TB_CDE_SMS_LVL(SMS_LVL_CODE,SMS_LVL_DESC,SMS_MIN,SMS_MAX)
VALUES(3,'20-40 ITEM',20.00,40.00)
INSERT INTO TB_CDE_SMS_LVL(SMS_LVL_CODE,SMS_LVL_DESC,SMS_MIN,SMS_MAX)
VALUES(4,'40- ITEM',40.00,9999999.00)
--NOW,LET'S EXEC THE FOLLOWING STATEMENT
SELECT REGION_CODE,REGION_DESC
,MAX(CASE WHEN SUM(UP_SMS_TIMES) BETWEEN T2.SMS_MIN AND T2.SMS_MAX THEN T2.SMS_LVL_CODE END) AS SMS_LVL
FROM PMID.TB_MID_PAR_EXT_USER_MON T1,PCDE.TB_CDE_SMS_LVL T2
WHERE DEAL_DATE='200811' AND UP_SMS_TIMES>0
GROUP BY REGION_CODE, REGION_DESC
--MY REQUIRED RESULT IS
REGION_CODE REGION_DESC SMS_LVL
SH SHANGHAI 2
BJ BEIJING 4
Thanks you!

Similar Messages

  • SELECT CASE WHEN not working?

    Hello, can't figure out why the following statement continues to return NULL values and seems to not recognize my case when portion?...
    INSERT tbl_Main
    select OrderID
     ,(select
      case
       when (b.OrderValue is null or b.OrderValue = '') then 'Y'
       else b.OrderValue
      end
     from tbl_OrderDetails b where b.OrderID = a.OrderID and b.DetailID = '7')
    AS OrderStatus
    from tbl_Order a
    Thanks in advanced.

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    1. The use of the “tbl-” prefix is a design flaw called “tibbling” and people will laugh at you for it. 
    2. Do not nest selects inside a select list; the performance stinks. 
    3. Why do you think “A”, "D” etc are good aliases that will make maintaining this code easier? Noobs do this is match the names of tape drives on old hardware! 
    4. Why do you think that treating a NULL and an empty string as the same is a good idea? Use a CHECK (order_value <> ''). 
    My guess is you could write this instead: 
    INSERT INTO Orders
    SELECT order_id, COALESCE (D.order_value, 'Y') AS order_status
     FROM Order_Details AS D 
    WHERE D.order_id = Orders.order_id 
      AND D.detail_id = '7')
    AS order_status; 
    But this still smells bad. A status is a state of being so it has a temporal component. Order details do not usually have an id; the item identifier (EAN, UPC, SKU, or whatever) is used. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to avoid data repetation when using select statements with innerjoin

    how to avoid data repetation when using select statements with innerjoin.
    thanks in advance,
    satheesh

    you can use a query like this...
      SELECT DISTINCT
             frg~prc_group1                  "Product Group 1
             frg~prc_group2                  "Product Group 2
             frg~prc_group3                  "Product Group 3
             frg~prc_group4                  "Product Group 4
             frg~prc_group5                  "Product Group 5
             prc~product_id                  "Product ID
             txt~short_text                  "Product Description
    UP TO 10 ROWS
    INTO TABLE l_i_data
    FROM
    Joining CRMM_PR_SALESG and
    COMM_PR_FRG_ROD
    crmm_pr_salesg AS frg
    INNER JOIN comm_pr_frg_rod AS prd
    ON frgfrg_guid = prdfragment_guid
    Joining COMM_PRODUCT and
    COMM_PR_FRG_ROD
    INNER JOIN comm_product AS prc
    ON prdproduct_guid = prcproduct_guid
    Joining COMM_PRSHTEXT and
    COMM_PR_FRG_ROD
    INNER JOIN comm_prshtext AS txt
    ON prdproduct_guid = txtproduct_guid
    WHERE frg~prc_group1 IN r_zprc_group1
       AND frg~prc_group2 IN r_zprc_group2
       AND frg~prc_group3 IN r_zprc_group3
       AND frg~prc_group4 IN r_zprc_group4
       AND frg~prc_group5 IN r_zprc_group5.
    reward it it helps
    Edited by: Apan Kumar Motilal on Jun 24, 2008 1:57 PM

  • I can't seem to use the 'Check seats' link on Delta when I use Firefox but Safari works fine. I get the message 'not available at this time' when using Firefox but when I go to Safari it works fine.

    I can't seem to use the 'Check seats' link on the Delta Airlines site when I use Firefox but Safari works fine. I get the message 'not available at this time' when using Firefox but when I go to Safari it works fine. I love Firefox but this sucks!

    That issue can be caused by corrupted cookies.
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Firefox > Preferences > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox > Preferences > Privacy > Cookies: "Show Cookies"
    *http://kb.mozillazine.org/Cookies

  • Error creating view with CASE -- WHEN statement in SQL*Plus

    I am using Oracle 8i 8.1.7
    I have an Oracle view which uses CASE...WHEN statements.
    The view compiles fine in DBA studio.
    Using TOAD I saved the view as an *.sql file.
    However, when I try to create the view in SQL*Plus I get the following error:
    SP2-0734: unknown command beginning "CASE WHEN ..." - rest of line ignored.
    According to the documentation CASE -- WHEN has been implemented since since Oracle 8i rel. 2 (8.1.6)

    Well I'm using 8.1.6.3 and CASE and DECODE both work for me:
    SQL> create or replace view v_accs as select account_name, txn,
    2 decode(credit, 0, 'DB', 'CR') t_type
    3 from accs;
    View created.
    SQL> select * from v_accs;
    ACCOUNT_NA TXN T_
    APC 1 DB
    ABC 2 DB
    HJJ 3 DB
    HJH 4 CR
    HJK 5 CR
    APC 6 DB
    APC 7 DB
    ABC 8 DB
    ABC 9 DB
    HJJ 10 DB
    HJJ 11 DB
    HJH 12 DB
    HJH 13 DB
    HJK 14 DB
    HJK 15 CR
    15 rows selected.
    SQL> create or replace view v_accs as select account_name, txn,
    2 case when credit = 0 then 'DB' else 'CR'end as t_type
    3* from accs
    View created.
    SQL> select * from v_accs;
    ACCOUNT_NA TXN T_
    APC 1 DB
    ABC 2 DB
    HJJ 3 DB
    HJH 4 CR
    HJK 5 CR
    APC 6 DB
    APC 7 DB
    ABC 8 DB
    ABC 9 DB
    HJJ 10 DB
    HJJ 11 DB
    HJH 12 DB
    HJH 13 DB
    HJK 14 DB
    HJK 15 CR
    15 rows selected.
    SQL>
    rgds, APC

  • ORA-00904 when use column alias in Record Group Query

    Is it possible to use column aliases in Record Group Queries?
    I have a query that runs fine in SQL*Developer, but gives me runtime errors when I use it as a Record Group Query.
    When I use it as a Record Group Query, the Form compiles, but at runtime I receive the following errors:
    FRM-40502: ORACLE error: unable to read list of values
    when I use Help - Display Error, I see:
    ORA-00904:"CHILDNAME":invalid identifier
    The query is something like this
    select decode(complex stuff here) as "childname" ....
    I've tried it with and without the double quotes surrounding the alias name, and have also tried it without using the "as" keyword.
    I would appreciate any suggestions or insights. I'm using Forms 9.0.4.
    Thanks.

    It looks like this is caused by bug 725059:
    "FILTER BEFORE DISPLAY" DOESN'T WORK IF LOV HAS COLUMN ALIASES (TRIAGE1098)
    My LOV does have the Filter Before Display turned on. Here's the text of the bug:
    IF an LOV is created with column aliases in the select statement, (eg: select ename emp_name from emp) and the LOV property "Filter Before Display" is "Yes", THEN when you attempt to filter the LOV at runtime, (eg: type '%' then press the 'Find' button) the internal WHERE clause that forms sends to the database is: WHERE column_alias LIKE '%%' This is incorrect syntax. A client-side sqlnet trace shows this. The correct syntax should be: WHERE column LIKE '%%' . The incorrect syntax results in no rows returned. However no error is displayed by forms to the user.

  • Query runs forever when using selection on line item dim

    we have a cube zcube which has po number as a line item dimension .
    everymonth users run queries this cube using po number as selection
    criterai and using a wild card search on this field . every time
    queries have run fine . however , this month when we try to do so
    the query runs forever and no results are returned . i also tried
    listcubing with similar selection but it also did not return any results .
    our production system has lot of data . i tried in test system it worked fine
    i checked the cube for compression and indices in production , they look fine
    can anyone think of anything that could have gone wrong ? also did rsrv tests ..
    but all come green
    we have not done any developments on this cube , however we have shifted to
    a new hardware in the past month . can anyone think of any reasons ?
    anything that can help me catch the issue ? all suggestions welcome

    Not sure,
    Are you saying that you need both the counts seperately? or a combined count?
    how are you joining alpha and beta tables? what is the join condition?
    you need to do something like this,
    SELECT COUNT(CASE WHEN
                        (A.col1 = 'Pete' AND SUBSTR(A.col2,,1,12)=SUBSTR(B.col2,,1,13))
                     OR ( A.col1 != 'Pete' AND SUBSTR(A.col2,,1,15)=SUBSTR(B.col2,,1,15))
                    THEN 1 ELSE 0
                 END)
    FROM alpha A, beta b
    WHERE alpha.join_cloumn= beta.join_columnG.

  • Parallel sequence Hang when using Select string in CallBacks

    Hi,
    I have posted a problem yesterday explainig that my custom interface in C# was Hanging/Locked when using parallel executions. 
    => My application works fine when i run the sequences sequentially.
    So i have followed my investigations and i found the origin of the problem.
    In my application i use a special process model with 2 callbacks : 
    ProcessModelPreStep
    ProcessModelPostStep
    In these callbacks i had to look for a special step. So i write something like :
    SELECT RunState.Caller.Step.StepType.Name
    CASE "XXXXX"
    End
    CASE "YYYY"
    End
    End
    I do replace this syntax by :
    IF StrComp( RunState.Caller.Step.StepType.Name , "XXXXX" ) == 0
    End
    IF StrComp( RunState.Caller.Step.StepType.Name , "YYYY" ) == 0
    End
    And then the application hangs no more !!!! 
    This problem can be viewed directly with TestStand using a parallel processModel containing the callbacks with the select ....
    Here are 2 files which can reproduce the problem easily ...
    Manu.net
    Manu.net
    Attachments:
    ParallelModelWithCallBacks.seq ‏53 KB
    Wait10Time1Second.seq ‏7 KB

    Manu.net -
    From your sequence files, it looks like you're using TestStand 2010. I believe you might be running into Known Issue 276979 which was fixed in TestStand 2010 SP1.
    Hope this helps.
    Manooch H.
    National Instruments

  • Problem with table-indexes when using select-options in select

    Hello experts,
    is it right that table-indexes will not be used if you take select-options to select data from the database?
    in detail:
    i have build up an table-index for one of our db-tables and test it via an test-programm. The first test with '=' comparisons worked fine. Every key of the index was used; checked via ST05!
    e.g.:    SELECT * FROM TABLEA INTO ITAB WHERE keya = '1' AND keyb = '2' AND keyc = '3'.
    Now i startet the test with select-options
    e.g.:   SELECT * FROM TABLEA INTO ITAB WHERE keya IN seltabA  AND keyb IN seltabB AND keyc IN seltabC.
    First of all i just filled the seltabs with only 1 value:    eg:  seltabA=      SIGN = 'I'   OPTION = 'EQ'   LOW = '1'     etc.
    Everything worked fine. Every key of the index was used.
    But now, I putted more than one entries in the seltabs e.g.
    seltabA:      SIGN = 'I'   OPTION = 'EQ'   LOW = '1'
                       SIGN = 'I'   OPTION = 'EQ'   LOW = '2'   
                       SIGN = 'I'   OPTION = 'EQ'   LOW = '3'
    From now on, the indexed was not used completely (with all keys).
    Isn't that strange? How can i use select-options or sel-ranges with using the complete table-indexes?
    Thanks a lot,
    Marcel

    Hi Hermann,
    i hope this helps:
    this is the first one, which uses the complete index:
    SELECT                                                                     
      "KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,   
      "GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,    
      "HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,      
      "TERDAT"                                                                 
    FROM                                                                       
      "/dbcon/01_con"                                                       
    WHERE                                                                      
      "MANDT" = ? AND "LIFNR" = ? AND "ORGID" = ? AND "KOART_BASIS" = ? AND    
      "STATUS" = ? AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR "STATUS" = ? OR
      "STATUS" = ? )  WITH UR                 
    RESULT: 5 IXSCAN /dbcon/01_con05 #key columns:  4
    And the second one, which does not use the complete index! The 3 ranges are filled each with 2 values. Remember; when i fill them each with only one value, the result is the same as you can see above(/dbcon/01_con05 #key columns:  4):
    SELECT                                                                     
      "KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,   
      "GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,    
      "HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,      
      "TERDAT"                                                                 
    FROM                                                                       
      "/dbcon/01_con"                                                       
    WHERE                                                                      
      "MANDT" = ? AND "LIFNR" IN ( ? , ? ) AND "ORGID" IN ( ? , ? ) AND        
      "KOART_BASIS" IN ( ? , ? ) AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR 
      "STATUS" = ? OR "STATUS" = ? )  WITH UR                                  
    and here the access-plan
       0 SELECT STATEMENT ( Estimated Costs =  5,139E+01 [timerons] )                                                                               
    5     1 RETURN                                                                               
    5     2 NLJOIN                                                                               
    5     3 [O] TBSCAN                                                                               
    5     4 SORT                                                                               
    5 TBSCAN GENROW                                                                               
    5     6 <i> FETCH /dbcon/01_con                                                                               
    7 IXSCAN /dbcon/01_con05 #key columns:  2   
    As you can see, only 2 keys were taken for indexed selection!
    Any idea?
    Kind regards,
    MArcel
    Edited by: Marcel Ebert on Jul 28, 2009 5:25 PM

  • Query runs slower when using variables & faster when using hard coded value

    Hi,
    My query runs slower when i use variables but it runs faster when i use hard coded values. Why it is behaving like this ?
    My query is in cursor definition in a procedure. Procedure runs faster when using hard coded valus and slower when using variables.
    Can anybody help me out there?
    Thanks in advance.

    Hi,
    Thanks for ur reply.
    here is my code with Variables:
    Procedure populateCountryTrafficDetails(pWeekStartDate IN Date , pCountry IN d_geography.country_code%TYPE) is
    startdate date;
    AR_OrgId number(10);
    Cursor cTraffic is
    Select
              l.actual_date, nvl(o.city||o.zipcode,'Undefined') Site,
              g.country_code,d.customer_name, d.customer_number,t.contrno bcn,
              nvl(r.dest_level3,'Undefined'),
              Decode(p.Product_code,'820','821','821','821','801') Product_Code ,
              Decode(p.Product_code,'820','Colt Voice Connect','821','Colt Voice Connect','Colt Voice Line') DProduct,
              sum(f.duration),
              sum(f.debamount_eur)
              from d_calendar_date l,
              d_geography g,
              d_customer d, d_contract t, d_subscriber s,
              d_retail_dest r, d_product p,
              CPS_ORDER_DETAILS o,
              f_retail_revenue f
              where
              l.date_key = f.call_date_key and
              g.geography_key = f.geography_key and
              r.dest_key = f.dest_key and
              p.product_key = f.product_key and
              --c.customer_key = f.customer_key and
              d.customer_key = f.customer_key and
              t.contract_key = f.contract_key and
              s.SUBSCRIBER_KEY = f.SUBSCRIBER_KEY and
              o.org_id(+) = AR_OrgId and
              g.country_code = pCountry and
              l.actual_date >= startdate and
              l.actual_date <= (startdate + 90) and
              o.cli(+) = s.area_subno and
              p.product_code in ('800','801','802','804','820','821')
              group by
              l.actual_date,
              o.city||o.zipcode, g.country_code,d.customer_name, d.customer_number,t.contrno,r.dest_level3, p.product_code;
    Type CountryTabType is Table of country_traffic_details.Country%Type index by BINARY_INTEGER;
    Type CallDateTabType is Table of country_traffic_details.CALL_DATE%Type index by BINARY_INTEGER;
    Type CustomerNameTabType is Table of Country_traffic_details.Customer_name%Type index by BINARY_INTEGER;
    Type CustomerNumberTabType is Table of Country_traffic_details.Customer_number%Type index by BINARY_INTEGER;
    Type BcnTabType is Table of Country_traffic_details.Bcn%Type index by BINARY_INTEGER;
    Type DestinationTypeTabType is Table of Country_traffic_details.DESTINATION_TYPE%Type index by BINARY_INTEGER;
    Type ProductCodeTabType is Table of Country_traffic_details.Product_Code%Type index by BINARY_INTEGER;
    Type ProductTabType is Table of Country_traffic_details.Product%Type index by BINARY_INTEGER;
    Type DurationTabType is Table of Country_traffic_details.Duration%Type index by BINARY_INTEGER;
    Type DebamounteurTabType is Table of Country_traffic_details.DEBAMOUNTEUR%Type index by BINARY_INTEGER;
    Type SiteTabType is Table of Country_traffic_details.Site%Type index by BINARY_INTEGER;
    CountryArr CountryTabType;
    CallDateArr CallDateTabType;
    Customer_NameArr CustomerNameTabType;
    CustomerNumberArr CustomerNumberTabType;
    BCNArr BCNTabType;
    DESTINATION_TYPEArr DESTINATIONTYPETabType;
    PRODUCT_CODEArr PRODUCTCODETabType;
    PRODUCTArr PRODUCTTabType;
    DurationArr DurationTabType;
    DebamounteurArr DebamounteurTabType;
    SiteArr SiteTabType;
    Begin
         startdate := (trunc(pWeekStartDate) + 6) - 90;
         Exe_Pos := 1;
         Execute Immediate 'Truncate table country_traffic_details';
         dropIndexes('country_traffic_details');
         Exe_Pos := 2;
         /* Set org ID's as per AR */
         case (pCountry)
         when 'FR' then AR_OrgId := 81;
         when 'AT' then AR_OrgId := 125;
         when 'CH' then AR_OrgId := 126;
         when 'DE' then AR_OrgId := 127;
         when 'ES' then AR_OrgId := 123;
         when 'IT' then AR_OrgId := 122;
         when 'PT' then AR_OrgId := 124;
         when 'BE' then AR_OrgId := 132;
         when 'IE' then AR_OrgId := 128;
         when 'DK' then AR_OrgId := 133;
         when 'NL' then AR_OrgId := 129;
         when 'SE' then AR_OrgId := 130;
         when 'UK' then AR_OrgId := 131;
         else raise_application_error (-20003, 'No such Country Code Exists.');
         end case;
         Exe_Pos := 3;
    dbms_output.put_line('3: '||to_char(sysdate, 'HH24:MI:SS'));
         populateOrderDetails(AR_OrgId);
    dbms_output.put_line('4: '||to_char(sysdate, 'HH24:MI:SS'));
         Exe_Pos := 4;
         Open cTraffic;
         Loop
         Exe_Pos := 5;
         CallDateArr.delete;
    FETCH cTraffic BULK COLLECT
              INTO CallDateArr, SiteArr, CountryArr, Customer_NameArr,CustomerNumberArr,
              BCNArr,DESTINATION_TYPEArr,PRODUCT_CODEArr, PRODUCTArr, DurationArr, DebamounteurArr LIMIT arraySize;
              EXIT WHEN CallDateArr.first IS NULL;
                   Exe_pos := 6;
                        FORALL i IN 1..callDateArr.last
                        insert into country_traffic_details
                        values(CallDateArr(i), CountryArr(i), Customer_NameArr(i),CustomerNumberArr(i),
                        BCNArr(i),DESTINATION_TYPEArr(i),PRODUCT_CODEArr(i), PRODUCTArr(i), DurationArr(i),
                        DebamounteurArr(i), SiteArr(i));
                        Exe_pos := 7;
    dbms_output.put_line('7: '||to_char(sysdate, 'HH24:MI:SS'));
         EXIT WHEN ctraffic%NOTFOUND;
    END LOOP;
         commit;
    Exe_Pos := 8;
              commit;
    dbms_output.put_line('8: '||to_char(sysdate, 'HH24:MI:SS'));
              lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_CUSTNO ON country_traffic_details (CUSTOMER_NUMBER)';
              execDDl(lSql);
              lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_BCN ON country_traffic_details (BCN)';
              execDDl(lSql);
              lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_PRODCD ON country_traffic_details (PRODUCT_CODE)';
              execDDl(lSql);
              lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_SITE ON country_traffic_details (SITE)';
              execDDl(lSql);
              lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_DESTYP ON country_traffic_details (DESTINATION_TYPE)';
              execDDl(lSql);
              Exe_Pos:= 9;
    dbms_output.put_line('9: '||to_char(sysdate, 'HH24:MI:SS'));
    Exception
         When Others then
         raise_application_error(-20003, 'Error in populateCountryTrafficDetails at Position: '||Exe_Pos||' The Error is '||SQLERRM);
    End populateCountryTrafficDetails;
    In the above procedure if i substitute the values with hard coded values i.e. AR_orgid = 123 & pcountry = 'Austria' then it runs faster.
    Please let me know why it is so ?
    Thanks in advance.

  • Error while using selection option variable in the selection screen

    Hi All,
    I am facing an issue while using selection option variable in the selection screen for one of my reports.
    Scenario: For the field "Region From" we need to have wild card logic () in tes selection screen, for example if we put "BE" in the selection screen for the field Region From then the query should be executed only for those "Region From" values which begin from "BE".
    Approach: For the above requirement I have made a selection option variable for "Region From". This allows use wild card
    But when the report is executed we get the following error:
    "System error in program CL_RSR_REQUEST. Invalid filter on ETVRGNFR".
    (ETVRGNFR is technical name of the info object Region From)
    Though the report is executed it displays all the values for the field "Region From" irrespective of the selection given in the selection screen.
    Please give suggestions / alternate solutions to crack this issue.
    Thanks in advance
    Regards
    Priyanka.

    Hi,
    Try to use a variable of type Customer Exit and do the validation inside the exit to display according to your request.
    This is just my view, i am not sure if u are already using this or Char. Variable.
    Cheers.
    Ranga.

  • Repeated "Unknown error" messages using selection tools, CS5.1 Illustrator

    Installed a Creative suite 5.5 (Master) upgrade where Illustrator (like Photoshop) is renamed CS5.1. Getting repeated "unknown error" message when trying to select an object. I've reinstalled, trashed preference plists, repaired permissions. The annoying error is showing up under MacOS Snow Leopard 10.6.8 (including today's updated) and MacOs Lion.  Anyone else on Mac platform experiencing this issue with the Creative Suite 5.5 upgrade? If this can't be resolved soon I will uninstall this version and reinstall the CS5 suite version of Illustrator. But I really don't want to go there after shelling out for the upgrade. Thanks for any feedback.

    Adobe posted a troubleshooting document in Illustrator area:
    http://kb2.adobe.com/cps/824/cpsid_82414.html
    I read it thoroughly since I am still experiencing the popup error messages when using either selection tool on objects.  I did a uninstall and install of CS5.1 (CS5.1 for the suite 5.5 upgrade) and did not install the VectorScribe and XtreamPath 1.4 plugins. The "unplugged" Illustrator worked fine. I then installed VectorScribe -- no problems. Then XtreamPath 1.4 - voila the error popped up.
    Anyone else use XtreamPath 1.4 with Lion and had problems? I sent CSValley Support to ask if their plugin works under Lion (according to their system specs, it should).
    UPDATE  8-5-11:  (CSValley promptly replied back that they had not received any issues similar to mine.) 
    I installed both plugins (VectorScribe and XP 1.4) on my Macbook Pro and had no problems there which led me to think the XP plugin might be corrupted on my main work machine (MacPro). So I copied the plugin from the MBP to the MacPro and happily (knock on wood) am not getting the error messages.
    Somewhere along the way of installing the CS5.5 upgrade and MacOSLion, my XtreamPath plugin was affected.

  • Has anyone experienced the loss of audio when using Apple TV when it has been working fine?

    I can't get any audio through my reciever when using Apple TV. It's been working fine until a week ago. I've check my reciever, unplug the TV, and Apple TV as described but nothing. I switch to my Direct TV input and I can get audio when not using ATV. I've tried most everything I've read on blogs but nothing. One of those "pull your hair out" issues. Any direction would be appreciated. Thanks, Vince

    Hi there Vfall!
    I have some information for you that can help you troubleshoot this issue:
    If you can see video but can't hear sound
    If Apple TV is connected to a receiver, make sure the receiver is turned on.
    Make sure the input setting you've selected on your receiver matches the input you have your audio cables connected to. See the documentation that came with your receiver for more information.
    Make sure the volume on your TV or receiver is turned up and isn't muted.
    Check whether you can hear sound while playing video only. Also, check whether you can hear audio feedback while clicking through menu options.
    If you're connected to the HDMI port on your TV and Apple TV, make sure your TV supports audio through its HDMI port. The HDMI ports on some older TVs support only video.
    If you are using HDMI audio, try disconnecting and reconnecting the HDMI cable.
    If you're connected to the HDMI port on your TV and Apple TV, make sure your TV is setup to receive audio from HDMI. For some TV's this is automatic, but for others there is a choice between digital and analog (for HDMI audio, choose digital). Read more about HDMI audio.
    Try the other audio outputs on Apple TV to see if they work.
    If possible, try using different audio cables.
    This information is taken from the following article:
    Apple TV: Basic troubleshooting
    http://support.apple.com/kb/ht1551
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • Error while using select in decode

    i am trying following which is giving me error , can anybody suggest.
    select 1
    from emp e
    where e.qty > decode(e.code,'70',(select x.qty
    from QUANT q, EMP e
    where q.qty=e.qty)
    ,'40',(select 100 from dual));
    error Encountered the symbol "x" when expecting one of the following...

    once you find out what table alias that you will replace to your x.qty it's either q or e. you also migth want to consider replacing the subquery for '(select 100 from dual)' to simply 100.

  • Is there a way to differentiate from two iPod touches that are on the same iTunes acct when using iMessage? When one child sends a message the other gets it and it says it's from our email address.

    Both of my sons have iPod touches. I set them both up on my iTunes account. The problem we are having is when they are using iMessage. When one sends a message the other also receives it. The message is labeled as from my email address. Is there a way to differentiate the 2 iPods?

    See:
    MacMost Now 653: Setting Up Multiple iOS Devices For Messages and FaceTime

Maybe you are looking for

  • External Hardrive - from PC to Mac

    I recently got a Macbook and when I plugged in my external hard drive (used originally on my Toshiba) I am able to see all my files however when I wanted to transfer photo to the hard drive I am not able to. No pop-up messages just the circle with li

  • Graphic design & choice of display

    Hidy, I'm a novice graphic designer and seeking advice from designers. I would like to know what your vision is on the choice of a display for graphic design purposes. I heard a rumor that the LED-backlit displays aren't really useful for graphic des

  • Can I add a downloadable .pdf to an iWeb site?

    I would like clients to be able to download a document from my site.  Is this possible?

  • Loading caches from database for old application

    Hi, I clearly understand synchronization of DB with Coherence, if we do insert/update/delete records from both DB and Coherence, but as i understand this way is useful only if Coherence exists, from the time when the first record was created by Appli

  • Seagate keeps launching repeatedly in my Console

    I got rid of the Seagate Hard drive a year or so ago.  Thought I had deleted all the files, but for some reason I repeatedly get a lauch message in my console every few seconds.   Example: 9/17/13 1:26:12 AM com.apple.launchd[1] (com.seagate.TBDecora