Nested loops in the XSLT handling
HelloI want to manage nested loops for each within the transformation roadmap.
I have two collections of source and a target collection.
I have to search the value of key in source1 source2 and if the key is found, I map the value of the target, and if the key is not found, maybe I want to the key itself to target.
This is the input samples and the results expected from the transformation roadmap. Please help turn in the required format.
Entry
----------------------
------------------------
< Source1Collection >
< Group1 >
< key > < / keys >
i < value > < / value >
< / Group1 >
< Group2 >
b < Key > < / key >
II < value > < / value >
< / Group2 >
Group < 3 >
< Key > c < / keys >
III < value > < / value >
< / Group 3 >
< / Source1Collection >
---------------------------------------
< Source2Collection >
< Feild1 > z < / Feild1 >
< Feild1 > x < / Feild1 >
c < Feild1 > < / Feild1 >
< Feild1 > v < / Feild1 >
b < Feild1 > < / Feild1 >
< / Source2Collection >
----------------------------------------
Output
--------------------------------------
--------------------------------------
< TargetCollection >
< Field1 > one < / Feild1 >
b < Field1 > < / Feild1 >
III < Field1 > < / Feild1 >
< / TargetCollection >
is it possible that I can keep the position of the corresponding source2Key "?" This will help me to map the corresponding value of the sourceKey2 to the target.
For something like that...
1 one
2 two
3 three
You can use the following to get the value of a respective key...
Thus, when $key = '2' the expression above will return "two"...
I hope this helps...
See you soon,.
Vlad
Tags: Fusion Middleware
Similar Questions
-
Essentially, once a movieclip was played, he heads to gotoAndStop (1) will cause audio within its child clips to loop, although the timeline will never trigger the.
We noticed this bug popping up in a lot of product delivered and it goes back to the public Service 18.0.0.324 update (.225 is OK).
Debug configuration: even after replacing EDI with FP20 projector, it can always does when you preview of Flash; but he will present in the projector, AX, FF and Chrome plugins.
Create movieclip 'wrapper' on the main timeline at least 2 images.
Create movieclip "subitem" within the envelope at least a few images of long. Incorporate audio on a keyframe in a subitem. No keyframes.
For my test, a subelement is never allowed to play, and the audio is located on the frame 5. Frame 1-4 contains "stop()" and one the event for debugging purposes.
Add this code to the main timeline
wrapper.addEventListener ("blah", foo);
function foo(e:Event):void {}
wrapper.removeEventListener ("blah", foo);
wrapper.gotoAndStop (1);
}
and has wrapper dispatches an event 'blah' on its last image.
Result: Seen outside the IDE, 'wrapper' play once, stops, and audio clip starts a loop with a rehearsal time based on the length of a subitem, despite the fact that a subelement does not actually play. I added a text box and channeled text of debugging for it so that subitem would fall within its current framework, and it never leaves the Framework 1.
Mysterious!
Bonus: I traced a click of the mouse for SoundMixer.stopAll (), but he keeps only a single instance. Don't know if TI which is a useful detail, but he suggests that each iteration is a new instance, once again, as if the home itself was in a loop.
Solution: Play audio via code (Sound.play ()) instead of points in the timeline does not trigger this bug.
Edit: (I hope that's enough to recreate. I can provide a FLA on request, had thought that there was an ability to 'fix' this forum.)
Edit 2: I forgot the Question. Is there a workaround that can be achieved via a post parameter, or something global? We have hundreds (thousands?) of files to the difficulty for our clients if this bug is not get patched in before they update past FP 18.0.0225.
We injected a similar bug over the holidays that must be resolved. (We can have * just * past this fix today.)
You still see this symptom with the latest version of the Flash Player? (20.0.0.286)
-
Hello
I have a small question:
for v in c loop
for v c1 loop
AnyValue: = do some calc;
end loop;
end loop;
How is it possible for me to get the value of AnyValue on both loops? So, how to pass this variable outside the loop?
Thanks in advance.>
END LOOP;
v_test: = ANY_Value; -Get out of the loop on the inside of the loop
>
Assign the value once the ends of the loop will have access only the LAST value that was assigned in the loop. It is not clear if OP wants access to ALL values of the inside of the loop or only the last one. -
Help to find the best way to interior design (Nested Loops of sliders?)
Oracle 11G
First here the table I work with, for example data
ID FID ANNOTATION DESIGNATION LOW HIGH SEQ 1 1008755360 FC1053, 81-82 FC1053 81 82 1 2 1008755360 XD, 3-24 XD 3 24 2 3 1008756293 FC1053, 81-82 FC1053 81 82 1 4 1008756293 XD, 3-24 XD 3 24 2 Each FID is a different line, these two lines are connected physically, that's why I've shown them here on the table. Each line has a 'meter', in this case, each line has 2 lines of account that are the same.
From there, we can say that FC1053, 81 and 82 are connected between the 2 cables. XD DESIGNATION means that cables are connect not really so I can't ignore those.
We have a different way to show that they connect other than only those data and I need to connect each other too much. For this I need the Info
FID1 LOW HIGH FID2 1008755360 81 82 1008756293 So my first design was the hepatitis hase sliders 2 with the data in the table, as shown above. I would then have a nested loop. The first slider to select the first record, then go down to the second loop where I compare all other records the first record and then go back in the outer loop to move to the next record, then return once again to the inner loop to compare the values again.
LOOP1
LOOP 2
If LOOP1. IDF! LOOP2 =. IDF THEN
IF LOOP1. ANNOTATION = LOOP2. ANNOTATION THEN
-CONNECT THE DATA
ON THE OTHER
IF LOOP1. DESCRIPTION = LOOP2. DESIGNATION THEN
IF LOOP2. LOW BETWEEN LOOP1. LOW AND LOOP1. THEN HIGH
IF LOOP2. HIGH BETWEEN LOOP1. LOW AND LOOP1. HGH THEN
-CONNECT THE DATA
END IF;
END IF;
END IF;
END IF;
END IF;
END LOOP;
-Open and close done to reset the cursor to the front/top
CLOSE CURSOR LOOP2;
OPEN CURSOR LOOP2
END LOOP;
The problem with this approach is once the outside loop moves the next value of the IDF, that logic will connect them once again, but this time with the FIDs reverse which is essentially the same thing as it does not matter the direction in which they are connected. I almost feel that once I found the link I need to remove that line from the cursor (which isn't possible).
FID1 LOW HIGH FID2 1008755360 81 82 1008756293 1008756293 81 82 1008755360 I was able to
1. make a list of all those I have connected and check against that
2 use some kind of collection
3. use a temporary table to hold the data
4 something that I have not yet thought
I really appreciate in advance for any help I get.
If your query mapping is correct, this is the result of your query with the addition of the values of sum for the strand/down running. Manually change the incorrect in the output bit numbers so that we can move on to find another solution.
with gc_count like)
Select
Sum(current_high-current_low+1) on strand_high (g3e_fid seq order partition),
Sum(current_high-current_low+1) more (partition of g3e_fid order of seq).
strand_low (current_high-current_low),
t.* from b$ gc_count t
)
Select
a.g3e_fid, a.current_designation, a.current_low, a.current_high, a.strand_high, a.strand_low,
b.g3e_fid, b.current_designation, b.current_low, b.current_high, b.strand_high, b.strand_low
gc_count a, gc_count b
where a.g3e_fid in (1008757155,1008757159,1009999655)
and in b.g3e_fid (1008757155,1008757159,1009999655)
and a.g3e_fid > b.g3e_fid
and ((a.count_annotation = b.count_annotation)
or (a.current_designation = b.current_designation
and a.current_low b.current_low and b.current_high and a.current_high between b.current_low and b.current_high)
order of b.seq
/
G3E_FID CURRENT_DESIGNATION CURRENT_LOW CURRENT_HIGH STRAND_HIGH STRAND_LOW G3E_FID CURRENT_DESIGNATION CURRENT_LOW CURRENT_HIGH STRAND_HIGH STRAND_LOW
---------- --------------------- ----------- ------------ ----------- ---------- ---------- --------------------- ----------- ------------ ----------- ----------
GAGA GAGA 1008757159 1008757155 1 1 2 2 1 2 2 1
1008757159 3 8 8 3 1008757155 3 8 8 3 F1DM F1DM
1008757159 9 10 10 9 1008757155 9 10 10 9 F2 F2
1008757159 11 14 14 11 1008757155 11 14 14 11 F1DM F1DM
1009999655 17 18 6 5 1008757155 15 18 18 15 F2 F2
1008757159 15 16 16 15 1008757155 15 18 18 15 F2 F2
1009999655 21 24 4 1 1008757155 21 24 24 21 F2 F2
7 selected lines.
Elapsed time: 00:00:00.06
-
Hi, I'm a relatively new to programming of LV, so be gentle.
In a Word, I am running nested loops than the material test power on and off cycles. The parameters for each loop is entered on the front panel of the user. For example, the power supply at the time, how many times to read in the data, power supply off time and the number of cycles power is a typical customer task ask me to do. Therefore, I decided to do a generic as possible executable vi instead of writing code (in which I request is trivial), that my technicians can easily use.
I want to put a counter - down in this vi, even a journey of one. I'll take the more the off time multiplied by the number of cycles and display on the front panel. For some reason that I can't find a simple way such that when the last cycle ended if poster zero before the program ends.
For example, the total is equal to 60 minutes and 10-minute cycle. I run the program and the display shows 60 during the first cycle, after the first cycle is complete and the second cycle begins the display turns 50, and so on until that last cycle where you can read 10. Then the program ends and the screen 10. How can I get a last beat of this kind it says 0 and 0 poster before the end of the program?
Thank you!
Wire a zero to a local variable of this indicator so that it can turn when the while loop ends.
-
Partition pruning, nested loops
Hello
I'm having a problem with obtaining the size of partition in a query. I managed to dumb down the problem to the two tables and a minimum query (see below).
Basically I have a partitioned table "Made each year" and a table of assistance 'Current year' that contain always 1 row. The sole purpose of this line is to say which is the year curent, it was the previous year and that next year will be. (In the real problem, there is no standard timeperiods, so we can't calculate just previous and next by adding/subtraction 1 as would be possible in this example).
The following query is executed as I want.
It runs a scan on current_year and then nested loop on the facts. And the size of the partition that was happening.
The following query is where I have my problem.select sum(decode(a.year_key, b.curr_year, some_measure)) as curr_year_measure from yearly_fact_t a ,current_year b where a.year_key = b.curr_year; ------------------------------------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | ------------------------------------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | 39 | 4 (0)| 00:00:01 | | | | 1 | SORT AGGREGATE | | 1 | 39 | | | | | | 2 | NESTED LOOPS | | 1 | 39 | 4 (0)| 00:00:01 | | | | 3 | INDEX FAST FULL SCAN | SYS_C00247890 | 1 | 13 | 2 (0)| 00:00:01 | | | | 4 | PARTITION RANGE ITERATOR| | 1 | 26 | 2 (0)| 00:00:01 | KEY | KEY | |* 5 | TABLE ACCESS FULL | YEARLY_FACT_T | 1 | 26 | 2 (0)| 00:00:01 | KEY | KEY | ------------------------------------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 5 - filter("A"."YEAR_KEY"="B"."CURR_YEAR")
The xplan base is the same, but for some reason any cbo abandoned and decide to analyze all the partitions, which was not highly scalable data on production :)
I would have thought that the plan would be the same.
select sum(decode(a.year_key, b.curr_year, some_measure)) as curr_year_measure ,sum(decode(a.year_key, b.prev_year, some_measure)) as prev_year_measure from yearly_fact_t a ,current_year b where a.year_key = b.curr_year or a.year_key = b.prev_year; ------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | ------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 52 | 13 (0)| 00:00:01 | | | | 1 | SORT AGGREGATE | | 1 | 52 | | | | | | 2 | NESTED LOOPS | | 4 | 208 | 13 (0)| 00:00:01 | | | | 3 | TABLE ACCESS FULL | CURRENT_YEAR | 1 | 26 | 4 (0)| 00:00:01 | | | | 4 | PARTITION RANGE ALL| | 4 | 104 | 9 (0)| 00:00:01 | 1 | 6 | |* 5 | TABLE ACCESS FULL | YEARLY_FACT_T | 4 | 104 | 9 (0)| 00:00:01 | 1 | 6 | ------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 5 - filter("A"."YEAR_KEY"="B"."CURR_YEAR" OR "A"."YEAR_KEY"="B"."PREV_YEAR")
What can I do to get the size of partition that you want to occur in the second query?-- drop table yearly_fact_t purge; -- drop table current_year purge; create table current_year( curr_year number(4) not null ,prev_year number(4) not null ,next_year number(4) not null ,primary key(curr_year) ,unique(prev_year) ,unique(next_year) ); insert into current_year(curr_year, prev_year, next_year) values(2010, 2009, 2011); commit; create table yearly_fact_t( year_key number(4) not null ,some_dim_key number not null ,some_measure number not null ) partition by range(year_key)( partition p2007 values less than(2008) ,partition p2008 values less than(2009) ,partition p2009 values less than(2010) ,partition p2010 values less than(2011) ,partition p2011 values less than(2012) ,partition pmax values less than(maxvalue) ); insert into yearly_fact_t(year_key, some_dim_key, some_measure) values(2007,1, 10); insert into yearly_fact_t(year_key, some_dim_key, some_measure) values(2008,1, 20); insert into yearly_fact_t(year_key, some_dim_key, some_measure) values(2009,1, 30); insert into yearly_fact_t(year_key, some_dim_key, some_measure) values(2010,1, 40); commit;
Or better yet, what is it in my query that prevents it from happening?
We do not have Oracle Database 10 g Enterprise Edition Release 10.2.0.4.0 - 64 bit.
Best regards
RonnieI think that the decision of condition influenced gold optimizer. You can rewrite your query to use UNION ALL to see if it helps.
select sum(decode(year_key, curr_year, some_measure)) as curr_year_measure ,sum(decode(year_key, prev_year, some_measure)) as prev_year_measure from (select a.year_key, b.curr_year, some_measure from yearly_fact_t a ,current_year b where a.year_key = b.curr_year UNION ALL select a.year_key, b.curr_year, some_measure from yearly_fact_t a ,current_year b where a.year_key = b.prev_year);
Published by: user503699 on February 17, 2010 14:59
-
Need help for the conversion of the nested loops to use the stream
I'm trying to teach me how to effectively use the java stream, but finds it difficult to find the correct syntax for a problem of nested loop. I would like to convert the following code to use the Java 8 stream instead of nested loops. Can anyone provide an example or a solution?
/** * Return all members of stringListOne that begin with any of the strings in * stringListTwo * * @return all members of stringListOne that begin with any of the strings in * stringListTwo */ Set<String> getFilteredStrings(Set<String> stringListOne, Set<String> stringListTwo) { Set<String> stringListOneFiltered = new HashSet<String>(); for (String next : stringListOne) { for (String nextPrefix : stringListTwo) { if (next.startsWith(nextPrefix)) { stringListOneFiltered.add(next); } } } return stringListOneFiltered; }
Here's a test case for the above code:
/** * Test method for {@link scratchpad.MyClass#getFilteredStrings(java.util.Set, java.util.Set)}. */ @Test public final void testGetFilteredStrings() { MyClass uut = new MyClass(); Set<String> stringListOne = new HashSet<String>(); stringListOne.add("until"); stringListOne.add("unite"); stringListOne.add("under"); stringListOne.add("prepare"); stringListOne.add("pretend"); stringListOne.add("prefix"); stringListOne.add("prepend"); stringListOne.add("post"); stringListOne.add("positive"); stringListOne.add("postgame"); stringListOne.add("postpone"); Set<String> stringListTwo = new HashSet<String>(); stringListTwo.add("post"); stringListTwo.add("pre"); stringListTwo.add("und"); Set<String> result= uut.getFilteredStrings(stringListOne, stringListTwo); System.out.println(result); assertEquals(8, result.size()); }
Thanks for any help you can provide! I get the hang of using the course of water, but this particular code was difficult.
tmbc
I found the following solution to my question:
GetFilteredStrings (Set stringListOne, the value {Set
stringListTwo) Predicate startsWith
= p-> stringListTwo.stream () .anyMatch (prefix-> p.startsWith (prefix)); Return stringListOne.stream () .filter (startsWith) .collect (Collectors.toSet ());
}
-
No data found error in the loop of the nested table
Hi team,
I'm working on the example to get data in a nested loop using table, but didn't get the no data below found error
DECLARE
Is of TYPE numlist array of integer;
list1 numlist: = numlist (11,22,33,44);
BEGIN
List1.Delete (2);
DBMS_OUTPUT. Put_line ("is the last element" |) List1.last | | "total elementis' | List1.Count);
List1.extend (4.3);
BECAUSE me in list1.first... List1.last loop - get ANY DATA FOUND error in this line
DBMS_OUTPUT. Put_line ('Values' | list1 (i));
end loop;
END;Could you please help me where I am wrong.
Thank you very much.
You get this error because the element 2 has been removed and in the loop, you are iterating over all the elements from 1 to 3.
To avoid this, use the type of loop below:
l_index: = names_in. FIRST;
While (l_index IS NOT NULL)
LOOP
DBMS_OUTPUT. PUT_LINE
(names_in (l_index));
l_index: = names_in. NEXT
(l_index);
END LOOP;
-
Not the same State (<>) of nested loops
Hi gurus and Experts.
I need advice/suggestion on the query plan below. This plan is go for Nested Loops, am not able to force to go to the hash join or Merge Join with tips.
Can someone help me please what is happening, and it is possible to escape from nested loops.
I don't want to take the help of index for this scenario.
D/B: Oracle 11 g 2,
create table parent as with main as (select --+materialize round(dbms_random.value(low=>1,high=>100)) SAMPLE_ID,dbms_random.string(opt=>'U',len=>10) SAMPLE_TEXT,rownum id from dual connect by level<=100000) select sample_id,rpad(sample_text,10,'*') padding,sample_text,id from main order by id
create table child as with main as (select --+materialize round(dbms_random.value(low=>1,high=>100)) SAMPLE_ID,dbms_random.string(opt=>'U',len=>10) SAMPLE_TEXT,rownum id from dual connect by level<=10000) select sample_id,rpad(sample_text,10,'*') padding,sample_text,id from main order by id
select --+use_hash(p c) p.id from parent p,child c where p.id<>c.id
Plan SELECT STATEMENT ALL_ROWSCost: 973,076 Bytes: 8,999,910,000 Cardinality: 999,990,000 3 NESTED LOOPS Cost: 973,076 Bytes: 8,999,910,000 Cardinality: 999,990,000 1 TABLE ACCESS FULL TABLE APP.CHILD Cost: 12 Bytes: 40,000 Cardinality: 10,000 2 TABLE ACCESS FULL TABLE APP.PARENT Cost: 97 Bytes: 499,995 Cardinality: 99,999
902629 wrote:
I need advice/suggestion on the query plan below. This plan is go for Nested Loops, am not able to force to go to the hash join or Merge Join with tips.
You will not be able to use a hash join
http://docs.Oracle.com/CD/E11882_01/server.112/e16638/optimops.htm#i36043
>
The optimizer uses hash join to join two tables if they are added by using an equijoin and if one of the following conditions are met:
>You may be able to force a sort merge join, it does not mention if different will work, I don't see how it would be
http://docs.Oracle.com/CD/E11882_01/server.112/e16638/optimops.htm#i49183
>
Sort merge joins are useful when the join condition between two tables is a condition of inequality such as <,>,> <=,>, or > =. Fusion type joints are more successful than joins loops nested for large sets of data. You cannot use hash joins unless there is a condition of equality.
>I can't imagine this treatment an antijoin more efficiently than nested If loops.
=,> -
Is the merge join Cartesian intensibe more CPU than nested loops?
Hello
just wonderning which access method is more intensive CPU, supposed to leave we got 2 the same rank sources and make joing via merge join Cartesian and then case is nested loop.
I know that nl can be CPU due to the tight loop access, but what abour MJC?
I can see bufferd sort but not sure is that cpu friendly?
Concerning
GregGThe simplest answer I think is "it depends on the situation." Two of them could be disaster in different situations. Nested loops are suitable for a type of join and Cartesian for another.
-
I have a nested loop
loop1 start
...
loop2 start
...
end loop2
...
end loop1
I want to know how can I come out the two loops of the inner loop.Hello
Out of the inner loop in the use of nested loops labelsSQL> BEGIN 2 <
> 3 FOR i IN 1..2 LOOP 4 < > 5 FOR j IN 1..4 LOOP 6 DBMS_OUTPUT.PUT_LINE('I am in Inner Loop'); 7 END LOOP inner; 8 DBMS_OUTPUT.PUT_LINE('I am in outer Loop'); 9 END LOOP outer; 10 END; 11 / I am in Inner Loop I am in Inner Loop I am in Inner Loop I am in Inner Loop I am in outer Loop I am in Inner Loop I am in Inner Loop I am in Inner Loop I am in Inner Loop I am in outer Loop PL/SQL procedure successfully completed. SQL> BEGIN 2 < > 3 FOR i IN 1..2 LOOP 4 < > 5 FOR j IN 1..4 LOOP 6 DBMS_OUTPUT.PUT_LINE('I am in Inner Loop'); 7 exit inner; 8 END LOOP inner; 9 DBMS_OUTPUT.PUT_LINE('I am in outer Loop'); 10 END LOOP outer; 11 END; 12 / I am in Inner Loop I am in outer Loop I am in Inner Loop I am in outer Loop PL/SQL procedure successfully completed. SQL> SQL> BEGIN 2 < > 3 FOR i IN 1..2 LOOP 4 < > 5 FOR j IN 1..4 LOOP 6 DBMS_OUTPUT.PUT_LINE('I am in Inner Loop'); 7 exit outer; 8 END LOOP inner; 9 DBMS_OUTPUT.PUT_LINE('I am in outer Loop'); 10 END LOOP outer; 11 END; 12 / I am in Inner Loop PL/SQL procedure successfully completed. Twinkle
-
event handler programmatically for different loop than the event itself
Hello
I'm driving a car of mine using compactDAQ in labview. I have two parallel looping using queues. One is for the tips - READ LOOP playback engine - (running more often), and the other for writing to the engine in bits - LOOP to WRITE.
When I shoot a little some (by CAR), the motor starts to move with a pre-defined pace and to a predefined position. So far so good. Thus, when the engine starts, it replaces two bits:
-sets bit BUSY (indicating the movement)
-Disable INP bit, which indicates that the motor is not in a position
As soon as the engine reaches its final destination the BUSY bit is cleared and the bit of the INP is set.
The question is: How can I sign up for the BUSY bit (INP or both) goes high (or low) in LOOP WRITE, given that the bit is read LOOP read? Is it possible to do using queues? I read something about the events, but I don't know exactly how incorporating them in line-ups. Is this OK same design for the engine management?
I have attached some of my code, where I have a structure of the event, where a condition is the change of the busy flag that is updated in LOOP READ. However the structure of the event will never run.
I would like my RTO case run once and then expects busy go upstairs, and then again for INP to go UP and after that the next case is running (stop or other).
I know that my code is not perfect, but I'm pretty new to labview...
Thanks for any information that can help
User events are just another way to communicate between the 2 loops. Queues are also used to communicate between two loops. If you already have a queue from one loop at the other, you could just keep using that. I have recommended the user events due to the structure of the event you have included in your loop of producer. User events can be triggered at any time you want. You can have the code in your block diagram that uses the Event.vi user generate causes the structure of the event with the other loop turns off. Event structures are usually turns off when a Panel before its value control has changed, but they can also be configured for these user events.
You can really make this communication between your two loops in different ways. If you use a LabVIEW 2012 I strongly recommended to take a look at the producer/consumer model, which is available for you to look at this common architecture and compare it to what you have now. If you have not 2012 try to look at the example in my last post on the producer/consumer with user events. You will find more success using architectures such as these.
-
Hallo,
I have a page with 2 legs and they both contains an af:table created by dragging an instance of VO in the user interface.
The 1st tab uses a master VO while the 2nd uses a VO detail.
Between 2 your, there is not a link of VO master / detail.
Opening Details tab I update the secondary table by calling the method ExecuteWithParams of the detail VO instance (in a managed bean).
I would now like to generate a report that loop on the master table and that, for each line of master:
- He writes in the report;
- loops of registration of details (which are based on the master record) and also writes the report.
Could you kindly suggest me which is the best way to achieve that through a code to write in a managed bean?
Here I am interested how do to loop through the data, not in how to write the report.
Thank you
Federico
Yes it will affect the selected line. If you want to ignore try using this code
DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("DepartmentsView1Iterator"); ViewObject vo = iter.getViewObject(); for (int i = 0; i < vo.getEstimatedRowCount(); i++) { Row r = vo.getRowAtRangeIndex(i); System.out.println("DeptId= " + r.getAttribute("DepartmentId")); }
-
nested for loop in the collection
Hi Experts,
Collection1
============
SELECT o.object_id
LOOSE COLLECTION l_obj_info
FROM (SELECT n.node_id, n.object_id
N nodes
START WITH n.node_id = 100
N.node_id CONNECT BY PRIOR = n.parent_node_id) n
JOIN IN-HOUSE
objects o ON o.object_id = n.object_id
WHERE o.object_type_id = 285;
s Collection2
============
SELECT *.
LOOSE COLLECTION l_tab
OF ((SELECT REGEXP_SUBSTR (i_l_text, "[^,] +', 1, NIVEAU)))
OF THE DOUBLE
CONNECT BY REGEXP_SUBSTR (i_l_text, "[^,] +', 1, LEVEL") IS NOT NULL));
END;
collection3
============
SELECT o.object_id
LOOSE COLLECTION l_fin_tab
Of objects o JOIN ATTRIBUTES att
ON o.object_id = att.object_id
WHERE o.object_id = collection1.object_id
- AND att. VALUE = collection2.val;
Please tell me how to implement for loop in the collection3 to get the values of collection1 and s collection2.
I tried in the way below
CREATE or REPLACE TYPE LIST_OF_ATTRIBUTES_TYPE AS TABLE OF THE varchar2 (4000);
/
CREATE or REPLACE TYPE LIST_OF_OBJECT_IDS_TYPE AS TABLE OF THE number (9);
/
(F_get_objects_by_type_id) CREATE or REPLACE FUNCTION
i_object_type_id in NUMBERS
i_l_text IN VARCHAR2,
i_scope_node_id NUMBER
)
RETURN list_of_object_ids_type
AS
CURSOR objs_info
IS
SELECT o.object_id
FROM (SELECT n.node_id, n.object_id
N nodes
START WITH n.node_id = i_scope_node_id
N.node_id CONNECT BY PRIOR = n.parent_node_id) n
JOIN IN-HOUSE
objects o ON o.object_id = n.object_id
WHERE o.object_type_id = i_object_type_id;
l_tab list_of_attributes_type: = list_of_attributes_type ();
-l_obj_info list_of_object_ids_type: = list_of_object_ids_type ();
l_fin_tab list_of_object_ids_type: = list_of_object_ids_type ();
BEGIN
BEGIN
SELECT *.
LOOSE COLLECTION l_tab
OF ((SELECT trREGEXP_SUBSTR (i_l_text, "[^,] +', 1, NIVEAU)))
OF THE DOUBLE
CONNECT BY REGEXP_SUBSTR (i_l_text, "[^,] +', 1, LEVEL") IS NOT NULL));
END;
IF l_tab. COUNT > 0
THEN
BECAUSE me IN objs_info
LOOP
FOR j IN l_tab. FIRST... l_tab. LAST
LOOP
SELECT o.object_id
LOOSE COLLECTION l_fin_tab
O JOIN ATTRIBUTES att OBJECTS ON o.object_id =
att.object_id
WHERE
att. VALUE = l_tab (j) and o.object_id = objs_info (i);
END LOOP;
END LOOP;
END IF;
RETURN l_fin_tab;
END f_get_objects_by_type_id;
/
What this different problem from that of pls 00382 expression is incorrect, as they were returning a record type ?
Please do not raise the same question several times. The answer is always the same. Your data model is seriously wrong - and that's the reason why you can't get data from it.
-
For each does not properly in the XSLT file to two loops on a single node
Hi all
I'm transforming 2 inputs to a single target using XSLT. Both of the target entry of the same pattern and have the child element.
In the XSLT, I gave this condition.
"< xsl: for each select="$Variable1.payload/ns1:BookStore/ns1:Books ">
< xsl: for-each select = "/ ns1:BookStore / ns1:Books" >
"< xsl: if test="$Variable1.payload/ns1:BookStore/ns1:Books/ns3:BookId = ns3:Books / ns3:BookId ">
My second for each does not work and in the target, I'm getting double elements. Help, please. Here are two xml source and xml desired target.
1 XML source:
< bookStore >
< book >
Name1 < name > < / name >
author1 < author > < / author >
< ID > 1 < / BookId >
< quantity > 2 < / quantity >
< price > < price / >
< status > < / status >
< book >
< book >
name2 < name > < / name >
Author2 < author > < / author >
< ID > 2 < / BookId >
< quantity > 2 < / quantity >
< price > < price / >
< status > < / status >
< book >
< book >
< name > NAME3 < / name >
author of 3 < author > < / author >
< ID > 3 < / BookId >
< quantity > 2 < / quantity >
< price > < price / >
< status > < / status >
< book >
< / book >
XML source 2:
< bookStore >
< book >
< name > < / name >
< author > < / author >
< quantity > < / quantity >
< ID > 1 < / BookId >
< price > 100 < / price >
< status > < / status >
< book >
< book >
< name > < / name >
< author > < / author >
< quantity > < / quantity >
< ID > 2 < / BookId >
< price > 200 < / price >
< status > NA < / status >
< book >
< book >
< name > < / name >
< author > < / author >
< quantity > < / quantity >
< ID > 3 < / BookId >
< price > 300 < / price >
< status > < / status >
< book >
< / book >
Desired target XML:
< bookStore >
< book >
Name1 < name > < / name >
author1 < author > < / author >
< ID > 1 < / BookId >
< quantity > 2 < / quantity >
< price > 100 < / price >
< status > < / status >
< book >
< book >
name2 < name > < / name >
Author2 < author > < / author >
< ID > 2 < / BookId >
< quantity > 2 < / quantity >
< price > 200 < / price >
< status > NA < / status >
< book >
< book >
< name > NAME3 < / name >
author of 3 < author > < / author >
< ID > 3 < / BookId >
< quantity > 2 < / quantity >
< price > 300 < / price >
< status > < / status >
< book >
< / book >
Thank youHello
It will not work like that... To do something like the following... Only one for each...
ns1:Name ns1:Author ns1:BookId $Variable1.payload/ns1:BookStore/ns1:Books[ns1:BookId = $bookId]/Quantity $Variable1.payload/ns1:BookStore/ns1:Books[ns1:BookId = $bookId]/Price $Variable1.payload/ns1:BookStore/ns1:Books[ns1:BookId = $bookId]/Status I don't have to check the syntax, but you get the idea...
I hope this helps...
See you soon,.
Vlad
Maybe you are looking for
-
MacBook Pro 8.1, spec Apple says max ram 8 GB, the seller said 16?
I want to upgrade the ram to its maximum. The official specification says 8 (2 X 4) told my supplier of ram 16 (2 X 8). Someone must have already made. Please let me know if 16 works. End 2011, MacBook Pro, model 8.1.
-
Toshiba Portege Z30 - A - Accupoint does not work
Hey there! I had a problem with the Accupoint, he moved alone, so I disabled it.But the problem is that I have also disabled the two buttons above the key. A is it possible to repair the Acupoint or disable without disabling the buttons? I have a Tos
-
Replacing motherboard laptop satellite SA50-112
Hello. First, no one knows where I can find the serial number on a portable Satellite SA50 112 motherboard and where I might be able to order a replacement motherboard from? Water is accidentally spilled on it. I have contracted the jury, just can no
-
Need serious help with FPS on COD4
Here's my situation. I have two PC that I built and played COD4 for a year. The only main I have on average 250 fps in multiplayer mode and the other 130 fps. I got an internet problem with my modem which is triggered my whole system. My ESET Sma
-
HP Photosmart Premium e-All-in-One Printer - C310a re Duplex print on A5 paper
I tried the double-sided printing on paper format A5 auto and received a message telling me that the paper was too short & to use 'manual duplex' or print "odd or even-numbered" pages instead. (works fine on A4 paper) The second option seems a little