Using the Combobox options in the case of statements
If anyone can help me I would be really grateful. I am building a calculator to do something specific. I have a combobox with 2 options. The option determines the equation which is therefore performed on a figure of entry into the next area. I have my if statement, I don't know how to code the option of the combobox. Here's what I have so far:
calc_btn.addEventListener (MouseEvent.CLICK, calcClick);
rvalue. Border = true;
rvalue. Restrict = "0-9";
var rateablevalue:String;
var calcRes:Number;
function calcClick(event:MouseEvent):void {}
rateablevalue = rvalue.text;
if (cb1 == {label: "3 month"}) {}
calcRes = parseInt (rateablevalue) / 100 * 8.625;
calcRes.toString ();
results_txt.text = String (calcRes);
{ } ElseIf (cb1 == {label: "6 month"}) {}
calcRes = parseInt (rateablevalue) / 100 * 17.25;
calcRes.toString ();
results_txt.text = String (calcRes);
}
}
Anyone see where I am going wrong with combobox (cb1)?
Thank you very much in advance to take a peek.
Your conditional statements are not piloted the ComboBox selection if this is the intention. Try to change the t
o the shape of...
If (cb1.selectedItem.label == "3 months") etc...
Tags: Adobe Animate
Similar Questions
-
How to use the case and decode to extract data
Hello gurus of PL/SQL,.
I use Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64-bit Production version
I have a table in the following form-
certain conditions of extraction are as follows-drop table TT2; create table TT2(College, Class,gender,status,fees) as select 'IITB','MBA','M','P',255600 from dual union all select 'IITK','MTech','M','P',300000 from dual union all select 'IITD','MBA','F','P',450000 from dual union all select 'IITKH','MBA','F','P',350000 from dual union all select 'IITC','MTech','F','P',420000 from dual union all select 'IITB','MTech','M','P',185000 from dual union all select 'IITC','MTech','M','P',235000 from dual union all select 'IITD','MBA','F','F',175000 from dual union all select 'IITM','MBA','M','F',257000 from dual union all select 'IITKH','MTech','F','P',335000 from dual union all select 'IITD','MBA','F','P',540335 from dual union all select 'IITC','MBA','F','F',125089 from dual union all select 'IITD','MTech','M','P',290756 from dual union all select 'IITM','MBA','M','P',200000 from dual union all select 'IITKH','MBA','F','F',534990 from dual union all select 'IITD','MBA','F','P',221000 from dual ;
MATTER OF STATE
College of 'IITB' and status = 'P'-'good WestRegion '.
College of 'IITC' and status = 'P'-'good SouthRegion '.
College 'IITD' and 'IITK' and status = 'P' and type = 'F' - 'female NothRegion spent.
College not in 'IITK' and status = 'F' - 'Ex Kanpur Failed'
Results-
Used SQLRegion Statnding Fees WestRegion Passed 440460 SouthRegion Passed 655000 NothRegion Female Passed 1386335 Ex Kanpur Failed 1092079
I use the following query that only make sure of the case, but it's not how I want to exit, if I try to use the case to breast to decode then how to work on it.SELECT (CASE WHEN College in ('IITB') and status='P' then sum(fees) else 0 end) WP, (case when College in ('IITC') and status='P' then sum(fees) else 0 end) SP, (case when College in ('IITD','IITK') and gender='F' and status='P' then sum(fees) else 0 end) NFP, (case when College in ('IITK') and status='F' then sum(fees) else 0 end) ExKF FROM TT2 GROUP BY College, Class,gender,status
SELECT CASE WHEN College in ('IITB') and status='P' then 'WestRegion Passed' when College in ('IITC') and status='P' then 'SouthRegion Passed' when College in ('IITD','IITK') and gender='F' and status='P' then 'NothRegion Female Passed' when College in ('IITK') and status='F' then 'Ex Kanpur Failed' else 'Others' end region_standing, sum(fees) fees FROM TT2 GROUP BY CASE WHEN College in ('IITB') and status='P' then 'WestRegion Passed' when College in ('IITC') and status='P' then 'SouthRegion Passed' when College in ('IITD','IITK') and gender='F' and status='P' then 'NothRegion Female Passed' when College in ('IITK') and status='F' then 'Ex Kanpur Failed' else 'Others' end;
-
Using the cmdlet Get-stats for the problems of performance of ESXi
I need to detect the bottlenecks (if any) causing poor performance with a (free) 5.5 ESXi host.
I see that if I use the cmdlet Get - stat PowerCLI I get dozens of meters, such as "mem.usage.average" or "'rescpu.maxlimited1.latest ', just to give two samples. "
Can I identify a subset of the counters I should follow to identify possible bottlenecks in the fastest way possible?
Concerning
Marius
Everything depends of course.
There are several positions which list a number of key counters to watch.
The Hosts of ESXi monitoring - a deeper on the what and the why look , you will find a good starting set.
-
How to access a pension case using the case number
I have a question which is considered by the media and I have a file number. I checked using my account, but don't see an option to access my cases. How can I use the file number to access the case?
Hello
Kindly click on the following link: https://www.adobe.com/cfusion/support/index.cfm?event=portal
You will be able to see all your open and closed on this portal.
If a case is closed for no more than 14 days, you will get an option to re open the case.
Hope this helps!
Kind regards
Shipti
-
HelloHow can I convert a code for the below sql case statement:
If)
(length of (tmp_co_orig_val) < = 0 OR tmp_co_orig_val < = 0 OR tmp_co_orig_val == 1 OR tmp_co_orig_val > = 9999999)
OR
((tmp_co_orig_val == 999999 AND (length of (tmp_rcr_orgn_ltv_rt) < = 0 OR tmp_rcr_orgn_ltv_rt < tmp_rcr_orgn_ltv_rt > 1.3 GOLD 0.15)))
Start
tmp_collatvalue = «»
tmp_msg_cd = 115
end
Is the case statement below that I wrote is correct. I don't have an environment now to test. Please advice.
BOX WHEN (CHAR_LENGTH (tmp_co_orig_val) < = 0 OR tmp_co_orig_val < 0 OR tmp_co_orig_val = 1 OR tmp_co_orig_val = > = 9999999)
OR (tmp_co_orig_val = 999999 AND (CHAR_LENGTH (tmp_rcr_orgn_ltv_rt) < = 0 OR tmp_rcr_orgn_ltv_rt < tmp_rcr_orgn_ltv_rt > 1.3 GOLD 0.15))
THEN tmp_collatvalue IS NULL AND tmp_msg_cd = 115
END
Hello
937454 wrote:
Thanks Frank. Really helps. But I have to write a sql statement
But can you also specify, if I made a mistake in my code, or it's ok.
There are no CASES reported in Oracle SQL.
Oracle SQL has BOX expressions, but they only return a single value. You cannot set 2 columns in the same expression BOX.
Perhaps the best thing to do in pure SQL for you is to write a CASE expression, very similar to the CASE statement above, in a subquery and use the results of this in 2 separate expressions of BOX (very simple) in a Super application.
-
Duplicate values are returned by using the case statement
Hello PL/SQL gurus and experts.
I use Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64-bit Production version
I am currently stuk with problem with the case values in double - displayign
Once I am using the following query (join of two tables)
It gives the student name and corresponding test and reviewselect t.student_nm, f.Test_RNK,f.Exam_rnk from class_fact f, method_dim t where t.method_key = f.class_key AND F.DE='H' AND F.Date between '20120101' and '20120631'
But if I use it as a query, then it displays a lot of values in double.
I can do stupid mistake but kindly suggest me.select t.student_nm, (case when trim(upper(F.date)) between '20120101' and '20120631' and trim(upper(F.DE)) = 'H' then F.Exam_RNK else 0 end ) yrrk from class_fact f, method_dim t where t.method_key = f.class_key
Thank youWhy you have removed the bottom two filters in the second query?
AND F.DE='H' AND F.Date between '20120101' and '20120631'
CASE filter your data. USED in your SELECTION list will be only to manipulate these data for the particular column.
You must keep your filter because it is, if you expect the reords even to returnYour request must therefore
select t.student_nm, (case when trim(upper(F.date)) between '20120101' and '20120631' and trim(upper(F.DE)) = 'H' then F.Exam_RNK else 0 end ) yrrk from class_fact f, method_dim t where t.method_key = f.class_key AND F.DE='H' AND F.Date between '20120101' and '20120631'
Published by: JAC on October 12, 2012 19:08
1. is it a running query? You use DATE as column name?
2. why you store data to date as strings? -
Using the Case statement in Where clause with operator
Hi all
I'm doing the following work (this is just a simple version of what I'll eventually need):
Sorry, I forgot how to use the code tags...
and li. MAJOR_ACCT in case
When: prompt = 'Energy' then ('9320906 ', ' 9321471')
end
Problem is that I get a missing closing parenthesis error.
Wouldn't - that evaluate against a value(as below) it works fine:
and li. MAJOR_ACCT in case
When: prompt = 'Energy' then ('9320906')
end
Any thoughts? Is it possible to use a box (or decode) in an In clause with multiple values? I tried to use decode as well and get the same results.
Thank you.
Darren.What:
and ( case when :prompt = 'Energy' and li.MAJOR_ACCT in ('9320906', '9321471') then 1 when :prompt = 'Vehicle' and li.MAJOR_ACCT in ('9812180', '9812320') then 1 when :prompt = 'Meals' and li.MAJOR_ACCT in ('983120', '983452') then 1 end ) = 1
-
Use the CASE statement in a query of LOV
Hello
I wrote a select statement to be used in my list of values query, and it works fine when I run with SQL Developer. But when I put it in the LOV I get the LOV query is invalid error message. Here's the query I use:
If the CASE statement is the source of the problem?select case when nt.COMMON_NAME is not null then nt.COMMON_NAME || ' (' || nt.TAXON_NAME || ')' else nt.TAXON_NAME end display_species ,case when nt.COMMON_NAME is not null then nt.COMMON_NAME || ' (' || nt.TAXON_NAME || ')' else nt.TAXON_NAME end return_species FROM NBN_TAXON nt WHERE lower(nt.INPUT_CATEGORY) = decode(lower(:P312_TAXON_GROUP_ADD), 'fish', 'fishes', lower(:P312_TAXON_GROUP_ADD)) order by 1;
Hello
Try to remove the colon semi at the end.
See you soon
Ben
-
Help: How to use the Case statement in the ODI11g Interface?
Hello
My basic source I get 'Year' values and I want that these values result code in the interface and after translation want to push on the target system.
Example:
Database source, I get value for
Year
2010
2011
2012
When I get the year 2010 I want to change the value in "FY10".
When I get year 2011 I want to change the value in "FY11.
and even for the year 2012 to "FY12.
I've tried to make the Case statement, but had no success.
I don't want to create the lookup table in the source system.
Any help in this matter.
Thank you
Concerning
Sher
Published by: Sher Ullah Baig on August 26, 2012 17:52CASE
WHEN source_column = '2010' THEN 'FY10.
WHEN source_column = '2011' and THEN 'FY11.
WHEN source_column = '2012' and THEN 'FY12.
END -
doubt in the case when statement
Hi the gems...
I have a case when statement in a select clause... ago total three conditions in the case when statemnt.
now my question is if all theconditions gets mapped, what happens?
is only the first condition is executed and rest two is ignored or the third condition will overwrite the previous two?
Please help... Thanks in advance...You can see it with:
select case when 1=1 then 1 when 2=2 then 2 when 3=3 then 3 end test from dual; TEST --------- 1
You get only the first result!
Published by: hm on 18.11.2011 04:11
-
Use the case of the Cluster data without DRS storage store?
Can someone tell me please the use case of the Cluster data without DRS storage store?
Virtually no,.
The only one that is useful is the aggregation of resources of data warehouses in a cluster data store. But it is aggregation of resources in its crudest form. When you create a virtual machine and the use of a cluster as the destination data store, you must always select the data store that will store the virtual machine.
Storage DRS off =
No calculation of initial investment
No space load balancing
No I/O load balancing
No rule affinity VMDK
No maintenance mode
For this purpose a group of data without active DRS storage store is a kind of a data store folder.
-
Schema export multile using the case statement
Hello
I want several export schema using case statement.
provable I 4 schema test1, test2, test3 test4 for the scheme I created scripts for each of them either 4 scripts but I want only a scripts instead of 4 scripts. Please suggest how to write shell scripts using a case statement (via a parameter name or the schema).
example of diagram of TEST1.
expdp "" system/redhat as sysdba' "dumpfile directory = TEST1.dmp = DUMP_DIR = TEST1.log patterns = TEST1 logfile logfile = TEST1_Export.log
is it possible if you use under case statement (via the name of parameter/schema)
as case 1: TEST1
2: TEST2
3: TEST3
4: TEST4
If I pass the value as TEST1, and TEST1 schema export is made.No, it's easier.
In addition, you can only get the number and then use TEST$ {export_schema} instead.
But in any case you don't have no need 'breaks '. -
Tuning - using the CASE statement in the WHERE clause of the query
Hi all
My request has been changed to use a CASE statement in the WHERE clause to examine the data to some columns based on a parameter value. This modified request is made a full table and constantly running scan. Please suggest what can be done to improve its performance:
Query:
Description of the table:SELECT LAST_DAY(TRUNC(TO_TIMESTAMP(os.requestdatetime, 'yyyymmddhh24:mi:ss.ff4'))) AS summary_date, os.acctnum, os.avieworigin_refid, COUNT(1) cnt_articleview, SUM(NVL(autocompletedterm,0)) cnt_autocompletedterm FROM TABLE1 os WHERE os.acctnum IS NOT NULL AND os.avieworigin_refid IS NOT NULL AND os.requestdatetime IS NOT NULL AND UPPER(os.success_ind) = 'S' AND CASE WHEN Param_ValueToCheck = 'FULL' AND get_date_timestamp(os.requestdatetime) BETWEEN TO_DATE('01-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') AND TO_DATE('31-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') THEN 1 WHEN Param_ValueToCheck = 'INCR' AND os.entry_createddate BETWEEN TO_DATE('01-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') AND TO_DATE('31-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') THEN 1 END = 1 AND CASE WHEN Param_ValueToCheck = 'FULL' AND os.entry_CreatedDate BETWEEN TO_DATE('01-APR-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') AND TO_DATE('07-JUN-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') THEN 1 WHEN Param_ValueToCheck = 'INCR' THEN 1 END = 1 GROUP BY LAST_DAY(TRUNC(TO_TIMESTAMP(os.requestdatetime, 'yyyymmddhh24:mi:ss.ff4'))), os.acctnum,os.avieworigin_refid;
(Number of lines: approx. > amount 600 000 000)
Explain PlanName Null Type ------------------------------ -------- ------------ ARTICLEID NOT NULL NUMBER(20) USERKEY NUMBER(10) AVIEWORIGIN_REFID VARCHAR2(10) SUCCESS_IND VARCHAR2(2) ENTRY_CREATEDDATE DATE CREATED_BY VARCHAR2(10) FILENUMBER NUMBER(10) LINENUMBER NUMBER(10) ACCTNUM VARCHAR2(10) AUTOCOMPLETEDTERM NUMBER(2) REQUESTDATETIME VARCHAR2(19)
Published by: Chaitanya on June 9, 2011 02:44SQL> select * from table(dbms_xplan.display); PLAN_TABLE_OUTPUT ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Plan hash value: 2224314832 ---------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | ---------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 590 | 33040 | 2501K (1)| 08:20:15 | | | | 1 | HASH GROUP BY | | 590 | 33040 | 2501K (1)| 08:20:15 | | | | 2 | PARTITION RANGE ALL| | 590 | 33040 | 2501K (1)| 08:20:15 | 1 |1048575| |* 3 | TABLE ACCESS FULL | TABLE1 | 590 | 33040 | 2501K (1)| 08:20:15 | 1 |1048575| ---------------------------------------------------------------------------------------------------------- PLAN_TABLE_OUTPUT ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 3 - filter(UPPER("OS"."SUCCESS_IND")='S' AND CASE WHEN ('FULL'='FULL' AND "OS"."ENTRY_CREATEDDATE">=TO_DATE(' 2011-04-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "OS"."ENTRY_CREATEDDATE"<=TO_DATE(' 2011-06-07 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) THEN 1 WHEN 'FULL'='INCR' THEN 1 END =1 AND "OS"."REQUESTDATETIME" IS NOT NULL AND CASE WHEN ('FULL'='FULL' AND "ODS"."GET_DATE_TIMESTAMP"("REQUESTDATETIME")>=TO_DATE(' 2011-05-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "ODS"."GET_DATE_TIMESTAMP"("REQUESTDATETIME")<=TO_DATE(' 2011-05-31 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) THEN 1 WHEN ('FULL'='INCR' AND "OS"."ENTRY_CREATEDDATE">=TO_DATE(' 2011-05-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "OS"."ENTRY_CREATEDDATE"<=TO_DATE(' PLAN_TABLE_OUTPUT ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 2011-05-31 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) THEN 1 END =1 AND "OS"."ACCTNUM" IS NOT NULL AND "OS"."AVIEWORIGIN_REFID" IS NOT NULL)
Published by: Chaitanya on June 9, 2011 02:47When it is executed individually, MERGE LOGIC 1 and LOGIC of MERGE 2 take about ten for a daterange of 30 days data.
BUT FULL is to get the scores of APR - JUN, INCR becomes partitions for MAY so not both 30 days.
Are compare us like with like? -
To get all records using the CASE function
first_tbl
First_dt second_dt point
1 January 09 item1 1 July 09
April 1 09 item1 1 December 09
1 July 09 31 December 09 item1
December 15 09 10 May 10 item1
March 20, 12 10 August 12 item2
July 31, 12 15 December 12 item2
April 1 09 31 December 09 item2
second_tbl
Start_dt point end_dt flag
August 1 09 1 November 09 item1 null
2 November 09 1st December 09 item1 null
1 December 09 15 December 09 item1 null
December 15 09 31 December 09 item1 null
1 January 10 10 May 10 item2 null
10 May 10 December 31, 10 item2 null
1 January 12 March 15, 12 item2 null
March 20, 12 31 July 12 item2 null
I need o/p so that, if first_dt or second_dt between start_dt and end_dt, I need to make the flag as y (item is the common join) other wise 'n'.
I was able to make the flag go ' but not ' don't
Select A.first_Dt, A.second_Dt, B.Start_Dt, B.End_Dt, A.item, point.
Cases where B.falg is null
Then "n".
Else 'Y '.
End
Of firsttbl A, second_tbl B
Where
A.Item = B.Item
and
((A.first_Dt > =B.Start_Dt et A.first_Dt < = B.End_Dt))
Or
(A.second_Dt > =B.Start_Dt et A.second_Dt < = B.End_Dt)) ;
Please kindly help me to resolve this bug.
Thanks for your help in advance!select f.first_dt,f.second_dt,s.start_dt,s.end_dt, case when first_dt between start_dt and end_dt or second_dt between start_dt and end_dt then 'N' else 'Y' end flag from first_tbl f,second_tbl s where f.item = s.item
-
How to use the case to replace the &; in the select statement
Oracle version: 11.1.0.6.0
RHEL
Hello
I want to get a list of all users that are expired and locked, but want to replace '&' with and here is my code but it does not work.
Please some advice, thanks.
SQL > select username,.
2 cases (account_status as 'EXP %' then "A UP AND LOCKED"
3 ELS 'no locked user '.
4 end) account_status
5 of dba_users
6 where account_status as "EXPI % ';
case (account_status as 'EXP %' then "A UP AND LOCKED"
*
ERROR on line 2:
ORA-00907: lack of right parenthesisHello
Can u try like thisSelect the username, account_status,
cases where account_status like 'EXP %' then 'A EXPIRED AND LOCKED'
End ELSE Account_status "account_status.
from dba_users
where account_status as "EXP % ';concerning
srikkanth. M
Maybe you are looking for
-
How do I know if I have viruses / whatever
It seems that 'my computer' is send emails since, apparently, sent my items... to those who who do not have them. How to stop this... or if I have a virus / whatever? Also send emails to myself with nothing else than a "zip" attached file?
-
Never before an iPhone, but has an iPad Mini 2 and a 3rd generation iPod. After receipt of old iPhone 4s, 32g, AT & T family member activate. The latest version of the software (iOS 9.3.2). Then picked up at the shop I-left falling for a new installa
-
Everytime I open FF I get the start page and it asks if I want to restore my previous sessions - it's really annoying me. Your latest saved my sessions and they open automatically when I started FF - why does not it now?
-
Why my system restore says it can't restore my system?
Original title: WHY MY SYSTEM RESTORE WOULD say IT can NOT RESTORE any date choose it says it cannot restore, I did the cleaning disc and defragmented, did not anygood
-
Hello. I have a toshiba satellite lapttop. Windows XP SP3 works on it. I thought I had a virus and try to get rid of it through McAfee. Now the window starts up. I tried f8 after the portable turing on and boot in safe mode. I get 3 lines as follows