Nested case

SEELCT ........FROM ............WHERE
SUB_CLASS_CD = (CASE
WHEN CUR_VAR.CLASS_CD = 11 THEN
(CASE WHEN CUR_VAR.SUB_CLASS_CD = 17
*CUR_VAR.SUB_CLASS_CD
ELSE NULL
END)
WHEN CUR_VAR.CLAS_CD = 60 AND CUR_VAR.SUB_CLASS_CD IN (20,42,62,83,88,89,91,92) THEN
CUR_VAR.SUB_CLASS_CD
WHEN CUR_VAR.CLASS_CD = 70 THEN
CASE WHEN CUR_VAR.SUB_CLASS_CD = 83
CUR_VAR.SUB_CLASS_CD
ELSE NULL
END
ELSE CUR_VAR.SUB_CLASS_CD
END)
This is showing error message i.e. keyword missing at * marked place.
Can any body suggest me?
thanks in advance.

Hi,
As SBH said, you left out the THEN keyword. The same thing happened in the 2nd nested CASE.
Always indent your code to show the structure of long expressions like this:
SUB_CLASS_CD = ( CASE
                       WHEN  CUR_VAR.CLASS_CD = 11
                THEN  ( CASE
                                WHEN  CUR_VAR.SUB_CLASS_CD = 17
                       THEN      CUR_VAR.SUB_CLASS_CD
                             ELSE  NULL
                     END
                WHEN  CUR_VAR.CLAS_CD = 60          -- Not class_cd (with 2 s's)?
                AND   CUR_VAR.SUB_CLASS_CD IN (20,42,62,83,88,89,91,92)
                THEN  CUR_VAR.SUB_CLASS_CD
                WHEN  CUR_VAR.CLASS_CD = 70
                THEN  CASE
                               WHEN  CUR_VAR.SUB_CLASS_CD = 83
                     THEN  CUR_VAR.SUB_CLASS_CD   -- THEN needed here, too
                     ELSE  NULL
                   END
               ELSE  CUR_VAR.SUB_CLASS_CD
          END
           )You can get the same results without nested CASE:
sub_class_cd = CASE
             WHEN  class_cd = 11 AND sub_class_cd     = 17     THEN  sub_class_cd
             WHEN  class_cd = 11                         THEN  NULL
             WHEN  class_cd = 70 AND sub_class_cd = 83     THEN  sub_class_cd
             WHEN      class_cd = 70                          THEN  NULL
                                                ELSE  sub_class_cd
            ENDThe test for class_cd = 60 (or clas_cd = 60) wasn't doing anything, so I removed it. If class_cd = 60, but sub_class_cd is in the list of special values, then sub_class_cd is returned by the THEN clause in the middle. If class_cd = 60, but sub_class_cd is not in the list of special values, then sub_class_cd is returned by the THEN clause at the end. Either way, sub_class_cd is returned, so why not do it just once, at the end?
You can also get the same results without CASE:
WHERE   (     class_cd     = 11
     AND  sub_class_cd != 17
OR        (     class_cd     = 70
     AND  sub_class_cd != 83
OR     class_cd     NOT IN (11, 70)

Similar Messages

  • How to create nested case when statement in OBIEE 11g?

    Hi All,
    I need to create a formula using nested case when statement. The formula to be created is below:
    =If([AWRV]<0; "<0";
    If([AWRV]=0; "0";
    If([AWRV]<=15; ">0 and <=15";
    If([AWRV]<=25; ">15 and <=25";
    If([AWRV]<=50; ">25 and <=50";
    If([AWRV]<=75; ">50 and <=75";
    If([AWRV]<=100; ">75 and <=100";
    If([AWRV]<=200; ">100 and <=200";
    If([AWRV]<=500; ">200 and <=500";
    If([AWRV]<=1000; ">500 and <=1000";
    If([AWRV]<=5000; ">1000 and <=5000";
    If([AWRV]<=10000; ">5000 and <=10000"; ">10000"))))))))))))
    How to recreate using Nested case when? I tried in many different ways but it is displaying syntax error in obiee11g. This is very critical. Can anybody shed light on this issue pls?
    Thanks in advance,
    Thenmozhi

    Honey26 wrote:
    Hi All,
    I need to create a formula using nested case when statement. The formula to be created is below:
    =If([AWRV]<0; "<0";
    If([AWRV]=0; "0";
    If([AWRV]<=15; ">0 and <=15";
    If([AWRV]<=25; ">15 and <=25";
    If([AWRV]<=50; ">25 and <=50";
    If([AWRV]<=75; ">50 and <=75";
    If([AWRV]<=100; ">75 and <=100";
    If([AWRV]<=200; ">100 and <=200";
    If([AWRV]<=500; ">200 and <=500";
    If([AWRV]<=1000; ">500 and <=1000";
    If([AWRV]<=5000; ">1000 and <=5000";
    If([AWRV]<=10000; ">5000 and <=10000"; ">10000"))))))))))))
    How to recreate using Nested case when? I tried in many different ways but it is displaying syntax error in obiee11g. This is very critical. Can anybody shed light on this issue pls?
    Thanks in advance,
    ThenmozhiTry the below:
    CASE WHEN "Fact - Open Chargeback"."Sub Chbk Amt" < 0 THEN ' <0'
    WHEN "Fact - Open Chargeback"."Sub Chbk Amt" = 0 THEN '0'
    WHEN "Fact - Open Chargeback"."Sub Chbk Amt" BETWEEN 0 AND 15 THEN '>0 AND <=15'
    END
    Hope this helps.

  • Nested CASE expressions in SQL Server 2008 R2

    Hi, For some reason when I use the below CASE expression in my SELECT statement I get duplicate records.
    CASE WHEN <Condition 1> THEN <Expression 1>
    WHEN <Condition 2> THEN <Expression 2>
    WHEN <Condition 3> THEN <Expression 3>
    WHEN <Condition 4> THEN <Expression 4>
    END AS CaseResult
    Also tried using coalesce with no luck. How to write a nested CASE expression which would yield just one expression. In case if I have to combine 2 different Expressions for 1 record, Is there a way to merge the 2 Expressions writing CASE
    expression something like below.
    STUFF ((SELECT ',' + CASE WHEN <Condition 1> THEN <Expression 1>
    WHEN <Condition 2> THEN <Expression 2>
    WHEN <Condition 3> THEN <Expression 3>
    WHEN <Condition 4> THEN <Expression 4>
    END
    FOR XML PATH(''), ROOT('MyString'), TYPE).value('/MyString[1]','VARCHAR(MAX)'), 1, 1,'') AS CaseResult
    --ResultSet
    CaseResult
    <Expression 1, Expression 2>
    I am using SQL Server 2008 R2. Thanks in advance.......
    Ione

    Hi, For some reason when I use the below CASE expression in my SELECT statement I get duplicate records. Also tried using coalesce with no luck. How to write a nested CASE expression which would yeild just one expression. In case if I have to combine 2 different
    Expressions for 1 record, Is there a way to merge the 2 Expressions writing CASE expression something like below in SQL Server 2008 R2.
    CASE WHEN <Condition 1> THEN <Expression 1>
    WHEN <Condition 2> THEN <Expression 2>
    WHEN <Condition 3> THEN <Expression 3>
    WHEN <Condition 4> THEN <Expression 4>
    END AS CaseResultSTUFF ((SELECT ',' + CASE WHEN <Condition 1> THEN <Expression 1>
    WHEN <Condition 2> THEN <Expression 2>
    WHEN <Condition 3> THEN <Expression 3>
    WHEN <Condition 4> THEN <Expression 4>
    END
    FOR XML PATH(''), ROOT('MyString'), TYPE).value('/MyString[1]'<span clas
    Ione

  • Having Trouble with nested Case Statements

    Hi Folks,
    I'm having trouble getting my head round nested case statements. For the life of me I cannot see what I'm missing here (unless my approach is all wrong).
    Any help much appreciated.
    Script:
    set serveroutput on format wrapped
    set feedback off
    set linesize 150
    DECLARE
    /* Set supported version here */
    ora_version VARCHAR2(4);
    unsupp_version EXCEPTION;
    /* Archive Log Info */
    db_log_mode VARCHAR2(12);
    BEGIN
    SELECT SUBSTR(VERSION, 1, 4)
    INTO ora_version
    FROM v$instance;
    SELECT log_mode
    INTO db_log_mode
    FROM v$database;
    CASE
    WHEN ora_version = '10.2' THEN
    DECLARE
    TYPE t_db IS RECORD(
    dflsh VARCHAR2(3),
    dcscn NUMBER);
    v_db t_db;
    BEGIN
    CASE
    WHEN db_log_mode = 'ARCHIVELOG' THEN
    EXECUTE IMMEDIATE 'SELECT INITCAP(flashback_on), current_scn FROM v$database'
    INTO v_db;
    DBMS_OUTPUT.PUT_LINE(' Flashback On : ' || v_db.dflsh);
    DBMS_OUTPUT.PUT_LINE(' Current SCN : ' || v_db.dcscn);
    DBMS_OUTPUT.PUT_LINE(' Log Mode : ' || db_log_mode);
    DBMS_OUTPUT.PUT_LINE(' Version : ' || ora_version);
    END;
    ELSE
    DBMS_OUTPUT.PUT_LINE(' Log Mode : ' || db_log_mode);
    DBMS_OUTPUT.PUT_LINE(' Version : ' || ora_version);
    END CASE;
    END;
    WHEN ora_version = '9.2' THEN
    DECLARE
    TYPE t_db IS RECORD(
    dcscn NUMBER);
    v_db t_db;
    BEGIN
    CASE
    WHEN db_log_mode = 'ARCHIVELOG' THEN
    EXECUTE IMMEDIATE 'SELECT current_scn FROM v$database'
    INTO v_db;
    DBMS_OUTPUT.PUT_LINE(' Current SCN : ' || v_db.dcscn);
    DBMS_OUTPUT.PUT_LINE(' Log Mode : ' || db_log_mode);
    DBMS_OUTPUT.PUT_LINE(' Version : ' || ora_version);
    END;
    ELSE
    DBMS_OUTPUT.PUT_LINE(' Log Mode : ' || db_log_mode);
    DBMS_OUTPUT.PUT_LINE(' Version : ' || ora_version);
    END CASE;
    END;
    ELSE
    RAISE unsupp_version;
    END CASE;
    EXCEPTION
    WHEN unsupp_version THEN
    DBMS_OUTPUT.PUT_LINE('');
    DBMS_OUTPUT.PUT_LINE(' Unsupported Version '||ora_version||' !');
    DBMS_OUTPUT.PUT_LINE('');
    END;
    set linesize 80
    set feedback on
    set serveroutput off
    Gives errors:
    END;
    ERROR at line 31:
    ORA-06550: line 31, column 7:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    case
    ORA-06550: line 37, column 1:
    PLS-00103: Encountered the symbol "WHEN"
    ORA-06550: line 50, column 28:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    case
    Edited by: milkyjoe on 28-Apr-2010 05:38

    Hi,
    Never write, much less post, unformatted code.
    Indent the code to show the extent of multi-line structures like BEGIN and CASE.
    For example:
    DECLARE
         /* Set supported version here */
         ora_version       VARCHAR2 (4);
         unsupp_version       EXCEPTION;
         /* Archive Log Info */
         db_log_mode      VARCHAR2 (12);
    BEGIN
         SELECT     SUBSTR(VERSION, 1, 4)
         INTO     ora_version
         FROM     v$instance;
         SELECT     log_mode
         INTO     db_log_mode
         FROM     v$database;
         CASE
             WHEN  ora_version = '10.2' THEN
              DECLARE
                  TYPE t_db IS RECORD(
                             dflsh     VARCHAR2(3),
                             dcscn      NUMBER);
                  v_db t_db;
              BEGIN
                  CASE
                      WHEN db_log_mode = 'ARCHIVELOG' THEN
                       EXECUTE IMMEDIATE 'SELECT INITCAP(flashback_on), current_scn FROM v$database'
                                           INTO v_db;
                       DBMS_OUTPUT.PUT_LINE(' Flashback On : ' || v_db.dflsh);
                       DBMS_OUTPUT.PUT_LINE(' Current SCN : ' || v_db.dcscn);
                       DBMS_OUTPUT.PUT_LINE(' Log Mode : ' || db_log_mode);
                       DBMS_OUTPUT.PUT_LINE(' Version : ' || ora_version);
                  END;
    ...The code above is what you posted, with some whitespace added.
    The error is much clearer; the last CASE statement concludes with END, but CASE blocks always have to conclude with END CASE .
    Why are you using a nested BEGIN block in the code above? Are you plannning to add an EXCEPTION handler later?
    When posting formatted text on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Sql 2008 nested case statement

    I have a question about understanding nested case statements in sql server 2008:
     The sql looks like the folloiwng:
     select numberofcases
      from inventory
      where inventory_cnt > 1000
      (when select top 1
        from inventory
         where  inventory_cnt > 750
      then  numberofcases = 750 * 30
      when select top 2
        from inventory
         where  inventory_cnt > 975
      then  numberofcases = 975 * 35
       when select top 3
        from inventory
         where  inventory_cnt > 1025
      then  numberofcases = 1025 / 10
      when select top 4
        from inventory
         where  inventory_cnt > 1050
      then  numberofcases = 1050 / 5) c * 2
       as casesused, select CustomerNumber from inventory
    I would like you to explain the following:
    1. There are 4 when statements. Will the logic hit each when statemnet or will the logic
       stop once the first when statement is true?
    2. Would you explain what the c* 2 means from the school listed above?

    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. 
     SELECT CASE 
            WHEN Inventory_cnt > 1050 THEN 1050 / 5
            WHEN Inventory_cnt > 1025 THEN 1025 / 10
            WHEN Inventory_cnt > 750 THEN 750 * 30
            WHEN Inventory_cnt > 975 THEN 975 * 35
            ELSE NULL END AS cases_used
     FROM Inventory;
    I would like you to explain the following:
    >> 1. There are 4 when statements. Will the logic hit each when statement or will the logic stop once the first when statement is true? <<
    This code is garbage, not SQL. CASE is an expression, not a statement. Expressions return a scalar value. Your are trying to do control flow! And the answer is that a CASE works this way
    1) look at the THEN clauses and determine the data type to use
    2) test each WHEN clause and execute the first one that tests TRUE in left to right order. 
    >> 2. Would you explain what the c* 2 means from the school listed above? <<
    Syntax error and more garbage code. 
    --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 create nested CASE statements in PL/SQL

    Can anyone please tell how to create Nested CASE statements in PL/SQL with proper syntax?
    It would be better if you can help with an example.
    Thank you!

    Something like this:
    SQL> set serveroutput on
    SQL> declare
      2    v1 number := 2;
      3    v2 varchar2(1) := 'C';
      4  begin
      5    case v1
      6      when 1 then dbms_output.put_line('First');
      7      when 2 then begin
      8                    case v2
      9                      when 'A' then dbms_output.put_line('Found A');
    10                      when 'B' then dbms_output.put_line('Found B');
    11                      when 'C' then dbms_output.put_line('Found C');
    12                      else dbms_output.put_line('NONE');
    13                    end case;
    14                  end;
    15      else dbms_output.put_line('Else');
    16    end case;
    17  end;
    18  /
    Found C
    PL/SQL procedure successfully completed
    SQL> If you have further doubts regarding syntax you can read the docs on the Case statement here:
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/case_statement.htm

  • Obiee nested case when statements

    Hi Obiee Experts, I need to retrieve amounts for 'last september' so i created a column using this case statement: case when MONTH(CURRENT_DATE) <= 9 then (YEAR(CURRENT_DATE) -1) * 100 + 9 END  --  now i want to retrieve the amount for last september using another case statemnt but i get a syntax err message, when i use: CASE WHEN (case when MONTH (CURRENT_DATE) <= 9 then (YEAR(CURRENT_DATE) -1) * 100 + 9 END) THEN "Fact123"."Net Obligation Amount" END ---- Any ideas how to resolve? I will be forever grateful - cheers, Elena

    Honey26 wrote:
    Hi All,
    I need to create a formula using nested case when statement. The formula to be created is below:
    =If([AWRV]<0; "<0";
    If([AWRV]=0; "0";
    If([AWRV]<=15; ">0 and <=15";
    If([AWRV]<=25; ">15 and <=25";
    If([AWRV]<=50; ">25 and <=50";
    If([AWRV]<=75; ">50 and <=75";
    If([AWRV]<=100; ">75 and <=100";
    If([AWRV]<=200; ">100 and <=200";
    If([AWRV]<=500; ">200 and <=500";
    If([AWRV]<=1000; ">500 and <=1000";
    If([AWRV]<=5000; ">1000 and <=5000";
    If([AWRV]<=10000; ">5000 and <=10000"; ">10000"))))))))))))
    How to recreate using Nested case when? I tried in many different ways but it is displaying syntax error in obiee11g. This is very critical. Can anybody shed light on this issue pls?
    Thanks in advance,
    ThenmozhiTry the below:
    CASE WHEN "Fact - Open Chargeback"."Sub Chbk Amt" < 0 THEN ' <0'
    WHEN "Fact - Open Chargeback"."Sub Chbk Amt" = 0 THEN '0'
    WHEN "Fact - Open Chargeback"."Sub Chbk Amt" BETWEEN 0 AND 15 THEN '>0 AND <=15'
    END
    Hope this helps.

  • HELP - Nested Case Question (Multiple Rows)

    OK, Now that the syntax has been corrected with the help of "Chanchal Wankhade" (Thank you very much!), I have an entirely new issue. I am sure this issue has to do with my case statement logic. I am getting multiple rows, when I am only looking for one. Here is my code:
    SELECT
      CASE
        WHEN EP.PHYSICAL_DATE IS NULL
        THEN
          CASE
            WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 365)
            THEN 'NEEDS PHYSICAL'
            WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 330)
            THEN 'COMING UP'
            ELSE 'No'
            END
        WHEN EP.PHYSICAL_DATE IS NOT NULL
        THEN
          CASE
            WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 365)
            THEN 'NEEDS PHYSICAL'
            WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 330)
            THEN 'COMING UP'
            ELSE 'No'
            END
      END "Needs Physical?"
    FROM AP AE
    LEFT JOIN EMP_PHYSICAL EP
    ON AE.EMP_ID = EP.EMP_ID
    LEFT JOIN POSITION_OFFERED PO
    ON AE.EMP_ID = PO.EMP_ID
    LEFT JOIN EMP_CONTRACT EC
    ON AE.EMP_ID         = EC.EMP_ID
    WHERE PO.ACTUAL_END IS NULL
    AND (EP.PHYSICAL     = 1
    OR EP.PHYSICAL      IS NULL)
    AND :P71_EMP_ID = AE.EMP_ID
    GROUP BY EP.PHYSICAL_DATE, EC.ORIGINAL_CONTRACT_START;The OUTPUT is:
    Needs Physical?
    Row 1 NEEDS PHYSICAL
    Row 2 No
    However, only one of these rows should be the output, which is "No". How do you get a nested case statement to evaluate to one result, instead of multiple? I'm quite sure it is in the logic. To spell it out, this is what I am trying to accomplish with the above code:
    If the "EP.PHYSICAL_DATE" is null, then use these sets of formula's to evalute the output, BUT if the "EP.PHYSICAL_DATE" is not null, then use these set's of formula's to evaluate the output.
    As it stands now, it appears as if my nested case statement is doing exactly what I told it to do, which is to evaluate both conditions, and output both.
    Any help would be appreciated. Thanks.
    Aqua
    Edited by: AquaNX4 on Mar 26, 2013 6:30 AM

    If you define your service_level as a table then it will be much easier.
    with service_level
    as
    select 'ALL' parent_lvl, 'Sergeant' srv_lvl from dual union all
    select 'ALL', 'Bonus I' from dual union all
    select 'ALL', 'Deputy Bailiff' from dual union all
    select 'ALL', 'Deputy Lockup' from dual union all
    select 'ALL', 'Deputy Bailiff Security' from dual union all
    select 'ALL', 'Custody Assistant' from dual union all
    select 'ALL', 'Security Officer' from dual union all
    select 'ALL', 'Security Assistant' from dual union all
    select 'ALL', 'Security Officer and Security Assistant' from dual union all
    select 'ALL', 'Private Security' from dual union all
    select 'All Deputies', 'Deputy Bailiff' srv_lvl from dual union all
    select 'All Deputies', 'Deputy Bailiff Security' from dual union all
    select 'All Deputies', 'Deputy Lockup' from dual union all
    select 'All Sworn', 'Sergeant' srv_lvl from dual union all
    select 'All Sworn','Bonus I' from dual union all
    select 'All Sworn','All Deputies' from dual union all
    select 'All Sworn','Deputy Bailiff' from dual union all
    select 'All Sworn','Deputy Lockup' from dual union all
    select 'All Sworn','Deputy Bailiff Security' from dual
    select *
      from in_service
    where rank IN (
              select srv_lvl
                from service_level
               where upper(parent_lvl) = upper(:SL)
                  or upper(srv_lvl) = upper(:SL)
                   )

  • Nested Case expression

    How many levels can i nest my CASE expression in a Update or any DML statement?

    Hi,
    Columns can have aliases; expressions that are just part of computing a column can't have aliases.
    If you could assign an alias, Oracle doesn't provide any way to reference it.
    If you need to reference an expression, make it a separate column, perhaps in a sub-query.

  • Nested CASE Statements in my SELECT of Query not calculating correctly

    Hi - Am doing simple query to calculate statistics on students per course, the WHERE includes a parameter for Academic Year, so need If Academic Year = x then calculate age in the 1st Sept of that Year, then count number of 19Yrs&Over. Have included my successful lines for sum of other data, in my CASE the calculations are not distinguishing whether age is over or under 19 just counting all. Presume is problem with Date calculation or CASE?? Runs without error..I'm guessing I can nest a CASE?!
    Many thanks!
    SELECT ......
    various fields bought through then
    count(p.PERSON_CODE) All_Enrolments,
    sum(DECODE(ru.FES_PROGRESS_CODE,'ACT',1,0)) Active,
    sum(DECODE(ru.FES_PROGRESS_CODE,'WNS',1,0)) NonStarter,
    sum(DECODE(ru.FES_PROGRESS_CODE,'WTH',1,0)) Withdrawn,
    sum(DECODE(ru.FES_PROGRESS_CODE,'TRN',1,0)) Transfers,
    sum(DECODE(la.completion,'2',1,0)) Completed,
    sum(DECODE(la.outcome,'1',1,0)) Achieved,
    sum(DECODE(p.sex,'F','1','0')) Female,
    sum(DECODE(p.sex,'M','1','0')) Male,
    SUM(
    CASE
    WHEN uio.CALOCC_OCCURRENCE_CODE='04'
    THEN
    CASE
    WHEN ((to_date('01-08-2004','dd-mm-yyyy')-to_date(p.date_of_birth,'dd-mm-yyyy'))/365.25)<'19'
    THEN '0'
    ELSE '1'
    END
    WHEN uio.CALOCC_OCCURRENCE_CODE='05'
    THEN
    CASE
    WHEN ((to_date('01-08-2005','dd-mm-yyyy')-to_date(p.date_of_birth,'dd-mm-yyyy'))/365.25)<'19'
    THEN '0'
    ELSE '1'
    END
    WHEN uio.CALOCC_OCCURRENCE_CODE='03'
    THEN
    CASE
    WHEN ((to_date('01-08-2003','dd-mm-yyyy')-to_date(p.date_of_birth,'dd-mm-yyyy'))/365.25)<'19'
    THEN '0'
    ELSE '1'
    END
    ELSE '0'
    END ) Over19sInc19
    FROM .......

    you can use this formula to check on the age:
    TRUNC(MONTHS_BETWEEN(to_date('01-08-2004','dd-mm-yyyy'),to_date(p.date_of_birth,'dd-mm-yyyy'))/12)hope this helps.

  • Please Help: Trouble with nested CASE statement and comparing dates

    Please tell me why the query below is always returning the bold null even when the start_date of OLD is greater than or equal to the start_date of NEW.
    What I want to do is get the difference of the start_dates of two statuses ( Start_date of OLD - Start_date of NEW) if
    1. end_date of NEW is not null
    2. start_date of OLD is greater than start_date of NEW
    else return null.
    select id,
    case when max(end_date) keep (dense_rank last order by decode(request_wflow_status,'New',1,0),start_date) is null then
    null
    else
              case when max(decode(status,'OLD',start_date,null)) > max(decode(status,'NEW',start_date,null))
              then max(decode(status,'OLD',start_date,null)) - max(decode(status,'NEW',start_date,null))
    else
    null
    end
    end result
    from cc_request_status where id =1
    group by id;

    Avinash,
    Thank you for your help.. Here is a more description of my problem..
    Here is a sample of data I have for a table with four columns (id,status,start_date,end_date)
    What I need to do is to get difference of the start dates of the maximum available dates, if data is valid. The pseducode is as follows:
    IF end_date of New status is null
    THEN return null
    ELSE
    IF start_date of old >= start_date of new
    THEN return (start_date of old - start_date of new)
    ELSE return null
    I used the following query but always return the bold null
    select id,
    (case when max(end_date) keep (dense_rank last order by decode(status,'new',1,0),start_date) is null then
    null
    else
              (case when max(decode(status,'old',start_date,null)) >=
              max(decode(status,'new',start_date,null))
              then max(decode(status,'old',start_date,null)) - max(decode(status,'new',start_date,null))
    else
    null
    end)
    end) result
    from tbl where id =1
    Based on the below sample, I expected to get the following result; 14-Mar-07 - 16-Feb-07 which is the difference of the maximum start_dates of the two statuses. However the query is not working.. Please help me.. Thank you..
    Id    Status    start_date      end_date
    1     new      03-Feb-07      07-Feb-07
    1     new      16-Feb-07      21-Feb-07
    1     old      '10-Mar-07      12-Mar-07
    1     old      '14-Mar-07      16-Mar-07

  • Building array within 2 nested fors and 2 nested cases

    Hi all,
    I can't seem to figure out why one of my arrays keeps getting reset.  What I need to do is disassemble my clusters one at a time check for an node address then packet and decode the hex data.  Data decodes will be different for every node.  When a node is decoded, I need to add that data to an array dedicated to that node.  When the entire cluster array is processed, the data will be dumped to different Excel sheets.  One sheet for each node on the system. This is a simplified version of a much larger program that will handle many nodes and lots of data.  Any help would be appreciated.
    --Mark
    Attachments:
    Building an Array 2 fors 2 case.vi ‏19 KB

    Your tunnels on the inner loop need to be shift registers as well.

  • My nested CASE WHEN THEN ELSE is not working.

    I'm working on a report that will provide a status on a component based on a defined Matrix.  The status to report is determined in a hierarchal fashion...the highest seqence number status existing is reported. 
    I've capped the sequence number at 10 (@SeqNumCap_sav)
    The matrix table is defined as such:
    CREATE TABLE [dbo].[tblAssyLineComponentStatusMatrix](
    [MatrixAssyLine] [char](1) NOT NULL,
    [MatrixComponentProduct] [char](15) NOT NULL,
    [MatrixComponentStatusSequence] [decimal](3, 0) NOT NULL,
    [MatrixComponentStatus] [char](3) NOT NULL,
    [MatrixStatusDescription] [nvarchar](100) NOT NULL,
    [MatrixReportedDescription1] [nvarchar](50) NOT NULL,
    [MatrixReportedDescription2] [nvarchar](50) NULL,
    [MatrixReportedDescription3] [nvarchar](50) NULL,
    [MatrixReportedDescription4] [nvarchar](50) NULL,
    [MatrixReportedDescription5] [nvarchar](50) NULL
    ) ON [PRIMARY]
    This is a sample of the tblAssyLineComponentStatusMatrix data:
    MatrixAssyLine MatrixComponentProduct MatrixComponentStatusSequence MatrixComponentStatus MatrixStatusDescription MatrixReportedDescription1 MatrixReportedDescription2 MatrixReportedDescription3 MatrixReportedDescription4 MatrixReportedDescription5
    E Mast/PullRod    1 W   The part has been stamped or welded. Class3PullRods NULL NULL NULL NULL
    E Mast/PullRod    2 P   The part has been clicked off in a paint hang station. TSMastPaintHang NULL NULL NULL NULL
    E Mast/PullRod    3 Y   The part has been clicked off in paint pulldown. TSMastPaintUnload NULL NULL NULL NULL
    the tblProductionControlComponentReporting is defined as:
    CREATE TABLE [dbo].[tblProductionControlComponentReporting](
    [WorkUnit] [nvarchar](15) NOT NULL,
    [Description] [nvarchar](50) NOT NULL,
    [Completed] [datetime] NOT NULL,
    [UserID] [nvarchar](30) NULL,
    [StationID] [nvarchar](30) NULL,
    [Undo] [bit] NULL,
    [CompletedUndo] [datetime] NULL,
    [UserIDUndo] [nvarchar](30) NULL,
    [StationIDUndo] [nvarchar](30) NULL,
    [ComponentPartNo] [varchar](15) NULL,
    [ComponentClass] [varchar](3) NULL,
    [ComponentQty] [decimal](6, 2) NULL,
    [ComponentScheduleDate] [datetime] NULL,
    [ComponentScheduleShift] [decimal](1, 0) NULL,
    [ComponentScheduleWorkunitSequence] [int] NULL,
    [ComponentComment] [varchar](200) NULL
    ) ON [PRIMARY]
    A sample of the tblProductionControlComponentreporting data:
    assyline WorkUnit Description Completed UserID StationID
    E 639422 Class3PullRods 2014-09-15 13:15:44.607 GLOBAL\agmesusr ag2100156
    E 639422 Class3PullRods 2014-09-15 13:15:44.607 GLOBAL\agmesusr ag2100156
    E 639422          TSFrameFabDeliver 2014-09-25 11:31:44.380 NULL MCA
    E 639422 TSMastPaintHang 2014-09-25 22:56:43.740 009932 AG2100294
    The problem is that the below code is returning multple records which is causing an error ... if I resequence the above Matrix table data where #3 becomes #10, 2 becomes #9 and 1 becomes #8, the query works fine - but this approach doesn't allow for easy
    expansion of the data.  Can anyone help me see the problem here?
    use eschedule
    declare @Workunit varchar(max)
    declare @SeqNumCap_sav dec(3, 0)
    set @WorkUnit='639422'
    set @SeqNumCap_sav= (select top 1 SequenceValueCap from tblAssyLineComponentStatusMatrix_SequenceCap order by SequenceValueCap)
    select
    Mast_PullRodStatus = case
    --Seq 10 Mast/PullRod Component Status
    when (select top 1 [description] from tblproductioncontrolcomponentreporting
    where ([description] = (select MatrixReportedDescription1 from tblAssyLineComponentStatusMatrix where MatrixComponentProduct='Mast/PullRod' and MatrixComponentStatusSequence=@SeqNumCap_sav and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))))
    and Workunit=@WorkUnit
    ) is not null
    then
    (select MatrixComponentStatus from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=@SeqNumCap_sav
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit)))
    --Seq 9 Mast/PullRod Component Status
    else case
    when (select top 1 [description] from tblproductioncontrolcomponentreporting
    where ([description] = (select MatrixReportedDescription1 from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-1)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))))
    and Workunit=@WorkUnit
    ) is not null
    then (select MatrixComponentStatus from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-1)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit)))
    --Seq 8 Mast/PullRod Component Status
    else case
    when (select top 1 [description] from tblproductioncontrolcomponentreporting
    where ([description] = (select MatrixReportedDescription1 from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-2)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))))
    and Workunit=@WorkUnit
    ) is not null
    then (select MatrixComponentStatus from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-2)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit)))
    --Seq 7 Mast/PullRod Component Status
    else case
    when (select top 1 [description] from tblproductioncontrolcomponentreporting
    where ([description] = (select MatrixReportedDescription1 from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-3)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))))
    and Workunit=@WorkUnit
    ) is not null
    then (select MatrixComponentStatus from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-3)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit)))
    --Seq 6 Mast/PullRod Component Status
    else case
    when (select top 1 [description] from tblproductioncontrolcomponentreporting
    where ([description] = (select MatrixReportedDescription1 from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-4)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))))
    and Workunit=@WorkUnit
    ) is not null
    then (select MatrixComponentStatus from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-4)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit)))
    --Seq 5 Mast/PullRod Component Status
    else case
    when (select top 1 [description] from tblproductioncontrolcomponentreporting
    where ([description] = (select MatrixReportedDescription1 from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-5)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))))
    and Workunit=@WorkUnit
    ) is not null
    then (select MatrixComponentStatus from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-5)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit)))
    --Seq 4 Mast/PullRod Component Status
    else case
    when (select top 1 [description] from tblproductioncontrolcomponentreporting
    where ([description] = (select MatrixReportedDescription1 from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-6)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))))
    and Workunit=@WorkUnit
    ) is not null
    then (select MatrixComponentStatus from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-6)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit)))
    --Seq 3 Mast/PullRod Component Status
    else case
    when (select top 1 [description] from tblproductioncontrolcomponentreporting
    where ([description] = (select MatrixReportedDescription1 from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-7)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))))
    and Workunit=@WorkUnit
    ) is not null
    then (select MatrixComponentStatus from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-7)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit)))
    --Seq 2 Mast/PullRod Component Status
    else case
    when (select top 1 [description] from tblproductioncontrolcomponentreporting
    where ([description] = (select MatrixReportedDescription1 from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-8)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))))
    and Workunit=@WorkUnit
    ) is not null
    then (select MatrixComponentStatus from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod' and MatrixComponentStatusSequence=(@SeqNumCap_sav-8))
    --Seq 1 Mast/PullRod Component Status
    else case
    when (select top 1 [description] from tblproductioncontrolcomponentreporting
    where ([description] = (select MatrixReportedDescription1 from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-9)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))))
    and Workunit=@WorkUnit
    --and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit))
    ) is not null
    then (select MatrixComponentStatus from tblAssyLineComponentStatusMatrix
    where MatrixComponentProduct='Mast/PullRod'
    and MatrixComponentStatusSequence=(@SeqNumCap_sav-9)
    and (MatrixAssyLine=(select assyline from tblProductionControlHeader h where h.workunit=@WorkUnit)))
    else ' '
    end
    end
    end
    end
    end
    end
    end
    end
    end
    end
    Assume Assyline='E'
    Eva Leggett

    Good job posting the DDL.
    Your example data should be in a table format though.
    DECLARE @tblAssyLineComponentStatusMatrix TABLE (MatrixAssyLine char(1) NOT NULL, MatrixComponentProduct char(15) NOT NULL, MatrixComponentStatusSequence decimal(3, 0) NOT NULL, MatrixComponentStatus char(3) NOT NULL, MatrixStatusDescription nvarchar(100) NOT NULL, MatrixReportedDescription1 nvarchar(50) NOT NULL, MatrixReportedDescription2 nvarchar(50) NULL, MatrixReportedDescription3 nvarchar(50) NULL, MatrixReportedDescription4 nvarchar(50) NULL, MatrixReportedDescription5 nvarchar(50) NULL)
    INSERT INTO @tblAssyLineComponentStatusMatrix (MatrixAssyLine, MatrixComponentProduct, MatrixComponentStatusSequence, MatrixComponentStatus, MatrixStatusDescription, MatrixReportedDescription1, MatrixReportedDescription2, MatrixReportedDescription3, MatrixReportedDescription4, MatrixReportedDescription5) VALUES ('E' ,'Mast/PullRod' ,1 ,'W' ,'The part has been stamped or welded. ','Class3PullRods ' ,NULL, NULL, NULL, NULL)
    INSERT INTO @tblAssyLineComponentStatusMatrix (MatrixAssyLine, MatrixComponentProduct, MatrixComponentStatusSequence, MatrixComponentStatus, MatrixStatusDescription, MatrixReportedDescription1, MatrixReportedDescription2, MatrixReportedDescription3, MatrixReportedDescription4, MatrixReportedDescription5) VALUES ('E' ,'Mast/PullRod' ,2 ,'P' ,'The part has been clicked off in a paint hang station. ','TSMastPaintHang ' ,NULL, NULL, NULL, NULL)
    INSERT INTO @tblAssyLineComponentStatusMatrix (MatrixAssyLine, MatrixComponentProduct, MatrixComponentStatusSequence, MatrixComponentStatus, MatrixStatusDescription, MatrixReportedDescription1, MatrixReportedDescription2, MatrixReportedDescription3, MatrixReportedDescription4, MatrixReportedDescription5) VALUES ('E' ,'Mast/PullRod' ,3 ,'Y' ,'The part has been clicked off in paint pulldown. ','TSMastPaintUnload ' ,NULL, NULL, NULL, NULL)
    DECLARE @tblProductionControlComponentReporting TABLE (WorkUnit nvarchar(15) NOT NULL, Description nvarchar(50) NOT NULL, Completed datetime NOT NULL, UserID nvarchar(30) NULL, StationID nvarchar(30) NULL, Undo bit NULL, CompletedUndo datetime NULL, UserIDUndo nvarchar(30) NULL, StationIDUndo nvarchar(30) NULL, ComponentPartNo varchar(15) NULL, ComponentClass varchar(3) NULL, ComponentQty decimal(6, 2) NULL, ComponentScheduleDate datetime NULL, ComponentScheduleShift decimal(1, 0) NULL, ComponentScheduleWorkunitSequence int NULL, ComponentComment varchar(200) NULL)
    INSERT INTO @tblProductionCOntrolComponentReporting (WorkUnit, Description, Completed, UserID, StationID) VALUES (639422, 'Class3PullRods', '2014-09-15 13:15:44.607', 'GLOBAL\agmesusr', 'ag2100156')
    INSERT INTO @tblProductionCOntrolComponentReporting (WorkUnit, Description, Completed, UserID, StationID) VALUES (639422, 'Class3PullRods', '2014-09-15 13:15:44.607', 'GLOBAL\agmesusr', 'ag2100156')
    INSERT INTO @tblProductionCOntrolComponentReporting (WorkUnit, Description, Completed, UserID, StationID) VALUES (639422, 'TSFrameFabDeliver', '2014-09-25 11:31:44.380', NULL, 'MCA')
    INSERT INTO @tblProductionCOntrolComponentReporting (WorkUnit, Description, Completed, UserID, StationID) VALUES (639422, 'TSMastPaintHang', '2014-09-25 22:56:43.740', '009932', 'AG2100294')
    Your code is a mess, it would take longer to untangle it that it would to solve your problem.
    Can you give us an expected output, and perhaps the rules governing what your case statement should be doing?

  • Nested Case Statement

    Hello,
    I need help implementing multiple Case Statements in a select statement. I can not get this to work in one statement.
    Select Statement
    select distinct
    allt.fk_jobcode_id as Job_Code,
    allt.fk_jobcode_descr as Classification,
    sum(allt.number_of_positions) as Number_Allotted,
    sum(number_of_positions) as Sum_Number_Allotted,
         dept.department_name|| ''||nvl2((CASE WHEN div.division_name <> 'N/A'
        THEN div.division_name 
      END),'/'||DIV.DIVISION_NAME||'',null) as Department_Division,
    allt.fund_type as Fund
    from tbl_allotment allt, tbl_department dept, tbl_division div
    where isdeleted <> 'Y'
    and ALLT.FK_DEPARTMENT_ID = dept.department_id
    and ALLT.FK_DIVISION_ID = div.division_id
    group by fk_jobcode_id, fk_jobcode_descr, fund_type, department_name, division_name
    HAVING (count(fk_jobcode_descr ) = 1)
    order by Classification asc, Department_Division asc1st CASE Statement combines the Department_Name and Division_Name values but does not display the Division_Name if the value is 'N/A'.
         dept.department_name|| ''||nvl2((CASE WHEN div.division_name <> 'N/A'
        THEN div.division_name 
      END),'/'||DIV.DIVISION_NAME||'',null) as Department_Division,value: Council Administrator's Office/Administration
    value: Council Administrator's Office/N/A will display as Council Administrator's Office
    I need to extend this now by using this CASE Statement, which displays the text 'Public Works' if the Department_Id = 00072.
         (CASE dept.department_id
         When '00072' then 'Public Works'
         Else dept.Department_Name
         End) as Department_Name, incorrect: Road Rehab Program/GLP Transportation Program Admin
    Should populate as: Public Works/GLP Transportation Program Admin
    select distinct
    allt.fk_jobcode_id as Job_Code,
    allt.fk_jobcode_descr as Classification,
    sum(allt.number_of_positions) as Number_Allotted,
    sum(number_of_positions) as Sum_Number_Allotted,
         dept.department_name|| ''||nvl2((CASE WHEN div.division_name <> 'N/A'
        THEN div.division_name 
      END),'/'||DIV.DIVISION_NAME||'',null) as Department_Division,
      (CASE dept.department_id
         When '00072' then 'Public Works'
        ELSE dept.Department_Name|| ''||nvl2((CASE WHEN div.division_name <> 'N/A'
        THEN div.division_name 
           END),'/'||DIV.DIVISION_NAME||'',null)
      END) as Department_Name1,
    allt.fund_type as Fund
    from tbl_allotment allt, tbl_department dept, tbl_division div
    where isdeleted <> 'Y'
    and ALLT.FK_DEPARTMENT_ID = dept.department_id
    and ALLT.FK_DIVISION_ID = div.division_id
    group by fk_jobcode_id, fk_jobcode_descr, fund_type, department_name, division_name, department_id
    HAVING (count(fk_jobcode_descr ) = 1)
    order by Classification asc, Department_Division ascbut once I modify the select statement I am only getting value 'Public Works' for Department_Division value. Does not populate the Division_Name data. Does anyone know how to combine these CASE Statements? Thanks for reading this Thread also.

    Hi,
    I think you want something like this:
    SELECT       ...
    ,       CASE
               WHEN  department_id = '00072'
               THEN  'Public Works'
               ELSE  dept.department_name
           END
           ||
           CASE
               WHEN  div.division_name != 'N/A'
               THEN  '/' || div.division_name
           END          AS department_name1
    ...Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Always say which version of Oracle you're using.

  • Case and decode - nested functions

    Can i use a case statement inside a decode or nvl2 function?
    eg.
    decode(col_a,'ABC',
    case when col_b in (1,2) then 'CCC' else when col_b in (3,4,5) then 'XXX' end
    , 'NA')
    Can i use a function like this basically, can i nest a case statement within a decode or nvl2 function?
    I have used nested decodes and nvls and nested case statements but not combined both so far.... so need an opinion...
    Thanks.
    Edited by: user254668 on Apr 30, 2010 1:35 PM

    user254668 wrote:
    Can i use a case statement inside a decode or nvl2 function? Absolutely. Just get rid of that else:
    decode(col_a,'ABC',
    case when col_b in (1,2) then 'CCC' when col_b in (3,4,5) then 'XXX' end
    , 'NA') SY.

Maybe you are looking for

  • Export to pdf not visible for some users

    Hi, I exported a dashboard to pdf (Xcelsius 2008, SP2), and sent it to other users. On my labtop the pdf works fine, but some of the users get only a blank page. They are asked if they want to run the contents of the file (so flash is working in gene

  • How to show an iview based on browser or portal language

    Is it possible to make an iview, page or workset visible for the user depending on the language he has logged on with? If he logs on with English an HTML document iview should be displayed, but if he logs on with the French language another iview sho

  • Regarding insertion of logo in standard forms

    Hi. How to find the form and print program for f.64 transaction.I need to upload the logo in that form. Please help to solve this problem.

  • Fonction VISA dans un .exe

    Bonjour, J'ai crée une application qui utilise les fonctions VISA pour communiquer via le port série. Lorsque je lance l'appli sur mon ordi ou est installer LabVIEW, il n'y a aucun probleme... Par contre que je veux lancer l'appli sur un autre ordi o

  • Encore CS5 freezes on "initiating transcoding" during startup

    At the moment I am a very frustrated Encore CS5 user.  Help. I cannot get Encore to open.  The program will start and when it gets to "initiating transcoding" it will become non responsive and the only way to stop it is to turn the power off on the c