Value of preventive action and field Format incompatibility error
I'm working on a budget and form the basis of calculation of percentages. It is, until certain values are entered, I get an error "the value entered does not match the format of the field [game] %" because it tries to perform the calculation without any value.
I tried to write a custom script, so it would only try to calculate if there were several current, but my attempts fail.
That's what I tried, which was based on a google search:
var this.getField("CashMatchT").value = cash
var in-kind = this.getField("InKindMatchT").value
var total = this.getField("TotalCostT").value
var match = this.getField("Match%").value
If (match < = 0) {}
Event.Value = ((cash + inkind) competition) * 100
} else {}
Event.Value = "";
}
If I event.value = ((cash + inkind) competition) * 100 by itself, it works fine so I know that the part is correct.
I also tried (with the same variables):
If (match! = 0) {}
Event.Value = ((cash + inkind) competition) * 100
} else {}
Event.Value = "";
}
You must make sure that the 'total' field is not empty or equal to zero before
perform the calculation, because division by zero is illegal.
Monday, June 29, 2015 21:27, katien45132623 [email protected]>
Tags: Acrobat
Similar Questions
-
I developed a script to process the .tdms file in DIAdem 11.1, now I deploy the script on the same PXI system that created the .tdms file. This system had DIAdem 11.0, but when I try to open (DataFileLoadSel) the file tdms in my script, I get the error message:
"D:\MyFileName.tdms" has a format invalid gall. (Error no. 11)
Tdms files are created by a LabView application.
If I delete the index correspondin .tdms file, I get a little further, it loads the first two of the four groups, using DataFileLoadSel on the first group and DataFileLoadRed on the 2nd group, the third group, another DataFileLoadRed, I get the following error:
Error in
(line: x,: y): Unable to load the 'D:\MyFileName.tdms' file with the charger "TDMS.
Additional information:
Cannot open the file 'D:\MyFileName.tdms '.
Is there a difference between DIAdem 11.0 and 11.1 affecting the .tdms file import, if I can get around it?
Thank you
Eric
Hello eberg,.
Before we get into more detailed error recovery, could you please try to install the format TDMS 2.0 on the computer of DIAdem 11.0 (DIAdem 11.1 and LabVIEW 2009 come with TDMS already installed 2.0 stuff).
Hesitate not to download it here: http://zone.ni.com/devzone/cda/tut/p/id/9995
Once installed, please try to run the Scripts (in DIAdem 11.0) and let us know if that fixes the issue. He could not help to install this, but it's a quick thing to try before dig us more deeply into the question.
Best regards
Otmar
-
We are trying to make a quick payment of payment workbench and is "FRM-41830: error in values list of the no entries for payment document column / field.» Payment document format seems good. Don't know what the issue is.
Found the Solution...
PPR (profile of payment process) has not been set to check Format selected in the configuration to "Manage the payment Document".
-
Error message - the value entered does not match the Format of the field
I get an error message in Adobe Pro x: "the value entered does not match the format of the field [JF13].
I have JF13 scheduled as follows:
Calculate tab:
If (Number (this.getField("ck4").value) > 0) this.getField("JF13").value = Number (this.getField("FL019").value); else this.getField("JF13").value = "";
It is programmed in this way, so if the user checks the checkbox in front of the field, only then will JF13 fills a value, which pulls of FL019. I also value parameters 'number' because the data to display in the form of a dollar amount $xxx.xx.
FL019 is a hidden field on the form which takes an amount of a central computer and its settings can also be programmed to 'Number':
I get four popup windows with the above mentioned error message, and the only way to make the stop message is to remove the «number» field format. However, when this is done, if a number any ending in a zero is entered, it cuts the zero. This is not acceptable either.
Is there some kind of script that I could add or otherwise to prevent the error message and the cutting out of the zero on JF13?
I'm not very proficient with javascript, any help would be appreciated!
Just include the two quotes, not the comment brackets.
-
I use the simplified notation filed to perform subtraction on a budget form.
They all have an excellent work and have no problem display a value of zero when it's a simple subtraction (value1-value2).
However, on my last field I want to take the total income and subtract what I spent (approximately 40 fields) and get a balance zero.
When I try to do it I get this warning "the value entered does not match the format of the field [].
The calculation works fine and displays the correct value for all the foregoing ".» 01 "and displays negative numbers. 01 "and underneath as well (if I go on the budget), she just may not show a zero, which is my goal for this equal to zero each month.
I tried to watch if the forms and have not found an answer that works even for my situation.
Happy to post the form here, just do not know how to do it.Thanks in advance,
The custom calculation script may be something like the following:
Get the value of field of income, as a number
var v1 = + getField("Income").value;
Set up an array of domain names
var aFieldsToSubtract =]
"ThithesB,"
"TailleB,"
"EFundB,"
"MortgageB,"
"HomeItemsB,"
"HomeRepairsB,"
"ElecticB,"
"GasB.
"WaterB."
"SewerB,"
"TrashB,"
"PhoneB."
"InternetB."
"AutoInsB,"
"UmbrellaB,"
"IdentityB,"
"CosmeticsB,"
"ToiletriesB,"
"PocketEBB,"
"PocketCBB,"
"GiftsB,"
"HouseSuppliesB,"
"PersonalOtherB,"
"PersonalOther2B,"
"GroceriesB,"
"RestaurantsB,"
"ClothingB,"
"CarGasB,"
"CarRepairsB,"
"CarOtherB,"
"MedicalBillsB,"
"MedicalOtherB,"
"EntertainmentB,"
"VacationB,"
"DebtCarB,"
"DebtStudentLoan1B,"
"DebtStudentLoan2B,"
"DebtStudentLoan3B,"
"DebtCreditB,"
"DebtOther1B,"
'DebtOther2B '.
];
Subtract the values in field
for (var i = 0; i)< afieldstosubtract.length,="" i="" +="1)">
v1-= + getField(aFieldsToSubtract[i]).value;
}
Set this field value by rounding the result to the nearest
Event.Value = util.printf ("%.2f", v1);
Do not think of this as a band-aid, think the correct way to perform the calculation, because it is. Note that "Thithes" may be a spelling error.
-
Hi all
How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.
There is also a checkbox on the dialog box 'Sign' to lock document after signing.
-
I'm on Windows 10. A works fine until the update. How can I make Adobe Acrobat Reader (free verision) my default DC? Seems that the default value is E pdf and when I change the default in the flashes of screen reader and forms are in the same format. I rather Acrobat format if possible. Thank you
Hello
Could a right click on the PDF file > open with > choose program by default and select CD player as default PDF Viewer.
You can do it from the control panel as well.
This would make CD player as default PDF Viewer.
Concerning
Sukrit diallo
-
Level elements dynamic Actions and application
Request Express 4.1.1.00.23
I searched everywhere for an answer on this one and I can't seem to find it. Is it possible to have a dynamic action to interact with an element of application level? If it is possible, is able to have the value field in the when a dynamic action article contains a comparison operator?
An example of a real case would be:
Element level application F111X = X
Dynamic action on P4_Item is triggered and disables the field
Case of falsification:
Element level application F111X = Y
Dynamic action on P4_Item is not triggered and the field remains active.
Thank you
JonJon,
I'm looking for an example, and if I use your article page P4 in the box 'When', event could be the change, Type of selection would be the page element.
P4 would be selected in the drop-down list item (s), Condition would be equal to and value would be TEST with NO quotes!It is difficult for me to know when the values of the quote and when not.
What is it?
Howard -
Change the mask of the executing (Oracle forms 6i) date field format
Hello
I use Oracle forms 6i. I have a domain where I use to store dates. I need to change the format mask of this date the runtime field.
Y at - it no set_item_property built in that I can use to achieve this?
Kind regards
Bet.
Published by: 1009523 on June 3, 2013 11:11Part 2, help information on the Format mask item property; you will need to make sure that you set the property correctly.
Sorry, I had to drill two answers but my first attempt surpassed the eligible characters in an answer ;-)
Format Mask property Description Specifies the display format and input accepted for data in text items. Applies to text item Set Form Builder, programmatically Refer to Built-in n GET_ITEM_PROPERTY n SET_ITEM_PROPERTY Required/Optional optional Usage Notes Valid format masks for character strings, numbers and dates are described in the following tables. Character Strings The following table describes valid format masks for character strings. Element Example Description FM FMXX99 Fill mode: accept string as typed, do not right justify. Allows end user input string to be shorter than the format mask. X XXXX Any alphabetic, numeric, or special character. End user input string must be exact length specified by format mask. 9 9999 Numeric characters only. End user input string must be exact length specified by format mask. A AAAA Alphabetic characters only. End user input string must be exact length specified by format mask. Character String Examples Format Mask Description XXAA Will accept: --ab, abcd, 11ab; will not accept: --11, ab11, or ab--(must use XX to accept hyphens and other special characters). XXXX Will accept any combination of alphabetic, numeric, or special characters: --ab, abcd, 11ab, --11, ab11, or ab--. Will accept 1234 or abcd; will not accept 123 or abc. (To accept input string shorter than mask, use FMXXXX.) FMXX99 Will accept ab12, ab1, ab followed by two spaces; will not accept 12ab or abcd. (To produce the Form Builder Version 3.0 Alpha datatype, use FMAAAAAA.) n To embed additional characters such as a hyphen (-) or a comma (,), surround the character with double-quotes ("). n Embedded characters are separate from text item values and are not collated along with text item values, even when the end user enters them. NUMBERS The following table describes valid format masks for numbers. Element Example Description 9 9999 Number of nines determines display width. Any leading zeros will be displayed as blanks. 0 0999 Display leading zeros. 0 9990 Display zero value as zero, not blank. $ $9999 Prefix value with dollar sign. B B9999 Display zero value as blank, not "0". MI 9999MI Display "-" after a negative value. PR 9999PR Display a negative value in
. comma 9,999 Display a comma in this position. For correct behavior in multilingual applications, substitute G to return the appropriate group (thousands) separator. period 99.99 Display a decimal point in this position. For correct behavior in multilingual applications, substitute D to return the appropriate decimal separator. E 9.999EEEE Display in scientific notation (format must contain exactly four "E"s). FM FM999 Fill mode: accept string as typed, do not right justify. n When you mask a number with nines (9), Form Builder adds a space in front of the number to accommodate the plus (+) or minus (-) sign. However, since the plus sign is not displayed, it appears as if Form Builder adds a space in front of the number. (The minus sign is displayed.) n To embed additional characters such as a hyphen (-) or a comma (,), surround the character with double-quotes ("). n Embedded characters are separate from text item values and are not collated along with text item values, even when the end user enters them. NUMBER Examples Format Mask Description FM099"-"99"-"9999 Displays the social security number as formatted, including hyphens, even if end user enters only nine digits.To create a Social Security column, create an 11-character column, set to fixed length, with a format mask of 099"-"99"-"9999. This mask will accommodate Social Security numbers that begin with zero, accepting 012-34-5678 or 012345678 (both stored as 012345678). 99999PR Accepts -123; reformats as <123>. 999MI Accepts -678; reformats as 678-. 9.999EEEE Displays as 1.00E+20. How Forms handles length mismatches If a runtime user enters a numeric string that exceeds the format mask specification, the value will be rejected. For example: Format Mask User enters Result 99.9 321.0 Invalid 99.9 21.01 Invalid 99.9 21.1 21.1 99.9 01.1 1.1 In contrast, if a numeric value fetched from the database exceeds the format mask specification for its display field, the value is displayed, but truncated, with rounding, to fit the mask. (The item itself within the Forms application retains its full value.) For example, if the database held the value 2.0666, and the format mask was 99.9, the value displayed to the user would be 2.1. However, the value of the item within the form would be the full 2.0666. Dates The following table describes valid format masks for dates. Element Description YYYY or SYYYY 4-digit year; "S" prefixes "BC" date with "-". YYY or YY or Y Last 3, 2, or 1 digits of year. Y,YYY Year with comma in this position. BC or AD BC/AD indicator. B.C. or A.D. BD/AD indicator with periods. RR Defaults to correct century. Deduces the century from a date entered by comparing the 2 digit year entered with the year and century to which the computer's internal clock is set. Years 00-49 will be given the 21st century (the year 2000), and years from 50-99 will be given the 20th century (the year 1900). MM Month (01-12; JAN = 01). MONTH Name of month, padded with blanks to length of 9 characters. MON Name of month, 3-letter abbreviation. DDD Day of year (1-366). DD Day of month (1-31). D Day of week (1-7; Sunday=1). DAY Name of day, padded with blanks to length of 9 characters. DY Name of day, 3-letter abbreviation. J Julian day; the number of days since January 1, 4712 BC. AM or PM Meridian indicator. A.M. or P.M. Meridian indicator with periods. HH or HH12 Hour of day (1-12). HH24 Hour of day (0-23). MI Minute (0-59). SS Second (0-59). SSSSS Seconds past midnight (0-86399). /. , . Punctuation is reproduced in the result. "..." Quoted string is reproduced in the result. FM Fill mode: assumes implied characters such as O or space; displays significant characters left justified. Allows end user input to be shorter than the format mask. (Use in conjunction with FX to require specific delimiters.) FX All date literals must match the format mask exactly, including delimiters. n When you prefix a date mask with FX, the end user must enter the date exactly as you define the mask, including the specified delimiters: Date Examples Format Mask Description FXDD-MON-YY Will accept 12-JAN-94, but will not accept 12.JAN.94 or 12/JAN/94 because the delimiters do not match the mask. Will not accept 12JAN94 because there are no delimiters. Will accept 01-JAN-94 but will not accept 1-JAN-94. FMDD-MON-YY Will accept 01-JAN-94. Will also accept the entry of other delimiters, for example 01/JAN/94 and 01 JAN 94. However, will not accept 01JAN94. Will accept 1-JAN-94, converting it to 01-JAN-94. DD-MON-YY Will accept 12.JAN.94, 12/JAN/94 or 12-JAN-94. Note: Any delimiter characters will be accepted, but if delimiters are omitted by the end user, this mask will interpret date characters as a delimiters. Will accept 12-JAN94, (but will erroneously interpret as 12-JAN-04); but will not accept 12JAN94, because "AN" is not a valid month name. n Use of a format mask only affects how the data looks. Form Builder stores full precision, regardless of how the data is presented. n Embedded characters are separate from text item values and are not collated along with text item values, even when the end user enters them. n To embed additional characters such as a hyphen (-) or a comma (,), surround the character with double-quotes ("). Note, however, that double-quotes themselves cannot be used as a character. In other words, trying to achieve output of DD"MM by specifying a mask of DD"""MM would not work. Format Mask Description FMMONTH" "DD", "YYYY Displays the text item data in the specified date format: JANUARY 12, 1994, including the appropriate blank spaces and comma. FMDD-MONTH-YYYY Displays as 12-JANUARY-1994. DY-DDD-YYYY Displays as WED-012-1994. Note: for input validation including day of the week, a mask that allows specific determination of the day is required, such as this example or DY-DD-MM-YY. n When you use day of the week formats, be sure that the data includes day of the week information. To avoid illogical masks, display also either the day of the year (1-366) or the month in some format. Format Mask Description DD-MONTH-YYYY Displays as 12-JANUARY-1994. DY-DDD-YYYY Displays as WED-012-1994. DY-DD-MON-YY Displays as WED-12-JAN-94. Be sure to include month. Avoid masks such as DY-DD-YY, which could generate an error. NLS Format Masks The following table describes valid National Language Support (NLS) format masks. Element Example Description C C999 Returns the international currency symbol. L L9999 Returns the local currency symbol. D 99D99 Returns the decimal separator. G 9G999 Returns the group (thousands) separator. comma 9,999 Displays a comma in this position. period 9.999 Displays a decimal point in this position. Displays a decimal point in this position. NLS Format Mask Examples Format Mask Description L99G999D99 Displays the local currency symbol, group, and decimal separators: if NLS_LANG=American, this item displays as $1,600.00; if NLS_LANG=Norwegian, this item displays as Kr.1.600,00. C99G999D99 Displays the appropriate international currency symbol: if NLS_LANG=American, this item displays as USD1,600.00; if NLS_LANG=French, this item displays as FRF1.600,00. Craig...
-
Hello
I'm having some trouble with the values defined in LOVs areas. I created a free workspace in Oracle APEX.
I created a form with two fields of LOVs, EMP and DEPT, after that I created a dynamic action to set the value on the LOV Dept field. Then always when a new EMP is selected, the LOV Dept field must define the departament of the chosen MAP.
Dynamic action has not worked with LOVs fields, always when I changed the field EMP LOV LOV DEPT field is canceled, but when I changed the DEPT LOV to SELECT LIST field, it's good work.
dynamic action properties:
event: change; *
Select type: points; *
point: EMP_LOV*.
Condition: no condition; *
Action: value; +
setType: Sql statement+.
Sql statement:+.
Select DEPTNO+.
from EMP+.
where EMP. EMPNO =: EMP_LOV+.
Assigned items: DEPT_LOV+.
Brgds,
André.
Edited by: 969316 11/03/2012 07:36
Edited by: 969316 11/03/2012 07:36Try sth like this:
First create a hidden item, let's call it P1_DEPTHIDDEN then
Create dynamic action:
Event: Change Selection Type: Item Item: P1_EMPLOYEE
Now for the first real action follow these steps:
Action: Execute PL/SQL Code BEGIN SELECT DEPTNO INTO :P1_DEPARTMENT FROM EMP WHERE EMPNO = :P1_EMPLOYEE; END; Page Items to Submit: P1_EMPLOYEE Page Items to Return: P1_DEPARTMENT_HIDDEN -- This is return value, the value you will store in your database table (not the one you see on the screen)
Now for the second True action follow these steps:
Action: Execute PL/SQL Code BEGIN SELECT DNAME INTO :P1_DEPTHIDDEN FROM DEPT, EMP WHERE DEPT.DEPTNO = EMP.DEPTNO AND EMPNO = :P1_EMPLOYEE; END; Page Items to Submit: P1_EMPLOYEE Page Items to Return: P1_DEPTHIDDEN -- This is display value, the value you actually need to see in P1_DEPARTMENT item !
Now for the third True action follow these steps:
Action: Execute JavaScript Code $x('P1_DEPARTMENT').value = $x('P1_DEPTHIDDEN').value /* Now you set P1_DEPARTMENT value to be exactly what you need */
I really hope that it works, it's probably more easy solution then this one.
Mimi
-
validate the value of a text input field
Hi I am new to the Animate edge, and I worked on a project that requires text input. The code does not "recognize" the value entered in the input field. The action is quite straightforward, good answer (360) game label 02, wrong answer play label 03. Ideally, I'd like to allow three attempts. I don't have a lot of experience in JavaScript, this piece of code are pieces that I put in place of tutorial and a little help. Thank you and I appreciate all the help!
var answer = sym.$("answer");
Answer.html ("answer 1");
inputAnswer = $('<input_/>').attr ({'type': 'text', 'value': ", 'id': 'reply'});
inputAnswer .css ('font-size', 14);
inputAnswer .css ("width", 150);
inputAnswer .css ("background-color", "#ffffff");
inputAnswer .appendTo (answer);
var submitBtn = sym.$("btn");
function checkAnswer() {}
var rightAnswer = inputAnswer.attr ('value');
If (rightAnswer is "360")
{
SYM. Play("02");
}
on the other
{
SYM. Play("03");
}
Returns false;
}
{submitBtn.click (function ()}
checkAnswer();
});
Hello
Try to use the following syntax to get the value of the input text field.
var rightAnswer = inputAnswer.val (); rather than access the .attr ('value')
Have attached a simple example. Currently, it shows the correct/incorrect value in the console log.
Thank you and best regards,
Roger Simon
-
I just installed Adobe Standard 10 on my laptop and have a file that I used before on my desktop that contains text fields formatted as 'number '. Additional text fields take this information and perform calculations based on the numeric values. This does not work on my laptop, as it does on my desk. There are global settings that I could check? Even if the text boxes are in the number format, it's the treatment of the values as text. Please provide ideas so you can...
The two are not related. You will find the option repair on the Help menu.
-
Problems using the percentage field Format
Hello
I have a very simple calculation based on 2 fields. The entry fields are formatted as numeric, monetary, places with 2 decimal places.
The names of the fields are:
ttlkey - this amount will be entered by the user.
ttlall - this amount will be entered by the usre.
keypercent - this is a single playing field that is formatted as a percentage with 1 decimal place and the following calculation script:
Calculation script
(function () {}Get the values of the field as numbers
var = key + getField("ttlkey").value;
all the var = + getField("ttlall").value;Perform the calculation
If (key: all! == 0) {}
Event.Value = key / all;
} else {}
Event.Value = "";
}})();
It works well, however, when the trys user to enter data in the ttlkey or ttlall field, they receive a warning msg that says: the value entered does not match the format of the field [keypercent]
The user can click ok and continue to enter... but, I would like to get rid of this message.
Any help is greatly appreciated
Your logic statement is false. You have to test individually each field to zero and then logically AND the results of these two comparisons.
Calculation script
(function () {}Get the values of the field as numbers
var key = Number (this.getField("ttlkey").value);
all the var = Number (this.getField("ttlall").value).Event.Value = "";
Perform the calculation
If ((touche! = 0) & (all! = 0)) {}Event.Value = key / all;
}
}) ();
But in reality you only really need to test for a divisor of zero, because zero divided by a number any non-zeno is zero. If you want to remove a zero response so you can add the code to do this
Calculation script
(function () {}Get the values of the field as numbers
var key = Number (this.getField("ttlkey").value);
all the var = Number (this.getField("ttlall").value).Event.value = ";
If (all! = 0) {}
Event.Value = key / all;
}
If (event.value == 0) {}
Event.Value = "";
}
}) ();
But if you don't want a 0% to display, you will need to play with the definition of the format with some additional scripts.
-
Custom for Lat/Long text field format
I am new to the creation of PDF files and did not JavaScript for 10 years.
I was hoping that someone would be able to provide the custom format script required format a text field for Lat/Long in DMS (e.g. 70 ° 12' 34 "W).
Short, someone at - it a custom format script I could go and change?
Thanks in advance!
Try calling the function shown below in the latitude or custom Format script longitude field. This function is intended to be placed in the form of script at the level of the document.
As a custom Format to the text box script, use the following:
For Longitude field
dd_to_dms (true);
-OR-
For Latitude field
dd_to_dms (false);
I was liberal with the comments in the hope of equivocation. What I have not done is a kind of data validation. The field entry is supposed to be a number that makes sense (for example, to +/-180 for longitude, +/-90 for latitude). You can add a custom script to strike to limit the entry of a number and a Validation script to check its value. He rounds as second to the second, but this could be changed if you need fractional part for seconds. Post again if you have any questions.
function dd_to_dms (isLong) {}
Custom Format script for text acroform field
Convert lat/long values from decimal to degrees, Minutes, seconds
' DDD.dddd-> () [DD] D [M] I S [S] "N | S | E | W
isLong: latitude, longitude = true = falseField blank if no entry
If (! event.value) {}
Event.Value = "";
return;
}Get the field as a number entry
var val = + event.value;var cd, t, degrees, minutes, seconds;
Determine what cardinal to display
If (isLong) {}
CD = (val< 0)="" "w"="" :="">
} else {}
CD = (val< 0)="" "s"="" :="">
}To make the number positive
Val = Math.abs (val);degrees = part of the input value
degrees = val | 0;Download fractional part
t = val 1.0%;minutes = fully part of (fractional part * 60)
t = t * 60;
minutes = t | 0;seconds = fully part of (the fractional part of previous * 60)
t = t % 1.0;
seconds = (t * 60) | 0;Display in the field
Event.Value = degrees + '\u00b0' + minutes + "'"+ seconds + "\" "+ cd;»
} -
SQL query to display the sum of the values of each June and December
Hello having problems of construction of a query to the list SQL query to display the sum of the values of each June and December each year.
My Table;
TABLE name: MONTH_TERM
Fields with values:
TERM_KEY MONTH_ACTUAL MONTH_DATE 82 500 01/11/2015 0:00 82 450 01/12/2015 0:00 82 405 01/01/2016 0:00 82 400 01/02/2016 0:00 82 450 01/03/2016 0:00 82 425 01/04/2016 0:00 82 435 01/05/2016 0:00 82 410 06/01/2016 0:00 82 409 01/07/2016 0:00 82 415 01/08/2016 0:00 82 420 09/01/2016 0:00 82 422 10/01/2016 0:00 82 436 11/01/2016 0:00 82 556 01/12/2016 0:00 82 568 01/01/2017 0:00 82 624 02/01/2017 0:00 What I would like to see in a query result:
TERM_KEY MONTH_ACTUAL MONTH_DATE Total of 6 months 82 500 01/11/2015 0:00 82 450 01/12/2015 0:00 950 82 405 01/01/2016 0:00 82 400 01/02/2016 0:00 82 450 01/03/2016 0:00 82 425 01/04/2016 0:00 82 435 01/05/2016 0:00 82 410 06/01/2016 0:00 2525 82 409 01/07/2016 0:00 82 415 01/08/2016 0:00 82 420 09/01/2016 0:00 82 422 10/01/2016 0:00 82 436 11/01/2016 0:00 82 556 01/12/2016 0:00 2658 82 568 01/01/2017 0:00 82 624 02/01/2017 0:00 ---
Here's my query:
Select
"TERM_KEY,"
"MONTH_ACTUAL,"
to_char(MONTH_DATE,'MM/YYYY') MONTH_DATE,
DEAL to_char (MONTH_DATE, 'MM')
WHEN '06' THEN (SELECT SUM (MONTH_ACTUAL)
OF MONTH_TERM
WHERE the to_char (MONTH_DATE, 'MM') between 1 and 6
AND term_key = 82)
WHEN '12' THEN (SELECT SUM (MONTH_ACTUAL)
OF MONTH_TERM
WHERE the to_char (MONTH_DATE, 'MM') between 7 and 12
AND term_key = 82)
ELSE null
END as SIX_MO_CUMM,
of MONTH_TERM
where term_key = 82
It's my results:
TERM_KEY MONTH_ACTUAL MONTH_DATE Total of 6 months 82 500 01/11/15 0:00 82 450 01/12/15 0:00 3608 82 405 01/01/16 0:00 82 400 01/02/16 0:00 82 450 01/03/16 0:00 82 425 01/04/16 0:00 82 435 01/05/16 0:00 82 410 01/06/16 0:00 3717 82 409 01/07/16 0:00 82 415 01/08/16 0:00 82 420 01/09/16 0:00 82 422 10/01/16 0:00 82 436 01/11/16 0:00 82 556 01/12/16 0:00 3608 82 568 01/01/17 0:00 82 624 01/02/17 0:00 Any ideas on how to fix would be great
Select term_key,
month_actual,
month_date,
case mod (to_char (month_date, 'mm'), 6)
When 0 then sum (month_actual)
During)
term_key partition
order of month_date
between the previous month '5' interval and the current line
)
end '6 MONTHS in TOTAL'
from tbl
order of term_key,
month_date
/
TERM_KEY MONTH_ACTUAL MONTH_DAT 6 MONTHS TOTAL
---------- ------------ --------- --------------
82 500 NOVEMBER 1ST, 15TH
82 450 1 DECEMBER 15 950
82 405 1 JANUARY 16
82 400 1 FEBRUARY 16
82 450 1ST MARCH 16
82 425 1ST APRIL 16
82 435 1 MAY 16
82 410 2525 1 JUNE 16
82 409 1 JULY 16
82 415 1ST AUGUST 16
82 420 16 - SEP - 01TERM_KEY MONTH_ACTUAL MONTH_DAT 6 MONTHS TOTAL
---------- ------------ --------- --------------
82 422 1 OCTOBER 16
82-436 NOVEMBER 1, 16
82 556 2658 1 DECEMBER 16
82 568 1 JANUARY 17
82 624 1 FEBRUARY 1716 selected lines.
SQL >
SY.
Maybe you are looking for
-
A file has been added to my PC without my permission and I can't delete files programs returned MSG, it's that the file is open in another application. How can I delete?
-
How to find a specific voice memo file in the backup from my iPhone to my Mac? I know where to find the backup, but not how to recover specific files. Thank you.
-
Satellite M30: colored lines running vertically on the screen
Hello Ive had a problem with the display on my satellite M30. I can start in fine etc windows but colorful lines going up and down my screen, as well as the general artifacts. I cant even install drivers nvidia without a blue screen. The strange thin
-
I can collect data from a hygrometer in a text file using the RS232 port with the following T75.2F:H17.0% format, these data are collected using a data logger software. I was wondering if I can collect this data for later analysis using Dasylab. Any
-
According to the link below, TS supports regular expressions. Can anyone provide an example where to write regular expressions? I might be easier to do via a plug-in of .net, but TS permitting, I might go with it. http://zone.NI.com/reference/en-XX/