Need help with a conditional statement
OK, I have essentially a text box that gives descriptions when you hover over each button. I do not know how to encode, so far, that's what I have and when I mouse over the 'home' button I see var homeText in the text box, but when I'm not wriggle on I do not see the "else" statement that matches the text empty var.
My question is how to do the "else" statement to work?
Description of section text box.
var empty: String = "INFO SPACE, point to things for a brief description.";
var homeText:String = "return to the home page.";
The 'Home' button action.
var overHomeDes:Boolean = true;
homeBorder_mc.addEventListener (MouseEvent.MOUSE_OVER, homeDes);
function homeDes(event:MouseEvent):void
{
If (overHomeDes)
{
Description.Text = homeText;
}
on the other
{
Description.Text = empty;
}
}
You will need to create a ROLL_OUT listener for the home button to get him back. The mouse above machine occue when you hover over the button, it will appear only if, not the other, thw unless boolean is false.
You won't need this conditional in there, unless that boolean is in another goal.
Tags: Adobe Animate
Similar Questions
-
Need help with the conditional statement.
I have a conditional configuration to check the 6 values, and I don't know how to put in place. I know that the way I have it Setup is wrong, but I'm stuck here after several attempts of other variants.
LINE OF CODE IN QUESTION:
If (eventObject.info.name! = "marker2" |) "marker4" | "marker5" | "marker6" | "marker7" | "marker8")
FULL CODE BLOCK:
var listenerObject:Object = new Object();
listenerObject.cuePoint = {function(eventObject:Object):Void}
If (eventObject.info.name! = "marker2" |) "marker4" | "marker5" | "marker6" | "marker7" | {"marker8")}
var listenerObject:Object = new Object();
listenerObject.stateChange = {function(eventObject:Object):Void}
trace (_root.theVideo.State);
If {(_root.theVideo.paused)
mclContinue._visible = true;
var myTween:TweenLite = new TweenLite (mclContinue,.35, {_alpha:100, ease:Back.easeOut, onComplete:contBtn});})
} else {}
var myTween:TweenLite = new TweenLite (mclContinue,.35, {_alpha:0, ease:Back.easeOut, onComplete:contBtn});})
}
}
_root.theVideo.addEventListener ("stateChange", listenerObject)
}
}
_root.theVideo.addEventListener ("cuePoint", listenerObject)
Thank you.You are welcome.
-
need help with the Update statement
Hello
I received a question in a course and I tried my best to respond, and now my brain is giving. I would really appreciate help with the update statement. I don't mind if you do not validate a solution, a little nudge in the right direction would be really useful. I'll post that I got.
THE QUESTION
/ * For these agents disabled on more than seven missions, change their date of deactivation of the first date of deactivation of all the agents that have been activated in the same year as the agent that you update currently.
*/
I have it divided into parts, here is my select statement to agents disabled on more than 7 missions, which produces the deactivation_dates in the agents table that I want to update...
.. .and the code for the first date of deactivation for each year of activation agentSELECT s.deactivation_date FROM ( SELECT a.deactivation_date, count(m.mission_id) as nomissions FROM agents a INNER JOIN missions_agents m on a.agent_id=m.agent_id GROUP BY a.deactivation_date ) s WHERE s.nomissions>7 AND s.deactivation_date IS NOT NULL
..... I am not real to marry these two statements together in the Update statement. I can't extract each date of deactivation produced in the first select statement and their match against the first date of deactivation in the year they have been activated for the second select statement.select a2.deactivation_date from agents a2 where a2.deactivation_date= ( select min(a.deactivation_date) from agents a where to_number(to_char(a.activation_date,'YYYY'))=to_number(to_char(a2.activation_date,'YYYY')) )
Any help greatly appreciated... :))I began to wonder how things would :)
user8695469 wrote:
First of all why he chooses the date the earliest of all agentsUPDATE AGENTS_COPY AC /* (1) */ SET DEACTIVATION_DATE = ( SELECT MIN(AGS.DEACTIVATION_DATE) FROM AGENTS_COPY AGS , AGENTS_COPY AC /* (2) */ WHERE TRUNC(AGS.ACTIVATION_DATE,'YEAR') = TRUNC(AC.ACTIVATION_DATE,'YEAR') /* (3) */ )
He recovers as soon as the subquery has not been correctly set in the SET clause. It seems you are trying to update a correlated, but we are still having a conceptual shift. I have added a few comments to your code above and below will explain.
(1): when you do a correlated update it is useful to the table alias that you did right here.
(2): this table statement is not necessary and is the reason why the FIRST deactivation date is selected. The alias that you use (3) refers to THIS table, not the one defined in the update statement. Remove the line indicated by (2) in the FROM clause and a correlated update will happen.
and secondly why is it to update each row, when I thought that I'm just the lines where the agents are disabled and missions > 7? Pointers on where I'm wrong would be very appreciated. (SQL = stupid query language!) :)
user8695469 wrote: then why is it to update each row, when I thought that I'm just the lines where the agents are disabled and missions > 7? Pointers on where I'm wrong would be very appreciated. (SQL = stupid query language!) :)
WHERE EXISTS ( SELECT a.agent_id, count(m.mission_id) FROM agents a /* INNER JOIN AC ON AC.AGENT_ID = A.AGENT_ID */ INNER JOIN missions_agents m ON a.agent_id=m.agent_id GROUP BY a.agent_id, a.deactivation_date HAVING count(m.mission_id)>7 AND a.deactivation_date IS NOT NULL )
Once again this problem is similar to the question above that a correlation update doesn't work. Test existence of lines in an EXISTS subquery. Since your subquery is not related to the table that you are trying to update, it will be always return a line and, therefore, it returns true for EACH LINE in the AGENTS table. To limit the game to only agents > 7 missions results, you need to add a join condition that references the table in your update statement. I added one above (with comments) as a sample.
I recommend you look over all material that you have associated with correlated subqueries, including documents that I posted above. This seems to be what you're having the problem more with. If you need me to explain the concept of correlated queries any better please let me know.
Thank you!
-
Need help with the condition join in SQL
Hi all -
I need to ask for help with this query:
Create table user_tab_col_test (varchar2 (30) from table_name, column_name varchar2 (30), data_type varchar2 (30));
Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column1', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('Column2', 'table1', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ("Column3", 'table1', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('column4', 'table1', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ("column1", "table2", 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column2', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', "Column3", 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column4', 'varchar2')
Commit;
Create table all_cons_columns_test (varchar2 (30) from table_name, column_name varchar2 (30), constraint_name varchar2 (30))
Insert into all_cons_columns_test (table_name, column_name, constraint_name) values ("table1", "column1", "primary")
Insert into all_cons_columns_test (table_name, column_name, constraint_name) values ("table1", "column1", "secondary")
Commit;
This is my query and the current result:
Select u.table_name, u.column_name, c.constraint_name
Of user_tab_col_test u
Outer join all_cons_columns_test c left
On (u.table_name = c.table_name
AND U.COLUMN_NAME = C.COLUMN_NAME
AND C.CONSTRAINT_NAME IN ('main'))
order of U.table_name, U.COLUMN_NAME;
TABLE_NAME COLUMN_NAME, CONSTRAINT_NAME
------------------ --------------------- ----------------------------
Table1 primary Column1
Table1 Column2
Table 1 Column3
Table2 Column1
Table2 Column2
Three questions:
(1) I don't want to return results where table_name = "table1". I can't get this to work.
(2) is my proper request and this is the best way to return my desired results? For example, I want all of the columns of user_tab_col_test and I want to only display the constraint_name from all_cons_columns_test argument if the argument constraint_name = 'primary '.
(3) will be the synatx be the same if I need to join a third table to all_cons_columns_test?
Any advice/suggestions are appreciated-
John
Published by: user703358 on January 11, 2013 20:57
Published by: user703358 on January 11, 2013 21:48Hi, John,.
user703358 wrote:
Hi all -I need to ask for help with this query:
Create table user_tab_col_test (varchar2 (30) from table_name, column_name varchar2 (30), data_type varchar2 (30));
Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column1', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('Column2', 'table1', 'varchar2')...Thanks for posting the CREATE TABLE and INSERT.
It is more useful if you post the code that can be run without modification. You did not semicolons after INSERTION instructions.Three questions:
(1) I don't want to return results where table_name = "table1". I can't get this to work.What have you tried? Post your best attempt.
Here's one way:SELECT u.table_name , u.column_name , c.constraint_name FROM user_tab_col_test u LEFT OUTER JOIN all_cons_columns_test c ON u.table_name = c.table_name AND u.column_name = c.column_name AND c.constraint_name IN ('primary') WHERE u.table_name = 'table1' -- ***** NEW ***** ORDER BY u.table_name , u.column_name ;
You would not put this condition in the clause; who controls what is considered as a match between the tables, and "u LEFT OUTER JOIN c" means show all lines of u, even if they do not have a match in the c.
(2) is my proper request and this is the best way to return my desired results? For example, I want all of the columns of user_tab_col_test and I want to only display the constraint_name from all_cons_columns_test argument if the argument constraint_name = 'primary '.
Basically, this application is very well.
It displays all the columns of user_tab_col_test; missing data_type. Just add u.data_type to the SELECT clause, or change the SELECT clauseSELECT u.* , c.constraint_name
(3) will be the synatx be the same if I need to join a third table to all_cons_columns_test?
Do you mean "" * add * one-third * column * to all_cons_columns_test '? "
It depends on what results you want. Post new CREATE TABLE and INSERT and instructions the results you want new data.
Most likely, the basic structure of what you've written will remain exactly the same. -
need help with the Merge statement
I'm on: Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
I'm currently an UPDATE statement and then it works and is accurate, it takes 30 minutes. I heard that MERGE
can do the same thing and is just as accurate and much faster!
Here's the query I want to convert into a MERGE INTO statement. I tried to do it myself, but I get errors and don't know simply, since it's new for me.
Basically I want to update table your on a corresponding condition in the table tt for 2 columns (GTP and UPDATE_DT), for UPDATE_DT I want to insert the Date current system.
Thank you!UPDATE /*+ PARALLEL (16) */ OLDER_Table ta SET (ta.GTP, ta.UPDATE_DT) = (SELECT /*+ PARALLEL (16) */ tt.GTP, SYSDATE FROM NEWER_Table tt WHERE ta.cust_id = tt.cust_id AND ta.STAMP_DATE = tt.STAMP_DATE AND ROWNUM = 1) WHERE EXISTS (SELECT 1 FROM NEWER_Table tt WHERE ta.cust_id = tt.cust_id AND ta.STAMP_DATE = tt.STAMP_DATE AND (NVL(ta.GTP, 'X') != NVL(tt.GTP, 'X')));
Hello
Whenever you have a problem, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) of all of the tables involved.
Also post the results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.
If you ask on a DML statement, such as UPDATE, CREATE TABLE and INSERT statements need to re - create the tables as they are before the DML, and results will be the content of the or the tables changed when it's all over.
See the FAQ forum {message identifier: = 9360002}MERGE peut be much faster than update; Sometimes, there is no significant difference in speed.
Tables in multiple situations like this, I've never seen a case where the MERGER has been slower than the UPDATE, even if the UPDATE is sometimes easier to code and just as fast.Maybe that's what you want:
MERGE INTO older_table dst USING ( SELECT n.cust_id , n.stamp_date , n.gtp , ROW_NUMBER () OVER ( PARTITION BY n.cust_id , n.stamp_date ORDER BY n.gtp ) AS r_num FROM newer_table n JOIN older_table o ON n.cust_id = o.cust_id AND n.stamp_date = o.stamp_date AND NVL ( n.gtp , 'X' ) != NVL ( o.gtp , 'X' ) ) src ON ( src.cust_id = dst.cust_id AND src.stamp_date = dst.stamp_date AND src.r_num = 1 ) WHEN MATCHED THEN UPDATE SET dst.gtp = src.gtp , dst.update_date = SYSDATE ;
As I can't test it, I can't be sure.
-
Need help with Audio conditional
Hello again! So from the outset in a course, after a few slides of intro, I have a slide tri to direct users to other parts of a course (autonomous learning directed manner). However, I have an audio narration that plays at the entrance to this slide (slide no audio, it plays by advanced actions). I'm trying to find a way so that once they have seen this slide once on hearing and audio first, any time that they get referred to this yard slide, they hear no audio again. How this could be done?
What I've tried: I tried two things, first of all I created a variable called Sort_Audio. Sort_Audio would be assigned to the output of the previous slide, a value of 10. At the entrance to the slide of sort, a tip action would check if Sort_Audio is equal to 10. If this is the case, it plays audio (and clears that another variable that is not related, I just need to do two things, I combined the). I have on the output of the triage blade a tip action that resets Sort_Audio to 0 so that when a user gets referred to this yard slide, it would theoretically not featured audio. Problem is in the first place for a reason any, it will play not even audio first.
The other thing I tried was quite similar, but instead to assign values to the slides, I tried cpInfoLastSlideViewed and he equalled in the name of the previous slide, but also do the same for cpInfoPreviousSlide. None seemed to work.
Any help would be appreciated! Thank you!
I have demonstrated this workflow many times (DevLearn 2012, recently on an eLearning Guild online forum).
You use any of the Exit event. Have a user with a value variable initial (I used 0). Create a conditional action:
IF v_visit equals 0
Play the audio clip
Assign the v_visit with 1
ON THE OTHER
Continue
Lilybiri
-
Need help with the insert statement
Hello
I have a question on how to write a SQL statement.
This is the table of "base":
and it comes to resoult in the target table. SQL statement must take care of the insert in a base of the target table table (example below is already provided with test data).CREATE TABLE TEMP_TBL ( id_nr NUMBER, DATE_DOK DATE, DATE_DUE DATE, DATE_DOK_PAY DATE, DEB NUMBER, KRD NUMBER ); insert into temp_tbl (ID_NR,DATE_DOK,DATE_DUE,DATE_DOK_PAY,DEB,KRD)values('1',TO_DATE('11.01.2011','DD.MM.YYYY'),TO_DATE('25.02.2011','DD.MM.YYYY'),NULL,'423,24','0'); insert into temp_tbl(ID_NR,DATE_DOK,DATE_DUE,DATE_DOK_PAY,DEB,KRD)values('2',TO_DATE('16.12.2011','DD.MM.YYYY'),TO_DATE('13.06.2011','DD.MM.YYYY'),NULL,'91270,15','0'); insert into temp_tbl(ID_NR,DATE_DOK,DATE_DUE,DATE_DOK_PAY,DEB,KRD)values('3',TO_DATE('27.09.2011','DD.MM.YYYY'),TO_DATE('27.09.2011','DD.MM.YYYY'),NULL,'0','2000');
If someone could give me a helping hand how write correct insert statement I would be really gratefull.create table table_sod ( id_nr number ,date_from date ,date_to date ,deb_krd number ); One thing to note here : values in column deb_krd under insert 1 and 4 must be summarized in insert 4. insert into table_sod (id_nr,date_from,date_to,deb_krd) values('1',null,to_date('25.02.2011','dd.mm.yyyy'),'423,24'); insert into table_sod(id_nr,date_from,date_to,deb_krd) values('2',to_date('26.02.2011','dd.mm.yyyy'),to_date('13.06.2011','dd.mm.yyyy'),'423,24'); insert into table_sod(id_nr,date_from,date_to,deb_krd)values('3',null,to_date('13.06.2011','dd.mm.yyyy'),'91270,15'); insert into table_sod(id_nr,date_from,date_to,deb_krd)values('4',to_date('14.06.2011','dd.mm.yyyy')to_date('27.09.2011','dd.mm.yyyy'),'91693,39'); insert into table_sod(id_nr,date_from,date_to,deb_krd)values('5',null,to_date('27.09.2011','dd.mm.yyyy'),'2000');
Thank you for your time!I came here with my own assumptions with this
SQL> select rownum id_nr 2 , date_from 3 , date_to 4 , case when date_from is null then deb 5 else sum(case when date_from is not null then deb else 0end) over(order by id_nr, no) 6 end deb_krd 7 from ( 8 select id_nr 9 , case when lg_dt is null or ld_dt = date_due then null else lg_dt+1 end date_from 10 , ld_dt date_to 11 , case when deb = 0 then krd else deb end deb 12 , no 13 from ( 14 select t1.* 15 , lead(t1.date_due) over(order by t1.id_nr, t2.no) ld_dt 16 , lag(t1.date_due) over(order by t1.id_nr, t2.no) lg_dt 17 , t2.no 18 from temp_tbl t1 19 cross 20 join (select 1 no from dual union all select 2 no from dual) t2 21 order by id_nr, no 22 ) 23 where ld_dt is not null 24 ) 25 / ID_NR DATE_FROM DATE_TO DEB_KRD ---------- --------- --------- ---------- 1 25-FEB-11 42324 2 26-FEB-11 13-JUN-11 42324 3 13-JUN-11 9127015 4 14-JUN-11 27-SEP-11 9169339 5 27-SEP-11 2000
-
Need help with the IF statement.
I am trying to write an IF statement using FormCalc in LiveCycle. I have the "tpe" cell that captures the total number of points. I would attribute levels based on the number of points obtained. For example, level I = 1001-1985; level II = 851-1000; level III = 551-850; level IV = < 551. I want to 'level' of cell to show I, II, III or IV, based on the points in the cell "tpe". How can I do this? I have zero familiarity with FormCalc or scripts in general. Can someone help me with this please? Would appreciate any help! Thank you!
Just put the script in the field calculate level instead:
If (tpe tpe and > 1000<= 1985)="">=>
$ = "I"
ElseIf (tpe > 850 and tpe<= 1000)="">=>
$ = « II »
ElseIf (tpe > 550 and tpe<= 850)="">=>
$ = 'III'
ElseIf (tpe<= 550)="">=>
$ = « IV »
else $ = «»
endif
Also just have a glance to your form - for the next time that you could save yourself a lot of time in your configuration through the use of tables for all of these fields, rather than making each a numeric field separated.
-
Need help with CASE When statement in a Where Clause
So I have a SQL (simplified for this forum)
Select t1.*
from table1, table2 t2 t1
where t1.field1 = t2.field1
and when t1.field2 is null then trunc (sysdate) < = trunc (t1.date1 + 17)
of another trunc (sydate) > = end of trunc (t2.date2 + t2.date3)
I end up getting an error ORA-00905: lack of keyword
I'm sure that I just got something here involved.You can not make the comparison within the statement underlying case like this. Assuming you have appropriate data types, something like this should work
Select t1.* from table1 t1, table2 t2 where t1.field1 = t2.field1 and ((t1.field2 is null and trunc(sysdate) <= trunc(t1.date1 + 17)) or trunc(sydate) > = trunc(t2.date2 + t2.date3))
John
-
Need help with an if statement
I have three variables: subA, subB and subC. Initially, I got the calculation such as (subC = subA/subB) then I have implemented a model so subC presented as a percentage. This leads to the possibility of subC is > 100%, which the customer has not loved. They asked if subC > 100% N/A appear. So I wrote the following script, which I'm sure is fake because I don't have a lot of experience script and I had a syntax error. Thanks in advance for your help.
Form1. #subform [9]. subC::calculate - (FormCalc, client)
If (subC > 1) then
subC = "N/a".
ElseIf (subC < = 1) then
(subA/subB = subC)
endif
Good to hear. If you mark as answer, it will save others to look at the wire.
-
Need help with a declaration of 'IfThenIfNot '.
Every year couple I need help with a script statement and these forums have been incredibly useful. Once more, I was hoping that someone out there had knowledge of something I am writing for a form, I need to automate:
In the jargon of Excel that I try to write to would state so @if (("Subtotal"+"InvestigativeFee"+"PlanReviewFee") > 1000, + 100, + (("Sous-total" + "Investigativ Manar" + "PlanReviewFee") *. 1))
What I have here is three form named subtotal, InvestigativeFee & PlanReviewFee fields. The formula in question says it's a 'technology assessment fee"of 10% on the total part of what above mentioned 3 fields but there is a maximum charge of $100 for this tax. The statement that I wrote above would have worked in Excel (not tested, but generally is the idea). I was hoping someone mastering JavaScript could help me with a statement that I needed to do this work.
Hope to hear from someone,
Warmly yours.
Steven L in Eugene OR
Try the following in the custom calculation of the fresh field of evaluation script:
Custom calculation script
(function () {}
Maximum package
var max_taf = 100;
Get the values of the field as numbers
var v1 = + getField("Subtotal").value;
var v2 = + getField("InvestigativeFee").value;
var v3 = + getField("PlanReviewFee").value;Calculation of tax
TAF var = (v1 + v2 + v3) / 10;
Set this field to royalty calculated value if less than maximum, otherwise the maximum value
Event.Value = (taf< 100)="" taf="" :="">
})();
-
need help for a conditional query
guys this is just. as an extension of this post that Frank was helping me. IM reposting because my needs change slightly and im having a hell of a time trying to change the query.
Here are the previous post.
need help with query can find data back please help.
dataCREATE TABLE "FGL" ( "FGL_GRNT_CODE" VARCHAR2(60), "FGL_FUND_CODE" VARCHAR2(60), "FGL_ACCT_CODE" VARCHAR2(60), "FGL_ORGN_CODE" VARCHAR2(60), "FGL_PROG_CODE" VARCHAR2(60), "FGL_GRNT_YEAR" VARCHAR2(60), "FGL_PERIOD" VARCHAR2(60), "FGL_BUDGET" VARCHAR2(60) )
I need to find the year of greater subsidy for the granting by a period setting.Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','11','00','400'); Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','1','100'); Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','1','0'); Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','11','1','400'); Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('360055','360055','7200','4730','02','10','1','400'); Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('360055','360055','7600','4730','02','10','1','400'); Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','14','200'); Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','10','14','100'); Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','14','200'); Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','2','100'); Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','11','2','600');
Once I found the great year, I need to check the value of the period 14 this grant for the previous year and add it to the amount of the budget for this grant. However if there is an entry in the biggest year for period 00 so I need to ignore the period 14 of the previous year and the current calculation period + (current period - more great year 00)
hope that makes sense, so in other words, with the new data above. If I asking me a second period of the grant year 11. I'd end up with $800
because the greatest year is 11 it contains one point 0 with $ 400, so my total should be
amount of period $2,600
period $0 400 - period $2 600 = $200
600 + 200 = $800
If I have question period 1 grant 360055 I'd end up just with 800 grnt year 10.
I tried to edit this query you have provided me with no luck. I tried for several embarrassed day but I'm saying I can just do what im trying to do.
can you please help me.
Here's the query provided by frank kulash who graciously put it together for me.
MiguelWITH got_greatest_year AS ( SELECT fgl.* -- or whatever columns are needed , MAX ( CASE WHEN fgl_period = :given_period THEN fgl_grnt_year END ) OVER () AS greatest_year FROM fgl ) SELECT SUM (fgl_budget) AS total_budget -- or SELECT * FROM got_greatest_year WHERE ( fgl_grnt_year = greatest_year AND fgl_period = :given_period ) OR ( fgl_grnt_year = greatest_year - 1 AND fgl_period = 14 ) ;
Hi, Miguel.
You are waying that when larger year who has: given_period also a period = '00' (or '0', or whatever it is you want to use), then you want to double the budget of the given_period (subtract the '00' budget and do not count '14' year pevious)? If so, add another condition to the CASE statement that decides what you've summarized:
WITH got_greatest_year AS ( SELECT TO_NUMBER (fgl_grnt_year) AS grnt_year , fgl_period , TO_NUMBER (fgl_budget) AS budget , MAX ( CASE WHEN fgl_period = :given_period THEN TO_NUMBER (fgl_grnt_year) END ) OVER () AS greatest_year FROM fgl ) , got_cnt_00 AS ( SELECT grnt_year , fgl_period , budget , greatest_year , COUNT ( CASE WHEN grnt_year = greatest_year AND fgl_period = '00' THEN 1 END ) OVER () AS cnt_00 FROM got_greatest_year ) SELECT SUM ( CASE WHEN grnt_year = greatest_year -- New AND fgl_period = :given_period -- New AND cnt_00 > 0 THEN budget * 2 -- New WHEN grnt_year = greatest_year AND fgl_period = :given_period THEN budget WHEN grnt_year = greatest_year AND fgl_period = '00' THEN -budget WHEN grnt_year = greatest_year - 1 AND fgl_period = '14' AND cnt_00 = 0 THEN budget END ) AS total_budget FROM got_cnt_00 ;
You will notice it is the same as the previous query, I posted, with the exception of 3 lines marked 'new '.
-
Need help with slui message with the Validation Code: 50
OT: need help with the message 'victim' slui...
Diagnostic report (1.9.0027.0):
-----------------------------------------
Validation of Windows data-->Validation code: 50
Code of Validation caching online: 0xc004c4a2
Windows product key: *-* - YMK9F - 7Q3XK-X7D3P
Windows product key hash: 9WDJkbD1PdUJ + GCdK63bG2yus5g =
Windows product ID: 00371-702-8613485-06367
Windows product ID type: 5
Windows license type: retail
The Windows OS version: 6.1.7601.2.00010100.1.0.048
ID: {60986DD4-5ADA-464C-A590-469385BD5D3A} (1)
Admin: Yes
TestCab: 0x0
LegitcheckControl ActiveX: N/a, hr = 0 x 80070002
Signed by: n/a, hr = 0 x 80070002
Product name: Windows 7 Professional
Architecture: 0 x 00000009
Build lab: 7601.win7sp1_gdr.150928 - 1507
TTS error:
Validation of diagnosis:
Resolution state: n/aGiven Vista WgaER-->
ThreatID (s): n/a, hr = 0 x 80070002
Version: N/a, hr = 0 x 80070002Windows XP Notifications data-->
Cached result: n/a, hr = 0 x 80070002
File: No.
Version: N/a, hr = 0 x 80070002
WgaTray.exe signed by: n/a, hr = 0 x 80070002
WgaLogon.dll signed by: n/a, hr = 0 x 80070002OGA Notifications data-->
Cached result: n/a, hr = 0 x 80070002
Version: N/a, hr = 0 x 80070002
OGAExec.exe signed by: n/a, hr = 0 x 80070002
OGAAddin.dll signed by: n/a, hr = 0 x 80070002OGA data-->
Office status: 109 n/a
OGA Version: N/a, 0 x 80070002
Signed by: n/a, hr = 0 x 80070002
Office Diagnostics: 025D1FF3-364-80041010_025D1FF3-229-80041010_025D1FF3-230-1_025D1FF3-517-80040154_025D1FF3-237-80040154_025D1FF3-238-2_025D1FF3-244-80070002_025D1FF3-258-3Data browser-->
Proxy settings: N/A
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Win32)
Default browser: C:\Program Files (x 86) \Mozilla Firefox\firefox.exe
Download signed ActiveX controls: fast
Download unsigned ActiveX controls: disabled
Run ActiveX controls and plug-ins: allowed
Initialize and script ActiveX controls not marked as safe: disabled
Allow the Internet Explorer Webbrowser control scripts: disabled
Active scripting: allowed
Recognized ActiveX controls safe for scripting: allowedAnalysis of file data-->
Other data-->
Office details:{60986DD4-5ADA-464C-A590-469385BD5D3A} 1.9.0027.0 6.1.7601.2.00010100.1.0.048 x 64 *-*-*-*-X7D3P 5 S-1-5-21-4040712825-3780279311-4191590923 the system manufacturer ,System Product Name American Megatrends Inc. 00371-702-8613485-06367 0802 20110601000000.000000 + 000F3A53C07018400FE 0409 0409 Central Standard Time(GMT-06:00) 0 3 109 Content Spsys.log: 0 x 80070002
License data-->
The software licensing service version: 6.1.7601.17514Name: Windows 7 Professional edition
Description: operating system Windows - Windows (r) 7, retail channel
Activation ID: c1e88de3-96c4-4563-ad7d-775f65b1e670
ID of the application: 55c92734-d682-4d71-983e-d6ec3f16059f
Extended PID: 00371-00212-702-861348-00-1033-7601.0000-1142014
Installation ID: 022214046070387640229264400212325972472065330163335456
Processor certificate URL: http://go.microsoft.com/fwlink/?LinkID=88338
Machine certificate URL: http://go.microsoft.com/fwlink/?LinkID=88339
Use license URL: http://go.microsoft.com/fwlink/?LinkID=88341
Product key certificate URL: http://go.microsoft.com/fwlink/?LinkID=88340
Partial product key: X7D3P
License status: Notification
Reason for the notification: 0xC004F200 (non-genuine).
Remaining Windows rearm count: 4
Trust time: 12/01/2016 11:28:57Windows Activation Technologies-->
HrOffline: 0x00000000
HrOnline: 0xC004C4A2
Beyond: 0 x 0000000000000000
Event timestamp: 1:11:2016 12:55
ActiveX: Registered, Version: 7.1.7600.16395
The admin service: recorded, Version: 7.1.7600.16395
Output beyond bitmask:--> HWID data
Current HWID of Hash: QAAAAAEAAwABAAEAAQADAAAABwABAAEAln3OI0bUDFRsO24dgCKo58SW2JyUY/1mMckmPrb67HxoDsAKMMl2Vg ==Activation 1.0 data OEM-->
N/AActivation 2.0 data OEM-->
BIOS valid for OA 2.0: Yes, but no SLIC table
Windows marker version: N/A
OEMID and OEMTableID consistent: n/a
BIOS information:
ACPI Table name OEMID value OEMTableID value
APIC1425 APIC 060111
FACP 060111 FACP1425
HPET 060111 OEMHPET
MCFG 060111 OEMMCFG
LASRYVITRAGE OEMB1425 060111
ASPT 060111 PerfTune
OEMOSFR OSFR 060111
SSDT DpgPmm CpuPmHello
Thanks to everyone who responded to my question.
Turns out it would not activate the system properties page.
He did, however, turn on the tool online browser without a
hitch. Yes, problem solved.
Jon
-
Need help with screen Blus of death (BSOD) on my computer toshiba laptop
Hello all, Ive had a little last week, or problems with my laptop. While playing a game (minecraft), I would randomly have a BSOD error and my laptop will re-start. Initially, I gave it no thought, but when it happened again, I decided to try to do a little research, but I'm not terrible with technology and other then I'm neither the case with my own research.
If someone could point me in the direction of a few possible ways to get this problem.
guys do you propose I make to the store and see if they can check it out, what would I need if I did.
I got a program to read some sort of file "dump" made when occurs a BSOD, I publish what this program here says? the program is BlueScreenView, if yes, what I have post the spectator thing? There are has 2 main screens on it, SDO as Sho different dump files (which is on the top) and on the bottom, it lists the names of different files for each dump file I think that some of them highlighted.
im not this product with tech so I don't know much but I need to post anything on my laptop or any information of the dumpfile and would have this info help in any way to determine the problem? just tell me what I have to post and ill get the information displayed in a response, thank you.
-leoknighted
PS: I don't think that playing minecraft is the cause of the BSOD and crashing, but I only get it when playing minecraft, so I don't know if minecraft is causing accidents and others. I watch videos and this all the time and I never have an accident. I'll try and play a different game and see if this causes my laptop down and the cause is perhaps high usuage to my laptop, as I've said games require a lot of power of a laptop/computer, if they are not the 'best' laptop for games. but yh, if someone thinks they can help me and need some information please tell me so I can get it for you. If you guys think it would be best to get a professional to look just mylaptop say, however im save as a last resort.
Hello
I suggest you to refer to this article to check if this help.
Resolve stop (blue screen) error in Windows 7
http://Windows.Microsoft.com/en-us/Windows7/resolving-stop-blue-screen-errors-in-Windows-7Important: System Restore will return all system files not as documents, email, music, etc., to a previous state. These files of types are completely affected by the restoration of the system. If it was your intention with this tool to recover a deleted file to non-system, try using a file instead of system restore recovery program.
Important: while performing the check disk on the hard disk, if bad sectors can be found, then check disk will try to repair this sector. All the data available in this area may be lost.
Custom installation WARNING: If you format the hard disk during the installation, the data files are saved in a Windows.old folder on the partition you installed Windows 7. However, you should always back up the files. If you have encrypted data files, you may not be able to access them after installing Windows 7. If you have backed up your data files and then restored after Windows 7 is installed, you can delete the Windows.old folder.
Let us know if you need help with this question, we will be happy to offer you our help.
-
Need help with setting up in checkbox in interactive reports
I need help with setting up in checkbox in interactive reports, I use this statement a query
SELECT apex_item.checkbox
(
1, ROLEID,
'onchange = "spCheckChange (this);". ',
: F_ROLEID_LIST,.
':'
), del.
ROLEID, ROLEDESCRIPTION
OF EBA_ROLES
When I run it I get the following
< input type = "checkbox" name = "f01" value = "1" onchange = "spCheckChange (this); ' / > instead of the checkbox
Do I need to configure anything else
Aditya Gupta wrote:
I need help with setting up in checkbox in interactive reports, I use this statement a query
SELECT apex_item.checkbox
(
1, ROLEID,
'onchange = "spCheckChange (this);". ',
: F_ROLEID_LIST,.
':'
), del.
ROLEID, ROLEDESCRIPTION
OF EBA_ROLES
When I run it I get the following
instead of the checkbox
Do I need to configure anything else
This is one of the most frequently asked questions in this forum. Set the column attribute the text to display as Standard report column and not display text (special escape characters).
Always include the information referred to in these guidelines when you ask a question and if you use APEX 5.0, State, if you develop using the pages or the view of the component designer.
Maybe you are looking for
-
Skype cannot connect error on connection
I just downloaded and installed Skype on my work computer (I have a video conference next week). But when I try to connect I get an error "Skype cannot connect" with my Skype name and "sorry, we don't recognize your connection details. Please check y
-
I am trying to establish what link I need to go in my slot 1394 on my desk G5350 in terms of pins and male or female Can someone advise Thank you
-
I would like to know who hacked my account that I have an ex who has been harassing me so I can file a complaint
-
what I tried to do is to install the latest version of windows messanger (msn) ive, but im not able to make my windows installer comes back with an error message saying that the windows installer is not installed properly, please some help this start
-
OfficeJet Pro 8500 Wireless USB mass storage driver
I can not print! Get a message to solve the problems that tells me that the USB Mass Storage Design driver is not installed. I can not install one of the original, or HP website software. No matter what I do the driver will not be installed correc