get the index of the same values in table
Hi guys,.
I'm trying to get the index of array elements with the same value but it can solve mine.
my case is:
array1 = [1,2,3,4]; <-here are the names of the pages, always in the order of CSA (these table I used only to check the results of my work, probably will not be for you but maybe...)
array2 = [1,1,2,2,2,3,4,4,4]; <-these numbers are random, but always in the CSA order (these are the names of pages for items in table 3)
array3 = [a, b, g, i, f, e, c, h, d]; <-these are all the values of the elements I want to work with later. number of articles is still the same as in array2, their indexes are corresponding.
array4 = [];
I need to remove array3 everything, but one of each issue of array2 (as I will remove duplicates) or push to array4 an article of array3 for each number of the array array2 (as I'm going to ignore duplicates)
don't know is my desc is clear enough, but the result I get is:
ex. [a, g, e, c]
above example for each number of array2 array3 items, but do not have to be first, can be second or third if etc exist, but have to be alone.
I thought that if I get duplicate values, the index in the array array2 and delete this index in array3 will get what I want, but can not solve.
You will appreciate all help.
Thank you
Try something like this:
var array2 = [1,1,2,2,2,3,4,4,4]; var array3 = ["a","b","g","i","f","e","c","h","d"]; var tempArray = []; var resultArray = []; var n , x ; for(var n=array2.length-1;n>=0;n--) { var string = ""+array2[n]; tempArray[string] = array3[n]; } for(x in tempArray) { resultArray.push(tempArray[x]); } resultArray.reverse(); // a,g,e,c
Hope, that helps.
Uwe
Tags: InDesign
Similar Questions
-
I found some help on older versions of Firefox, but I can't seem to find anything for the latest versions greater than 8. There must be a way to do this for imaging large scale.
Have you created a defaults\profile in the folder of the program Firefox (C:\Program Files\Mozilla Firefox\)?
All files in this folder will be moved into each newly created profile folder.
To give the prefs a default, it is best to do this via a mozilla.cfg file.
Use a mozilla.cfg file in the Firefox program folder to lock the prefs or specify default values.
Place a local file - settings.js in the defaults\pref folder where you will also find the channel - prefs.js to specify using mozilla.cfg file.pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0); // use this to disable the byte-shift
See:
You can use these functions in mozilla.cfg:
defaultPref(); // set new default value pref(); // set pref, but allow changes in current session lockPref(); // lock pref, disallow changes
-
SQL: fill the same value, until it gets another NOT NULL value
It's my main table
CREATE TABLE MAIN (EMPNO INTEGER, DATE OF EFF_DT);
INS IN HAND VALUES(1,'2013-01-01');
INS IN HAND VALUES(1,'2013-03-01');
INS IN HAND VALUES(1,'2013-05-01');
INS IN HAND VALUES(1,'2013-07-01');
INS IN HAND VALUES(1,'2013-09-01');
INS IN HAND VALUES(1,'2014-01-01');
It's my table of choiceCREATE TABLE LKP (EMPNO INTEGER, TYPE_CD VARCHAR (10), EFF_DT DATE);
INS IN LKP VALUES(1,'A','2013-01-01');
INS IN LKP VALUES(1,'B','2014-01-01');My query:
SALT
M.EMPNO AS MAIN_EMP,
M.EFF_DT AS MAIN_DT,
L.TYPE_CD
HAND M LEFT JOIN LKP L ON M.EMPNO = L.EMPNO AND M.EFF_DT = L.EFF_DTResult:
MAIN_EMP MAIN_DT TYPE_CD
2013-01-01 1A
1 01-03-2013?
1 05-01-2013?
1 01-07-2013?
1 01-09-2013?
2014-01-01 1, BExpected result: (I need to get the same value, until I have a new value of research)
MAIN_EMP MAIN_DT TYPE_CD
2013-01-01 1A
2013-03-01 1A
2013-05-01 1A
2013-07-01 1A
2013-09-01 1A
2014-01-01 1, BPlease help me in this regard.
Concerning
KVB
RaminHashimzade wrote:
For 11g (ignores null values)
SELECT M.EMPNO AS MAIN_EMP,
M.EFF_DT AS MAIN_DT,
NVL (L.TYPE_CD, lag(L.TYPE_CD ignore nulls) over (partition by M.EMPNO of M.EFF_DT order)) TYPE_CD
HAND M
LEFT JOIN LKP L
ON M.EMPNO = L.EMPNO
AND M.EFF_DT = L.EFF_DT
order by 2
----
Ramin Hashimzade
It's not only 11g, which is also 10g
-
Find the same value in different columns
Hello
I'm trying to figure out how I would get the same value in the same row but in different columns. For example, in the table sometimes report the name is the same as the description. I would like to find all the lines where this is the case.
Thank you
Name of the report Description Date Time Report 1 Report 1 Delalande TTTT Report 2 Billing report Delalande TTTT Report 3 Report 3 Delalande TTTT Hello
Is that what you want?
SELECT *- or whatever the columns that you want to
FROM table_x
WHERE description = report_name
;
If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
Explain, using specific examples, how you get these results from these data.
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
-
Is it possible that I can select an object or objects that have a value of mixed CMYK or Grayscale, and then select a Spot color and it will keep the same value of midtones as before?
For example, I have an object that is C: 0 M: 0 Y: 0 k: 20 and I select Reflex Blue. What is happening is it change my object to 100% Reflex Blue. Is there a way to change to automaitically Reflex Blue 20%?
Another example, I have 3 objects, one is 20 k: the second is 40 k: and the third is KC: 85. I want to select all the objects in three at the same time, select Yellow PANTONE and get them to change yellow PANTONE 20, 40 yellow PANTONE and PANTONE yellow 85.
Is there a way to do it or I will always have to manually edit each element?
Thanks for the help.
Select the elements to recolor
Edit > edit colors > redefine > follow my screenshots
I love clicking this button under the entitlement, one place for everything that you color reduction settings.
Use tinted scale. Exact will give you 100% of the color. The exact word is confusing here, this means that the color of the destination (100% of everything that the color you choose), not a version tinged scale.
Unfortunately I do not know how to get the exact values of blacks to convert the exact values of spot color. Scale of hues will you get you get you close enough for what you need. In my example that a black 89% converts a 84% of the place, so no exact but alteast I have a range of shades, and sometimes the results are better than accurate, depends on your art.
Here are my before and after.
-
An update on an index column with the same value generates an index to the top
An update on an index column with the same value generates an update of the index?
Thank youIn addition to my previous answer, see also
http://orainternals.WordPress.com/2010/11/04/does-an-update-statement-modify-the-row-if-the-update-modifies-the-column-to-same-value/
Riyaj Shamsudeen has this to say:
"+ We have an index on this column v1 and we update this column indexed too." Oracle was updating the indexed column? N ° if the values match the level of the indexed column, then the code of RDBMS isn't up-to-date index, a feature for optimization again. Only the row of table is updated, and the index is not updated. + "Hemant K Collette
-
Only GET records that have the same values of field has the same value in field B
Have a hard time with below, please help.
Here's the situation:
create table cord (identification NUMBER, CM VARCHAR2 (3), PM VARCHAR2 (2));
insert into string values (1, '002', 'H1');
insert into string values (2, '006', 'H1');
insert into string values (3, '004', 'H2');
insert into string values (4, '006', 'H2');
insert into string values (5, '004', 'H3');
insert into string values (6, '004', 'H3');I just need to select the folders which, for the SAME value of PM have the same value in CM, in example above, those are recordings with ID (5,6).
1 and 2 fail because for them CM and PM are different for the same H1, similar on the 3 and 4.
I don't know if this will help but records are always in 'pairs', which means that there are no cases as
7. '004' | H4
8. ' 006' | H4
9. '005' | H4
Any ideas are much appreciated.
Thank you
See if the following can help...
select id,cm,pm from( select t.* ,count(1) over(partition by cm,pm) cnt from testt t ) where cnt>1;
-
SelectManyShuttle: get the selected values
Hi all.
My task is to make declarative component (or any other reusable solution) that contains the selected component to many shuttle and should proceed with a treatment of the selected values (IDs and labels). During this operation, I found that this shuttle component returns the bean always and only point index, nothing more.
First of all, I tried MyBean.setSelected and found it is called with list < integer > instead of < SelectItem > list or any similar. These integers is the index 0 of selected lines. Then I tried to valuePassThru, but it triggered a mocking effect only: setSelected receives List < String > with the same values of the index 0 chained. Finally, I tried valueChangeListener and newValues - everything was the same, both in JDeveloper corresponding 11.1.1.5 & 11.1.2.1 with ADFs. Googling did me a lot of links--say, the need to get the values selected from the selectManyShuttle --but nothing that I can use.<af:selectManyShuttle label="" id="sms1" styleClass="AFStretchWidth" value="#{MyBean.selected}" valueChangeListener="#{MyBean.shuttleChangeListener}" valuePassThru="true"> <f:selectItems value="#{attrs.items}" id="si1"/> </af:selectManyShuttle>
Maybe I should get a model and an iteration, but in several tests (for example, ((MyBean) this) .getAttribute ('items')) I failed to locate him. In any case, I would be happy to see that any solution work.What do you get when solve you the EL "#{attrs.items}" in the method of bean? Not sure if you have access to everything or what you get in return, but you can try.
Just put a breakpoint in the method and type the EL in the evaluator 'EL' and see if you get something in return and what type it is. I hope you have the list you put in to fill the shuttle.Timo
-
All channels to HAVE it have the same value - NI PCI-6221 and NI PCI-6229
Hello
I use the aiex1.cpp example for a multi-channel read with the devices mseries 6221 and 6229.
This example works for a lane, but other chains have the same value (difference of +-0.001 Volt).
For example: I put 5 Volt on the first string, and then the other channel are 5 Volt too.
What should I consider in the configuration?
Heiko Hello!
your description looks like the effect you are having 'ghosts '.
For more information about ghost images and how to get rid of, check out these links:
http://digital.NI.com/public.nsf/allkb/73CB0FB296814E2286256FFD00028DDF?OpenDocument
and
http://digital.NI.com/public.nsf/allkb/C6C7DE575301A379862572DD00480A01?OpenDocument
Best regards
Moritz M.
-
Get the current value of the variable when reaching CNVCreateSubscriber
I use CNVCreateSubscriber () to create a subscription read to a network Variable: whenever the value of the variable changes, the DataCallback is called and I'm able to get the new value of the variable.
But how to get the value of the variable when a subscription is created?
I read in the help CNVCreateBufferedSubscriber () returns this information, but I wonder if using CNVGetDataFromBuffer () in a polling loop has the same performance as the approach to DataCallback of CNVCreateSubscriber ().
In addition, the dataStatus (CNVGetDataFromBuffer) parameter is different for different Subscribers? (that is if I have multiple subscribers, CNVStaleData is related to the specific Subscriber or is a global property of the variable)?
CNVData data;
CNVGetConnectionAttribute (customer, CNVMostRecentDataAttribute, &data);)
-
Printer Lexmark Pro 200. Does not print the correct colors. I restarted my computer and the printer is off but get the same result.
Hello
- What were the changes made before the problem occurred?
You try to run this fix and check.
http://Windows.Microsoft.com/en-us/Windows7/open-the-printer-Troubleshooter
If above does not work, try contacting Lexmark support for assistance.
http://www1.Lexmark.com/en_US/global-services/customer-support-services/index.shtml
-
Get the current value of a control of the ring
I have a control of the ring that has the following values. See attacment. I need to get the current value of this one and use it as input for another function, but First I would like to get the current value and save ina text file. I tried this
if (event == EVENT_LEFT_CLICK_UP) || (event == EVENT_LEFT_CLICK_DOWN) { int p; GetCtrlVal (panelHandle, PANEL_RINGSLIDE_1, &p); FILE *OutFile = fopen("C:\\Users\\Student\\Desktop\\ringtest.txt","w"); fprintf(OutFile,p); fclose(OutFile); }
I need to get the current value of the ring (& p) to write to the file ringtest.txt.
Also, I need to use this value (& p) as another entry in the same program.
IE value of & p must be used in
b = c * 5; where c is the value of the current & p.
Can any 1 help?
You're right: EVENT_LEFT_CLICK_DOWN is not a valid event for the CVI. Valid events are listed in the userint.h file, and are the only events that can be caught in the trap in a point of order. On the other hand, you're assuption on EVENT_VAL_CHANGED is correct: you can trap forget the EVENT_CLICK_UP event.
According to the second question, looking at the definition for fprintf you must pass a string format as the second parameter to the function, then the value to write to the file. In your case, the correct syntax is:
fprintf (OutFile, "%d", p);
-
inputText and ouputText does not display the same value
Hello
JDev 11.1.2.4
On my page, I have an inputText and outputText bound to the same link of the attribute. The bind value is defined in a value change listener, and then the two components are updated. Say I put in 2009 for the PeriodFrom, the inputText remains empty, but the outputText shows the 2009. How is possible that the two items related to the same link does not show the same value.
< af:inputText value = "#{bindings." PeriodFrom.inputValue}"required =" #{bindings. " PeriodFrom.hints.mandatory}.
columns = "#{bindings." PeriodFrom.hints.displayWidth}"shortDesc =" #{bindings. " PeriodFrom.hints.tooltip}"id ="id1 ".
autoSubmit = "true" simple = "true" >
< f: validator binding = "#{bindings." PeriodFrom.validator} "/ >"
< / af:inputText >
< af:outputText value = "#{bindings." PeriodFrom.inputValue}"id ="ot3"clientComponent ="true"/ >
Furthermore, I tried to get the RichInputText component and call a getValue on it, and the value returned is 2009. I'm completely lost.
Thank you
I made the fragment of page from scratch. I discovered why the update does not work. This is because the selectOneChoice is inside an af:subform. If I remove the subform, the update works correctly.
shortDesc = "#{bindings." StdcntyCode.hints.tooltip}"id ="soc2"simple ="true"autoSubmit = 'true '.
valueChangeListener = "#{pageFlowScope.identificationSessionEditBean.countryValueChangeListener}" > "
columns = "#{bindings." PeriodFrom.hints.displayWidth}"shortDesc =" #{bindings. " PeriodFrom.hints.tooltip}"id ="id1 ".
autoSubmit = "true" simple = "true" >
columns = "#{bindings." PeriodTo.hints.displayWidth}"shortDesc =" #{bindings. " PeriodTo.hints.tooltip}"id ="id2 ".
autoSubmit = "true" simple = "true" >
-
Exception while trying to get the selected value for the choice of SelectOne in ADF Mobile
I added the following code after arriving through this post https://forums.oracle.com/thread/2536419
DCBindingContainer dcBindings = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
DCIteratorBinding iterBind = (DCIteratorBinding) dcBindings.get ("facilitySelectItems");
Attribute String = (String) iterBind.getCurrentRow () .getAttribute (0);
But Jdeveloper complained class BindingContext wasn't available and I get the jar file adfm.jar has not been added to the project. I added it manually the path C:\JDeveloper11r24\oracle_common\modules\oracle.adf.model_11.1.1\adfm.jar. Once I've deployed code on an android emulator, I get the below error. Can someone please?
07-25 13:18:03.812: D/CordovaLog (869): [SEVERE - oracle.adfmf.framework - adf.mf.internal - logError] request: {classname: oracle.adfmf.framework.api.Model; method: evaluateMethodExpression; params: [0: #{pageFlowScope.IBCMSearchBean.getSearchParams}] [1:] [2: {}] [3:] ;} exception: {message: oracle/adf/model/binding/DCBindingContainer (unsupported major.minor version 50.0); the severity: ERROR; .Guy: oracle.adfmf.framework.exception.AdfException; .exception: true ;}}}
The version of the compiler maximum the JDev shows that 1.4. And I'm using version 11.1.2.4.0 for JDeveloper. The JDK version is 1.6.0_24.
Sorry I missed the question!
First of all, to get the value of selectedItem in selectOneChoice do not have another function in the domain controller. Here is an excellent article by Frank that explains this. Or you can use the below function to get the selected value immediately. Here the market is the value of selectOneChoice attribute. I wasn't aware of this method until you have read this article.
{} public void getAndSetMarketValue (market of the object)
ValueExpression ve = (ValueExpression) AdfmfJavaUtilities.getValueExpression ("#{bindings.marketSelectItems}", Object.class);
AmxAttributeBinding attrBinding = (AmxAttributeBinding) ve.getValue (AdfmfJavaUtilities.getAdfELContext ());
access the iterator that populates the list of values in
the selectManyChoice component
AmxIteratorBinding amxListIterator = attrBinding.getIteratorBinding ();
the AmxIteratorBinding is a wrapper for the BasicIterator
iterator which sets out the information we need
ListIterator BasicIterator = amxListIterator.getIterator ();
for each index value, query the name of the service (you can
access and attribute from the line) to display
SelectedValue = string
(String) listIterator.getAttributeValueAtIndex (((New Integer ((String) market))) .intValue (), "Value");
}
Second, you can use #{row} in commandLink's action since it is something that is evaluated when the user clicks on the link and we do not have access to #{line} after that the entire component is rendered. To remedy this give an action for the commandlink which is a function in the bean and the function of bean back to the action of the link selected.
ListOfReports.amx
.......
.......
LoginBean.java
......
public String returnClickValue() {}
Option of string = AdfmfJavaUtilities.evaluateELExpression("#{viewScope.selectedItem}").toString ();
return option;
}
......
-
The column is to summarize all the lines and display the same value in all the lines.
Hello
Please see the query below. I have a problem in this query to retrieve the abs_qty when the P:item ie setting) msib.segment1 is not given as an input parameter. His warning just to the top of the total quantity for all items. With the passage of P:item ie) msib.segment1 as an input parameter, it gets the exact value for abs_qty. kindly help me to solve this problem.
Note only: manufacturing plant, start date and end Date are Mandatory parameters (required). Others such as code point, Base model and Scheduler are optional.
SELECT mmt.transaction_date date_produced, msib.segment1 point,
CIC.cost_type_id, msib.description item_description,
MC.segment6 base_model, mc.segment7 trade_brand,
MMT.subinventory_code subinventory,
mil. Segment1 | '.' || mil. Segment2 | '.' || mil.segment3 ELECTROLUX,
OOD.organization_code
|| '-'
|| OOD.organization_name manufacturing_plant,
MMT.transaction_quantity quantity_produced,
MTT.transaction_type_name transaction_type, msib.inventory_item_id,.
MSIB.organization_id, cic.material_cost, COST,
CIC.material_overhead_cost transport, csc.standard_cost,.
* (check (NVL ((SELECT SUM (mmt.transaction_quantity) total_NET_qty *))))
OF mtl_material_transactions mmt.
mtl_system_items_b msib,
mtl_transaction_types mtt,
org_organization_definitions ood,
mtl_txn_source_types mts
WHERE mmt.organization_id = msib.organization_id
AND msib.inventory_item_id = mmt.inventory_item_id
AND mmt.transaction_type_id = mtt.transaction_type_id
AND mmt.organization_id = ood.organization_id
AND mtt.transaction_type_name = "Completion of work in PROGRESS"
AND mts.transaction_source_type_name = 'job or schedule. "
AND msib.segment1 = NVL (: p_item, msib.segment1)
AND ood.organization_code =: p_manufacturing_plant
AND BETWEEN TRUNC (mmt.transaction_date): p_start_date
AND: p_end_date), 0)
-
* (NVL ((SELECT SUM (mmt.transaction_quantity) total_NET_qty *)))
OF mtl_material_transactions mmt.
mtl_system_items_b msib,
mtl_transaction_types mtt,
org_organization_definitions ood,
mtl_txn_source_types mts
WHERE mmt.organization_id = msib.organization_id
AND msib.inventory_item_id = mmt.inventory_item_id
AND mmt.transaction_type_id = mtt.transaction_type_id
AND mmt.organization_id = ood.organization_id
AND mtt.transaction_type_name = "Ongoing work exit"
AND mts.transaction_source_type_name = 'job or schedule. "
AND msib.segment1 = NVL (: p_item, msib.segment1)
AND ood.organization_code =: p_manufacturing_plant
AND BETWEEN TRUNC (mmt.transaction_date): p_start_date
AND: p_end_date
*), 0))) abs_qty of the double) AS ABS_qtyy, * (select (NVL ((SELECT SUM (mmt.transaction_quantity) total_NET_qty
OF mtl_material_transactions mmt.
mtl_system_items_b msib,
mtl_transaction_types mtt,
org_organization_definitions ood,
mtl_txn_source_types mts
WHERE mmt.organization_id = msib.organization_id
AND msib.inventory_item_id = mmt.inventory_item_id
AND mmt.transaction_type_id = mtt.transaction_type_id
AND mmt.organization_id = ood.organization_id
AND mtt.transaction_type_name = "Completion of work in PROGRESS"
AND mts.transaction_source_type_name = 'job or schedule. "
AND msib.segment1 = NVL (: p_item, msib.segment1)
AND ood.organization_code =: p_manufacturing_plant
AND BETWEEN TRUNC (mmt.transaction_date): p_start_date
AND: p_end_date), 0)
-
(((SELECT SUM (mmt.transaction_quantity) total_NET_qty NVL
OF mtl_material_transactions mmt.
mtl_system_items_b msib,
mtl_transaction_types mtt,
org_organization_definitions ood,
mtl_txn_source_types mts
WHERE mmt.organization_id = msib.organization_id
AND msib.inventory_item_id = mmt.inventory_item_id
AND mmt.transaction_type_id = mtt.transaction_type_id
AND mmt.organization_id = ood.organization_id
AND mtt.transaction_type_name = "Ongoing work exit"
AND mts.transaction_source_type_name = 'job or schedule. "
AND msib.segment1 = NVL (: p_item, msib.segment1)
AND ood.organization_code =: p_manufacturing_plant
AND BETWEEN TRUNC (mmt.transaction_date): p_start_date
AND: p_end_date
(), 0))) abs_qty of dual) * csc.standard_cost AS abs_val
OF mtl_material_transactions mmt.
mtl_system_items_b msib,
mil mtl_item_locations
mtl_transaction_types mtt,
org_organization_definitions ood,
mtl_txn_source_types mts,
MC mtl_categories,
mtl_item_categories mic,
MCS mtl_category_sets,
cst_item_costs cic,
cst_standard_costs csc,
cst_cost_types ct,
mfg_lookups OLM
WHERE mmt.organization_id = msib.organization_id
AND msib.inventory_item_id = mmt.inventory_item_id
AND mmt.locator_id = mil.inventory_location_id
AND mil.organization_id = msib.organization_id
AND mil.subinventory_code = mmt.subinventory_code
AND mmt.transaction_type_id = mtt.transaction_type_id
AND msib.organization_id = ood.organization_id
AND mic.category_set_id = mcs.category_set_id
AND mc.category_id = mic.category_id
AND mc.structure_id = mcs.structure_id
AND mic.inventory_item_id = msib.inventory_item_id
AND mic.organization_id = msib.organization_id
AND mcs.category_set_id = 52487965
AND msib.inventory_item_id = cic.inventory_item_id
AND msib.organization_id = cic.organization_id
AND ct.cost_type_id = cic.cost_type_id
AND cic.organization_id = ood.organization_id
AND mil.inventory_location_id = mmt.locator_id
AND mmt.transaction_source_type_id = mtt.transaction_source_type_id
AND mmt.transaction_action_id = mtt.transaction_action_id
AND mmt.transaction_source_type_id = mts.transaction_source_type_id
AND mmt.transaction_action_id = mlo.lookup_code
AND mmt.inventory_item_id = csc.inventory_item_id
AND mmt.organization_id = csc.organization_id
AND csc.last_update_date > =.
(SELECT MAX (csc1.last_update_date)
OF cst_standard_costs csc1
WHERE csc1.inventory_item_id = mmt.inventory_item_id
AND csc1.organization_id = mmt.organization_id)
AND msib.segment1 = NVL (: p_item, msib.segment1)
AND NVL (mc.segment6, 'X') = NVL (: p_base_model, NVL (mc.segment6, 'X'))
AND = NVL (msib.planner_code, 'Y')
NVL (: p_planner_code, NVL (msib.planner_code, 'Y'))
AND SUPERIOR (mlo.meaning) = "COMPLETION of the ASSEMBLY.
AND mtt.transaction_type_name = "Completion of work in PROGRESS"
AND ct.cost_type = 'Frozen '.
AND mts.transaction_source_type_name = 'job or schedule. "
AND ood.organization_code =: p_manufacturing_plant
AND BETWEEN TRUNC (mmt.transaction_date): p_start_date AND: p_end_dateIf abs_qty and, accordingly, abs_val must not be the same for all rows returned, you will need to rewrite your query so that the abs_qty will not be calculated (separately) in isolation without interaction with the data in the main table list.
Your query is treated the same as below (note the changed table alias by adding numbers to the original of yours)SELECT mmt.transaction_date date_produced, msib.segment1 item, cic.cost_type_id, msib.description item_description, mc.segment6 base_model, mc.segment7 trade_brand, mmt.subinventory_code subinventory, mil.segment1 || '.' || mil.segment2 || '.' || mil.segment3 LOCATOR, ood.organization_code || '-' || ood.organization_name manufacturing_plant, mmt.transaction_quantity quantity_produced, mtt.transaction_type_name transaction_type, msib.inventory_item_id, msib.organization_id, cic.material_cost COST, cic.material_overhead_cost freight, csc.standard_cost, (select (NVL( (SELECT SUM (mmt1.transaction_quantity) total_NET_qty FROM mtl_material_transactions mmt1, mtl_system_items_b msib1, mtl_transaction_types mtt1, org_organization_definitions ood1, mtl_txn_source_types mts1 WHERE mmt1.organization_id = msib1.organization_id AND msib1.inventory_item_id = mmt1.inventory_item_id AND mmt1.transaction_type_id = mtt1.transaction_type_id AND mmt1.organization_id = ood1.organization_id AND mtt1.transaction_type_name = 'WIP Completion' AND mts1.transaction_source_type_name = 'Job or Schedule' AND msib1.segment1 = NVL (:p_item, msib1.segment1) AND ood1.organization_code = :p_manufacturing_plant AND TRUNC (mmt1.transaction_date) BETWEEN :p_start_date AND :p_end_date ),0 ) - NVL( (SELECT SUM (mmt2.transaction_quantity) total_NET_qty FROM mtl_material_transactions mmt2, mtl_system_items_b msib2, mtl_transaction_types mtt2, org_organization_definitions ood2, mtl_txn_source_types mts2 WHERE mmt2.organization_id = msib2.organization_id AND msib2.inventory_item_id = mmt2.inventory_item_id AND mmt2.transaction_type_id = mtt2.transaction_type_id AND mmt2.organization_id = ood.2organization_id AND mtt2.transaction_type_name = 'WIP Issue' AND mts2.transaction_source_type_name = 'Job or Schedule' AND msib2.segment1 = NVL (:p_item, msib2.segment1) AND ood2.organization_code = :p_manufacturing_plant AND TRUNC (mmt.2transaction_date) BETWEEN :p_start_date AND :p_end_date ),0 ) ) abs_qty from dual ) AS ABS_qtyy, (select (NVL( (SELECT SUM (mmt3.transaction_quantity) total_NET_qty FROM mtl_material_transactions mmt3, mtl_system_items_b msib3, mtl_transaction_types mtt3, org_organization_definitions ood3, mtl_txn_source_types mts3 WHERE mmt3.organization_id = msib3.organization_id AND msib3.inventory_item_id = mmt3.inventory_item_id AND mmt3.transaction_type_id = mtt3.transaction_type_id AND mmt3.organization_id = ood3.organization_id AND mtt3.transaction_type_name = 'WIP Completion' AND mts3.transaction_source_type_name = 'Job or Schedule' AND msib3.segment1 = NVL (:p_item, msib3.segment1) AND ood3.organization_code = :p_manufacturing_plant AND TRUNC (mmt3.transaction_date) BETWEEN :p_start_date AND :p_end_date ),0 ) - NVL( (SELECT SUM (mmt4.transaction_quantity) total_NET_qty FROM mtl_material_transactions mmt4, mtl_system_items_b msib4, mtl_transaction_types mtt4, org_organization_definitions ood4, mtl_txn_source_types mts4 WHERE mmt4.organization_id = msib4.organization_id AND msib4.inventory_item_id = mmt4.inventory_item_id AND mmt4.transaction_type_id = mtt4.transaction_type_id AND mmt4.organization_id = ood4.organization_id AND mtt4.transaction_type_name = 'WIP Issue' AND mts4.transaction_source_type_name = 'Job or Schedule' AND msib4.segment1 = NVL (:p_item, msib4.segment1) AND ood4.organization_code = :p_manufacturing_plant AND TRUNC (mmt4.transaction_date) BETWEEN :p_start_date AND :p_end_date ),0 ) ) abs_qty from dual ) * csc.standard_cost AS abs_val FROM mtl_material_transactions mmt, mtl_system_items_b msib, mtl_item_locations mil, mtl_transaction_types mtt, org_organization_definitions ood, mtl_txn_source_types mts, mtl_categories mc, mtl_item_categories mic, mtl_category_sets mcs, cst_item_costs cic, cst_standard_costs csc, cst_cost_types ct, mfg_lookups mlo WHERE mmt.organization_id = msib.organization_id AND msib.inventory_item_id = mmt.inventory_item_id AND mmt.locator_id = mil.inventory_location_id AND mil.organization_id = msib.organization_id AND mil.subinventory_code = mmt.subinventory_code AND mmt.transaction_type_id = mtt.transaction_type_id AND msib.organization_id = ood.organization_id AND mic.category_set_id = mcs.category_set_id AND mc.category_id = mic.category_id AND mc.structure_id = mcs.structure_id AND mic.inventory_item_id = msib.inventory_item_id AND mic.organization_id = msib.organization_id AND mcs.category_set_id = 52487965 AND msib.inventory_item_id = cic.inventory_item_id AND msib.organization_id = cic.organization_id AND ct.cost_type_id = cic.cost_type_id AND cic.organization_id = ood.organization_id AND mil.inventory_location_id = mmt.locator_id AND mmt.transaction_source_type_id = mtt.transaction_source_type_id AND mmt.transaction_action_id = mtt.transaction_action_id AND mmt.transaction_source_type_id = mts.transaction_source_type_id AND mmt.transaction_action_id = mlo.lookup_code AND mmt.inventory_item_id = csc.inventory_item_id AND mmt.organization_id = csc.organization_id AND csc.last_update_date >= (SELECT MAX (csc1.last_update_date) FROM cst_standard_costs csc1 WHERE csc1.inventory_item_id = mmt.inventory_item_id AND csc1.organization_id = mmt.organization_id ) AND msib.segment1 = NVL (:p_item, msib.segment1) AND NVL (mc.segment6, 'X') = NVL (:p_base_model, NVL (mc.segment6, 'X')) AND NVL (msib.planner_code, 'Y') = NVL (:p_planner_code, NVL (msib.planner_code, 'Y')) AND UPPER (mlo.meaning) = 'ASSEMBLY COMPLETION' AND mtt.transaction_type_name = 'WIP Completion' AND ct.cost_type = 'Frozen' AND mts.transaction_source_type_name = 'Job or Schedule' AND ood.organization_code = :p_manufacturing_plant AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date AND :p_end_date
Concerning
Etbin
Maybe you are looking for
-
Want to auto fill a context menu
Hello! I'm looking for a way to auto fill a context menu with the data of a column on a separate sheet. On sheet 1, I have a bunch of product names in column A (with their prices and taxes from columns B.). On the sheet 2, column A, I would choose th
-
Strange sieve grid requires the closing down.
Twice in the last week, a series of gray rectangles changed my screen MBPr. I think I was just move a file to another folder, one of the time. Can't remember what the second time, but nothing to intensive. One time, he began as a horizontal bar at th
-
Satellite A205-S5804 broekn - turns off after I turn it on.
Hello. My A205-S5804 broke down yesterday. It turns off seconds after I turn on (the fact both on battery and that too), then turn it on and off repeatedly for like four times before stay off. It shows nothing on the screen doesn´t POST and no beeps.
-
TRANSPOSE THE TABLE 1 D TO SEARCH AFTER
Hello What I want to do is table 1 d of transposition (I in a column) to use after the 'Search in 1 table D' function, which works only if the table is linear. I have no change before the table 1 d of origin online. I have to transpose it from column
-
How to print a list of the names of the .jpg files in a specific folder
I have a large amount of .jpg files in a certain folder. I would like to print a list, by name, of what .jpg, it is I. I certainly don't want to print the photos. Even my husband, the it professional, would not understand it. Thank you