Problem with CASE statements

Hi all

I have a calculation in a report of Discoverer Desktop with 29 instructions BOX and still 2 case statements more to add. The problem is that my report freezes and fails to run due to the excessive number of case statements. I need to put the 31 statemnts cases in the report, how do I do this? Is there another way to do it without causing the report to freeze?

Below is part of my instructions box just to show you what I'm doing:

CASE WHEN Ex = 'MM' AND THEN of OTHER NULL result (', ')
CASES WHERE Ex = "PP" AND result IN (40,35,30,25) THEN NULL OTHERWISE
CASE WHEN Ex = he's ' AND result IN (' a ',' B', 'C', d ') THEN NULL OTHERWISE
-CASE WHEN Ex = 'IO' AND THEN of OTHER NULL result ('Distinction', 'Merit')
-CASE WHEN Ex IN ('ZZ', 'WW', 'SS', 'KK') AND ('PASS', 'P') THEN to ANOTHER NULL result...

The last statement should be BOX WHEN... THEN NULL OTHERWISE 1 END END END END...

Help, please. Thank you.

Hello
You have reached the limit of characters in a calculation.

Try to set into a single statement as follows:

CASE WHEN Ex = 'MM' AND THEN of OTHER NULL result (', ')
WHEN Ex = "PP" AND as a result (40,35,30,25) THEN NULL OTHERWISE
WHEN Ex = he's ' AND result IN (' a ',' B', 'C', d ') THEN NULL OTHERWISE
WHEN Ex = 'IO' AND THEN of OTHER NULL result ('Distinction', 'Merit')
WHEN Ex IN ('ZZ', 'WW', 'SS', 'KK') AND ('PASS', 'P') THEN to ANOTHER NULL result...

The last statement should be BOX WHEN... THEN NULL OTHERWISE 1 END

Another option is to combine all the statements of NULL in a series of gold options like this:

BOX WHEN
(Ex = 'MM' AND the result in (', am')) OR
(Ex = "PP" AND result IN (40,35,30,25)) OR
(Ex = he's ' AND translated BY (' a ',' B', 'C', ')) OR
(Ex = 'IO' AND as a result ('Distinction', "according to merit")) OR
(Ex IN ("ZZ", "WW", "SS", "KK") AND result IN ('PASS', 'P')) THEN ANOTHER NULL...

Best wishes
Michael

Tags: Business Intelligence

Similar Questions

  • Problem with Case statement

    I try to use a case statement in a report of the Apex, but I get an error message.

    It comes to my sql

    CASE WHEN EXISTS (select stg.extkey, distsubtrpgrpid

    of udm_da da

    udm_di di

    udm_distsubtrpgrp stg

    where di.disttransgrpid = stg.disttransgrpid

    and da.daid = di.daid

    and da.suid = su.suid)

    THEN

    Select stg.extkey

    of udm_da da.

    udm_di di,

    udm_distsubtrpgrp stg

    where di.disttransgrpid = stg.disttransgrpid

    and da.daid = di.daid

    and da.suid = ' | Qul SUID. '

    Stg.extkey group, distsubtrpgrpid

    Union

    Select stg.extkey

    of stg udm_distsubtrpgrp

    where distsubtrpgrpid! = - 1

    and distsubtrpgrpid = ' | NVL (su.distsubtrpgrpid-1). '

    order by 1

    WHEN su.distsubtrpgrpid IS NOT NULL

    THEN

    Select stg.extkey, distsubtrpgrpid

    of stg udm_distsubtrpgrp

    where distsubtrpgrpid! = - 1

    and distsubtrpgrpid = ' | NVL (su.distsubtrpgrpid-1). '

    order by 1

    ON THE OTHER

    NULL VALUE

    END DISTSUBTRPGRP_1

    Any help appreciated

    Gus

    GusC wrote:

    Yes you are right.

    My sql must be

    CASE WHEN su.distsubtrpgrpid IS NOT NULL

    THEN

    Select stg.extkey, distsubtrpgrpid

    of stg udm_distsubtrpgrp

    where distsubtrpgrpid! = - 1

    and distsubtrpgrpid = su.distsubtrpgrpid

    ON THE OTHER

    NULL VALUE

    END DISTSUBTRPGRP_1

    But the report won't save

    Gus

    No, your SQL is not that.

    The select statement that you put online here, aside from being not not in brackets, is the selection of two values, but you can provide two values for the result column.

    Without knowing who the SQL statement, we can highlight only the obvious questions.

  • Problem with the State showed up in BB10

    Hello

    After the upgrade of my DevAlpha to the latest version, 10.0.9.1675, I have problems with 2-State buttons.

    Example code:

    #myBtn{
        background-image: url(btn/myBtn.png);
        background-repeat: no-repeat;
        background-position: 0px 0px;
    }
    #myBtn:hover{
        background-position: 0px -124px;
    }
    

    So, when I click the button it stay frozen until steady-state, does not return to the default position. All my apps of ww are affected by this problem.

    Anyone can attempt to reproduce this problem?

    If so, what is the solution?

    This is sort of the standard: hover behaviour I noticed in mobile browsers. Since then no cursor, hover is only simulated.

    The simplest solution (and the one I use in my projects) is to use: active instead of: hover.

    #myBtn:active{
        background-position: 0px -124px;
    }
    
  • problem with loop statement

    Hello

    I'm new in plsql, so I need your help. I am rewriting the existing plpgsql function plsql function, but I have an error on line 15: PLS-00103: encountered the symbol "LOOP" when expecting one of the following values:

    What is the problem with the LOOP statement?

    FUNCTION to CREATE or REPLACE dothework (service_name text string_value)

    RETURNS the text AS

    BEGIN

    DECLARE

    result text;

    varying (31) of tempId character;

    tempFieldId bigint;

    text of tempStringValue;

    tempCount bigint;

    BEGIN

    result = ";

    FOR IN tempId

    SELECT ce.id FROM mfc.card_element this

    WHERE the ce.name AS service_name

    LOOP

    tempCount = 0;

    SELECT INTO tempFieldId mfc.card_field CF field_id

    WHERE cf.field_name = 'NPAname ';

    SELECT INTO tempCount count (*) FROM mfc.card_element_field_value cefv

    WHERE the cefv.card_element_id AS a tempId AND field_id = tempFieldId;

    IF tempCount = 1 THEN

    UPDATE mfc.card_element_field_value

    SET field_string_value = string_value

    WHERE the card_element_id AS a tempId AND field_id = tempFieldId;

    result: = result | tempId | 'UPDATE - YES,';

    ELSIF tempCount = 0 THEN

    INSERT INTO mfc.card_element_field_value (id, field_date_value, field_integer_value, field_string_value, card_element_id, field_id)

    VALUES (HIBERNATE_SEQUENCE.nextval,

    NULL,

    NULL,

    string_value,

    tempId,

    tempFieldId);

    result: = result | tempId | "INSERT - YES, ';

    ON THE OTHER

    result: = result | tempId | "tempCount,";

    END IF;

    -END IF;

    END LOOP;

    RETURN result;

    END;

    END;

    I did the same refatoring I program you unit and put comments to help to understand.

    Let me know if it help you

    FUNCTION to CREATE or REPLACE dothework (service_name in VARCHAR2

    string_value IN VARCHAR2) RETURN VARCHAR2 AS

    -Not necessary to define the new block here BEGIN-

    -SAYS - you only need the instruction stated in this case if you

    -believe that he can raise one exceptional and you want to manage block outsider

    --

    -You must set the buffer of varchar2

    -32767 is the largest amount

    RESULT VARCHAR2 (32767).

    --

    -You can dock this type for the column type, you will receive the data

    tempfieldid card_field.field_id%TYPE;

    -tempstringvalue VARCHAR2; -you do not use this variable

    tempcount NUMBER;

    BEGIN

    -You don't need to initialize with NULL, in this case. PLSQL has done already for you

    -THE RESULT: = ";

    --

    -It seems to me that this request can be outside of the loop

    -Once the table is not the change and the predicate doenst change is

    SELECT field_id

    IN tempfieldid

    Card_field FC

    WHERE cf.field_name = 'NPAname ';

    --

    FOR tempid IN (SELECT ce.id

    OF card_element this

    WHERE the ce.name AS service_name) LOOP

    -It is not necessary to initialize this variable to zero

    -tempcount: = 0;

    --

    --

    SELECT COUNT (*)

    IN tempcount

    OF card_element_field_value cefv

    WHERE the cefv.card_element_id AS a tempid

    AND field_id = tempfieldid;

    --

    IF tempcount = 1 THEN

    UPDATE card_element_field_value

    SET field_string_value = string_value

    WHERE the card_element_id AS a tempid

    AND field_id = tempfieldid;

    RESULT: = RESULT | tempid | 'UPDATE - YES,';

    ELSIF tempcount = 0 THEN

    INSERT INTO card_element_field_value

    (id

    field_date_value

    field_integer_value

    field_string_value

    card_element_id

    field_id)

    VALUES

    (hibernate_sequence.nextval

    NULL

    NULL

    string_value

    tempid

    tempfieldid);

    RESULT: = RESULT | tempid | "INSERT - YES, ';

    ON THE OTHER

    -I remove the tempCount on the "because I think you want to see the number of records

    -you do business with

    RESULT: = RESULT | tempid | ' ' || tempCount | ', ';

    END IF;

    END LOOP;

    RETURN RESULT;

    -END;

    END;

    Best regards

  • Problem with case when try to alter the query from siimple

    Hello PL/SQL gurus and Experts.

    I'm stuck with a question (can be simple), but not gettings all headsway.
    select 365/day_num_yr Anul_Fact from Date where date_dt = trunc(sysdate -1) 
    value returns is as - 1.46

    need to write it in the form of case (I have to multiply it to some other outer query), I want to store variable ina and then use the same in an outside -.
    but when use the following syntax, then it always returns 0 and not the same output returned by the query above without the scabbard.
    select (case when date_dt =trunc(sysdate -1) then 365/day_num_yr else 0 END) Anul_Fact 
    Help kindly, I appericate your time and effort in advance.

    user555994 wrote:
    Problem is that I do not get the output as 1.46, even the output is coming like the 0 only if using the query - next

    select /*date_dt, sysdate - 1 prev_dt, trunc(sysdate - 1) trunc_prev_dt,*/
    case when date_dt = trunc(sysdate -1) then  365/day_num_yr
    else 0
    end num_day
    from date_dim;
    

    Completely, which seems to be a question of DATA. Have you checked if the table contains data for DATE_DT = SYSDATE - 1? Can you check if the data stored do not have hours and Minutes stored?

    Although I have provided examples of data, which is the same as the data in my main table and once I used the previous solution you provided and then also gives the result as same as those mentioned by you.

    I think it's something like -

    select date_dt, sysdate - 1 prev_dt, trunc(sysdate - 1) trunc_prev_dt,
    case when date_dt = trunc(sysdate -1) then  366/day_num_yr where day_num_yr=(select day_num_yr from date_dim where date_dt = trunc(sysdate -1))
    else 0
    end num_day
    from date_dim;
    

    Once we get the day_num_yr then he deviding by 366/day_num_yr :(
    but he does not like throwing an error ORA-95 - missing keyword

    Yes, it does not work

    -case when date_dt = trunc (sysdate-1) then 366/day_num_yr where day_num_yr = (select day_num_yr from the date_dim where date_dt = trunc (sysdate-1))

    due to a syntax of alien.
    I don't think that you really need. I already said, with the data in your Table, you will be having only * 1 * record with a Non - zero value. Thus, simply apply a filter to extract the corresponding record SYSDATE - 1 and you should get an output which is Non-zero. If you apply a where predicate, then would not need you a CASE statement. You can directly use something like below:

    select date_dt, sysdate - 1 prev_dt, trunc(sysdate - 1) trunc_prev_dt,
           365 / day_num_yr num_day
      from t4
     where date_dt = trunc(sysdate - 1);
    

    Published by: Jen K, September 7, 2012 16:00

  • Problem with Decode statement

    Hello

    I try to do the following in my report:

    If an employee is a family name. (dot) or a name of. (dot), the report does not display a point. An employee name consists of the family name, first name and middle name, which should all be concatenated sets. An attempt to achieve this goal, I have the following statement in my report:

    Decode (e.Surname, '.', (LTRIM (RTRIM ((INITCAP (e.FIRST_NAME))) |))) » '|| INITCAP (e.MIDDLE_NAME))),
    e.FIRST_NAME, '.', (LTRIM (RTRIM ((INITCAP (e.Surname))) |)) » '|| INITCAP (e.MIDDLE_NAME))),
    (LTRIM (RTRIM ((INITCAP (e.SURNAME))) | ',' |)) INITCAP (e.first_name) | » '|| INITCAP (e.MIDDLE_NAME))) as emp_name

    E employee

    Problem: The above statement only works for employees with the name of. (dot). It doesn't for the first names of dot. How to use the decode statement OR is there another way to do it without using the CASE statement?

    It seems my decode statement does not work with 2 different fields (name, first name) tested within the decode statement. Thank you.

    LTRIM and RTRIM the comma too:

    select rtrim(ltrim(rtrim(ltrim(', Somename ,',','),','))) Name
    from dual;
    
    NAME
    --------
    Somename
    
  • Problem with case

    What is the problem with the instruction box below. I have error when running. Can someone help me please. Thank you.
    SELECT CRR.ROUTE, CRR.PUBLICATION
     FROM  CIRC.CARRIER_ROUTE CRR, 
                     CIRC_RPT.VW_CARRIER_RATE_DRW VCRD 
                    WHERE CRR.PUBLICATION=VCRD.METHOD_PUB 
                         AND CRR.RATE_CODE=VCRD.RATE_CODE 
                        AND (case when  CRR.ROUTE IN('40011420','40012428') then VCRD.RATE_METHOD ='SBSTD' else VCRD.RATE_METHOD ='SCSTD'  END)

    Varun says:
    What is the problem with the instruction box below. I have error when running. Can someone help me please. Thank you.

    SELECT CRR.ROUTE, CRR.PUBLICATION
    FROM  CIRC.CARRIER_ROUTE CRR,
    CIRC_RPT.VW_CARRIER_RATE_DRW VCRD
    WHERE CRR.PUBLICATION=VCRD.METHOD_PUB
    AND CRR.RATE_CODE=VCRD.RATE_CODE
    AND (case when  CRR.ROUTE IN('40011420','40012428') then VCRD.RATE_METHOD ='SBSTD' else VCRD.RATE_METHOD ='SCSTD'  END)
    

    How can we help if we do not know the error?

    BTW, I find that a bit of discipline on alignment of code allows the readability

    SELECT CRR.ROUTE,
           CRR.PUBLICATION
    FROM CIRC.CARRIER_ROUTE CRR,
         CIRC_RPT.VW_CARRIER_RATE_DRW VCRD
    WHERE CRR.PUBLICATION=VCRD.METHOD_PUB
      AND CRR.RATE_CODE=VCRD.RATE_CODE
      AND (case when  CRR.ROUTE IN('40011420',
                                   '40012428')
                then VCRD.RATE_METHOD ='SBSTD'
                else VCRD.RATE_METHOD ='SCSTD'
           END)
    

    And now that I've lined it up, it sticks out... shouldn't the look of the CASE statement like this:

     AND (case when  CRR.ROUTE IN('40011420',
                                   '40012428')
                then 'SBSTD'
                else 'SCSTD'
           END)
    

    My personal rule is that each item in a list
    -the column names in a SELECT statement
    -a from the table names
    -the conditions in a WHERE clause)
    is listed on a separate line and aligned with the other elements in the list.

    But humans read your code don't care SQL.

  • Select problem with multiple statements

    I have a stored procedure where I create a table variable and then doing an insert and the problem I have is to separate my select statements that I use to insert into the table variable. I tried wrapping each select statement in parentheses and separating them by a comma; However, it does not either. I also tried aliasing the select statement with the same column name. I will be using the return on this stored procedure for a graph charting.

    Here's a SP and here is the error.


    The selection list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of columns in the INSERT.

    I try and rewrite in the form a single query using case statements. But the syntax that might work is

    insert into @SomeTable (col1, col2, col3)
    Select (select count (*) of @OtherTable).
    (select count (*) in @OtherTable),
    (select count (*) in @OtherTable)

    (> [TWO_RACES] [int] NULL)

    And it would be tall... everyone. LMAO

  • Problem with diagram State Toolkit 1.0 - LV 8.2 upgrade to 2014

    I'm in transition a large amount of code from Labview 8.2 to 2014, and I'm having a problem with state diagrams have been added using the state diagram Toolkit V1.0.

    The figure below shows the question, Labview knows the loop and its components are associated with a state diagram, but it option to change the schema, "change the state diagram," is not available.  In Labview 8.2, which I am currently running on older machines, I would simply select "Change the state diagram" and another window of each State and arrows between States appears, allowing the mounting of the diagram.

    I think I have to install the state diagram Toolkit V1.0 software, but it is no longer available on the Web site of NOR.  There are new States transitions module I installed, but it is significantly different from the old Toolbox and does not support.  Any recommendations?

    Thank you very much
    Phil

    Good news:

    (1) SDE still works with SP1 LV2014.

    (2) I have the installer and I'm ready to send it to you. Please send me a private message with your email address.

    Be sure to support this idea.

  • Select with case statement and a formula of the IIR

    Hi, I was looking to get help regarding a statement writing box with a statement select statement all. I tried to reproduce a formula IIf access well that just wanted to check that the query I wrote is correct, any advice would be appreciated.

    [code]

    Select *.

    Of

    (

    Select name, month, duration, volume, time_spent, date1, date2,.

    -case when 'date' > = 'date1' then '1' other '0' end as departure,.

    -case when 'date' < = "date2" then '1' other '0' as end ending

    Of

    (

    Select *.

    of call_1 cd

    inner join call_2 ON cd.name = cl.queue cl

    )

    )

    ;

    [/ code]

    I want to know is where I have my ' select name, etc, I would change that to select * to make it easier instead of typing all the field_names outside, but I don't know how to do and also what follows is 2 IIF formulas from an access database for the start of the final case statements so I just wanted check I wrote it correctly.

    [code]

    departure: IIf ([date] > = [date1], 1, 0)

    [/ code]

    [code]

    ending: IIf ([date] < = [date2], 1, 0)

    [/ code]

    Any advice would be appreciated.

    Hello

    Whenever you have any questions, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.
    Explain, using specific examples, how you get these results from these data.

    If the output depends on what anyone outside the application itself (for example, when it is run) and then include a few different examples and the results you want of each given the same sample data. For example, "if I run on November 19, 2013, while the results should be... because... but if I run between November 21 and November 27, then the results should be... because...". »
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

    318f20b8-a3d0-4FB4-bb0f-73785250b7d4 wrote:

    Hi, I was looking to get help regarding a statement writing box with a statement select statement all. I tried to reproduce a formula IIf access well that just wanted to check that the query I wrote is correct, any advice would be appreciated.

    [code]

    Select *.

    Of

    (

    Select name, month, duration, volume, time_spent, date1, date2,.

    -case when 'date' > = 'date1' then '1' other '0' end as departure,.

    -case when "date."<= 'date2'="" then="" '1'="" else="" '0'="" end="" as="">

    Of

    (

    Select *.

    of call_1 cd

    inner join call_2 ON cd.name = cl.queue cl

    )

    )

    ;

    [/ code]

    I want to know is where I have my ' select name, etc, I would change that to select * to make it easier instead of typing all the field_names outside, but I don't know how to do and also what follows is 2 IIF formulas from an access database for the start of the final case statements so I just wanted check I wrote it correctly.

    [code]

    departure: IIf([date]>=[date1],1,0)

    [/ code]

    [code]

    ending: IIf ([date]<>

    [/ code]

    Any advice would be appreciated.

    DATE is not a function of Oracle; in fact, it's a terrible name for a column or function, because it blends with the DATE data type.

    In Oracle, the function SYSDATE returns the date and time, according to the clock on the database server.  So, SYSDATE can return a value as November 19, 2013 06:33:15.   If you want to midnight the same day (i.e., November 19, 2013 00:00:00) and then use TRUNC (SYSDATE).

    String literals (for example the string which consists 5 characters d, a, t, e, and 1) go inside the single quotes. Numbers and the names of columns only.

    If you want to include all the columns, more some calculated values, in a SELECT clause, then you must use a name table or alias before the *.  (See select_2 below.  To do this, assign the alias j to display online.)

    Maybe you wanted to say something like:

    Select *-it's select_1

    de)

    Select j. *-it's select_2

    , case when SYSDATE > = date1 then 1 or 0 end as departure

    , case when SYSDATE<= date2="" then="" 1="" else="" 0="" end="" as="">

    de)

    Select *-it's select_3

    of call_1 cd

    inner join call_2 ON cd.name = cl.queue cl

    ) j

    )

    ;

    As mentioned in a previous answer, you should be careful about the use of "SELECT *" in production code.

    In select_3, it would be better if you explicitly listed the columns you need.  It can improve efficiency and maintenance.  In this request, queue and the name will be always the same, so you probably don't want to include both of them in the result set, in any case.

    In select_1 and select_2, it is acceptable to use "SELECT *", assuming that select_3 is fixed.

    Moreover, there is no point in using subqueries here.  You can get the same results simply in a single query, without any subqueries.

  • problem with if statement

    I have problem with this code haven. It shows error illigical use of the else statement. I checked the syntax is at but I don't where is my problem

    I have a drop drop list box. If the user selects objects in textfields txt_contract1 & txt_contract2 of named values has the new change.iam of java script. is it possible to programmetically edit from vb.net. IAM familiar with it.

    DataRoot. Transmittal_pdf. DropDownList1::click - (JavaScript, client)

    If

    (xfa.event.newText == 'Strategic') { }

    XFA. Form.DataRoot._Transmittal_pdf.

    DataRoot._Transmittal_pdf. Table5.row2.txt_contract1. Value

    = "Blueprint of strategic roads."

    DataRoot._Transmittal_pdf. Table5.row2.txt_contract2. Value

    = "These immediate plans."

    }

    on the other

    {

    DataRoot._Transmittal_pdf. Table5.row2.txt_contract1. Value

    = "Held consultation projects;

    DataRoot._Transmittal_pdf. Table5.row2.txt_contract2. Value

    = "";

    }

    Hi Prasad,

    'V' should be in the rawValue capital 'V' instead of small "v". So, it should be rather than rawvalue rawValue.

    Thank you

    Sidonie.

  • Problem with CASE expressions

    Using Oracle 10 g R2, plsql in SQL Developer (or TOAD). I have a question 'simple' with the criteria 'complicated' in where clause.
    So, it's something like this:

    Select the fields in a table
    where stuff like Upper(:CategoryId) | '%'
    and sub_category_id like Upper(:SubCategory). '%'
    and order_date > =: StartDate
    and order_date < =: EndDate
    and division_id =: Division

    Up to this point, the query works fine. Here is where is the problem:
    If there is a value in the following parameter field, it works very well, but it is possible that the parameter is null, then I have to test for this first, and if it is empty (or even assigned a 'false' value) then it must restore all settings. The following parameter field is titled: SKU. The reason why I do this first place is to spend several values in a field of single parameter - comma which is great as long as there is some values...

    (This works with the above)
    and INSTR (Upper(:SKU), table.sku) > 0

    And I have a similar problem with another field in the table entitled: catalogue and as: SKU, it works very well if there is at least one input value.

    What I tried (who doesn't) is therefore:
    and as table.sku (BOX WHEN: SKU = '1' AND '%')
    Of OTHER INSTR (Upper(:SKU), table.sku) > 0
    END CASE)
    Same thing with the catalog:
    and as table.catalog (BOX WHEN: catalog = '1' AND '%')
    Of OTHER INSTR (Upper(:Catalog), table.catalog) > 0

    There must be a way to make this work. I will be grateful for any suggestions that would help in my situation.

    What is

    select s.sku,
            s.std_cost_ea,
            s.unit_price,
            o.QUANTITY,
            o.order_no,
            o.order_line
    from f21.ffct_offer_product_sku s
    inner join f21.fmkt_order_detail o
           on s.sku = o.sku
           and s.company_id = o.company_id
           and s.division_id = o.division_id
           and s.offer_id = o.offer_id
           and s.offer_year = o.offer_year
    where s.category_id like Upper(:CategoryId) || '%'
    and s.sub_category_id like Upper(:SubCategory) || '%'
    and instr(Upper(nvl(:SKU,s.sku)), s.sku) > 0
    and instr(Upper(nvl(:Offer,s.offer_id), s.offer_id) > 0
    and o.order_date >= :StartDate
    and o.order_date <= :EndDate
    and s.division_id = :Division
    and s.version_no = 0
    
  • What is the problem with that statement?

    on exitFrame me
    case, the text of the Member "meter."
    "05": relaxation
    '10': relaxation
    '15': relaxation
    '20': relaxation
    '25': relaxation
    cases of termination
    go part
    end

    the trigger
    Open 'C:\b.exe '.
    end

    I can make it work like an if statement but not as a case statement that I prefer?

    Thank you!

  • problem with if statements

    Hi, im having trouble changing the X translation on a label with an if statement, the application quits when joining the change of text in my case, here are my code

    Label {
                    visible: true
                    id:battery
                    text: ""
                    translationY: 45
                    translationX: -33
                    textStyle.fontWeight: FontWeight.W400
                    textStyle.fontSize: FontSize.PointValue
                    textStyle.fontSizeValue:7
                    horizontalAlignment: HorizontalAlignment.Right
                    textStyle.textAlign: TextAlign.Left
    
                    onTextChanged: {
                        if (_battery.level = 100){
                           translationXChanged(-27)
                        }
                    }
    

    and _battery object

    BatteryInfo {
                id: batteryinfo
                onLevelChanged: {
                    battery.text = level + "%"
                }
            }
    

    any suggestions?

    Hmm, like others on this forum, you seem to confuse in the difference between the assignment and comparison.

    A unique = means assign the value on the right to the left object/variable.

    A double == means compare the object on the right with the object on the left.

    Your if statement will return true as you actually ask the if statement if you can assign a value of 100 to a variable.  However the battery level can be read only so the crash.

    @greenmr I see you thinking should I put a more technically accurate explanation and also mention = but please don't let's keep things simple.

  • Insert the problem with the statement

    case 1:

    declare
    Start
    Insert into t4 values (1);
    commit;
    Insert into t4 values ('test');
    commit;
    end;

    invalid value 1 of 1 line inserted with no identifier;

    case 2:

    declare
    Start
    Insert into t4 values (1);
    commit;
    Insert into t4 valuess ('test');
    commit;
    end;

    any line not inserted value 1 with invalid identifier;

    question is why difference between over case

    Hello

    Jhon says:

    Thnaks for the previous comment.

    Update Q4 set c1 = c1 * 2;   Why this statement fail while we and rename c32 column c1-exceute immediate statement

    If, at the time of compilation, the single column of the table is c3, the UPDATE statement will not compile.  So really, you must change the name of column in PL/SQL, then use EXECUTE IMMEDIATE to do the UPDATE.

    This is an example of why create or modify tables in PL/SQL is a bad idea.

Maybe you are looking for