Nested query loop

I have a question I want to loop through the data and the display. The query is an inner join with a table being the order numbers and the second being more details on each order. They are joined by the order number. I want to do is loop through the data and all the details in the order number of the group. I tried many configurations of nesting, and I had no chance. That's what I'd like to see.

Number 1
Point 1
Point 2
Point 3

Order number 2
Point 1
Point 2

Order number 3
point 1
Point 2
Point 3
Point 4

Any recommendations?


Thank you guys! I had tried this approach, but apparently I was doing something wrong before. I had received nesting cfoutput errors and then I got lost in a mess of formatting. Thanks again for the direction.

Tags: ColdFusion

Similar Questions

  • Creating tables in a nested for loop

    Hi all.

    I was stuck in this problem for quite a while now and I still don't know how to continue. Some outside the entrance would be greatly appreciated!

    I'm doing the following:

    -Take an array of numbers, to check if they are within a certain range (e.g. between 2 and 4)

    -Build two new arrays: one with all the numbers that are inside the beach and the other with the rest.

    An additional condition is that the amount and value of the range conditions will change (for example, it could be between 2 and 4 only / 2, 4 AND 6 and 7 according to the entry)

    To treat this, I created two nested for loops - one that goes on a table that contains conditions of the beach and inside that actually go and check if the values are in the range. I think I did that part successfully, but the next part is confusing to me - how to actually create the tables separated within two loops for?

    My apologies if I did not explain it well. Another method to support this problem is I want to translate following LabVIEW:

    Ranges of table / / [1 5 7 10] exodus-> This means we want to divide numbers based on those who are in (1,2) and (4.5) against those who are not

    Table of values / / [2 3 6 11 3]

    EndOperationDelegate table / / array of values within the range
    Table outValues / / Array of values out of range

    for m = 1:size (ranges)

    for n = 1:size (values)
    If (THE NUMBER IS on the INSIDE of EACH RANGE)
    EndOperationDelegate = [EndOperationDelegate NEWNUMBER]
    on the other
    outValues = [outValues NEWNUMBER]
    end

    end
    end

    Sounds easy enough, but it gets so chaotic with Labview that I don't know what to do. I have attached a reference image - insertion in the array function is not in fact add to the table, it creates a new table. How can I save that for when the nested for the ends of the loop?

    I have seen a few examples with shift registers which lie in a loop and I couldn't successfully that transfers in my block diagram.

    Any help/direction would be greatly appreciated.

    Hello!

    See the following example to understand how you can create a table in the loop For

    In your case, you also can uce conditional terminal to create a table only when then located nearby. It makes the code much cleaner that the structures of the case

    Hope this helps, if not, let me know if I can help you!

    Marcin

  • Capture of sequences of images - issues with nested for loops

    Hi all

    I've written a vi. to capture a number of images ("Image") and save these images, sent to a folder of my choice.  Each image is identified sequentially.  However, I would like to make a number of iterations ("run") of this capture sequence, such that each image file name would be "Filename (Run) _(Image_No).png", for example run 5, image 10 'Filename 5_10.png.  I tried a nested for loop for this but I have an error message 'Current asynchronous i/o Operation' (I have attached a printscreen).

    Can someone help me solve this problem?  Please find attached my vi.

    Sincere greetings and thanks,

    Miika

    Hi toto26,.

    Thank you for your response.  I solved the problem by using a sequence structure flat - file in the first image and all the treatment in the second.

    Kind regards

    Miika

  • Nested for loops error

    Hi all members of the community, I am experiencing problem with pulling the attributes of an xml I created. I use nested for loop. Please kindly help me to solve this problem...

    Thanks in advance...

    Here's the code & xml...


    import flash.events.Event;
    import flash.events.EventDispatcher;
    import flash.events. *;
    flash.net import. *;

    var myXML:XML;

    var voiceOver: String;
    var startOffset:Number;
    var slideData:Array;
    var id_cont_array:Array = new Array();
    var id_textfield_array:Array = new Array();
    var id_image_array:Array = new Array();

    var myXML_Container_Length:Number;
    var myXML_textField_Length:Number;
    var myXML_images_Length:Number;

    var loader: URLLoader = new URLLoader();
    Loader.Load (new URLRequest ("dynamic.xml"));

    loader.addEventListener (Event.COMPLETE, processXML);

    function processXML(e:Event):void
    {
    slideData = new Array();
    myXML = new XML (loader.data);

    loader.removeEventListener (Event.COMPLETE, processXML);
    loader.removeEventListener (IOErrorEvent.IO_ERROR, loadError);

    myXML = new XML (e.target.data);
    voice-over = myXML. @ voice_over;
    startOffset = myXML. @ start_offset;

    for (var i: uint = 0; i < myXML.*.length (); i ++)
    {
    trace (myXML + 'slide');
    }


    myXML_List = myXML.children ();
    myXML_Container_Length = myXML.children () .length ();
    trace (myXML_Container_Length + "is myXML_Container_Length")
    myXML_textField_Length = myXML.containerss [0] .children () .length ();
    myXML_images_Length = myXML.children () .length ();
    trace (myXML.Child ("containerss") [3]. @ id.toXMLString () + "== myXML.containerss [0].") @ id; ») ;
    trace (.textfield myXML.containerss [0] [0]. @ id + "== myXML.slide.containerss [0].") ("@ id");
    trace (myXML.containerss [0] .textfield [1]. @ id + "== myXML.slide.containerss [1].") ("@ id");
    trace (myXML.containerss [3] [0] image. @ id + "is image [0]");
    trace(myXML.containerss[0].) Children() + "== myXML.containerss [0] .children ()"); "."

    for (var j: Number = 0; j < = myXML_Container_Length; j ++)
    {
    id_cont_array.push (myXML.containerss [j]. @ id);
    trace (myXML.containerss [j]. Children () .length () + 'is j');
    myXML_textField_Length = myXML.containerss [j] .children () .length ();
    trace (myXML_textField_Length + "is myXML_textField_Length");
    for (var k: Number = 0; k < = myXML_textField_Length-1; k ++)
    {

    id_textfield_array.push (.textfield myXML.containerss [j] [k]. @ id);
    id_image_array.push (image of [k] myXML.containerss [j]. @ id);
    trace (id_textfield_array [k] + "== id_textfield_array [k] ==" + k + "--j ==" + j);
    trace ("== id_image_array" + id_image_array [k]);
    }
    trace(id_textfield_array[j]+"==id_cont_array[j]");
    }

    trace (myXML_List.length () + "= myXML_List");

    }

    function loadError(e:IOErrorEvent):void
    {

    trace ("loadError");
    }

    XML is as below...

    < drag direction = "VERTICAL" voice_over = "Slide1.mp3" start_offset = "0" margin ="" > "

    < set id = "0" direction = "HORIZONTAL" padding = "10" margin = "10" x = "10" y = "160" width = "200" height = "150" >
    < textfield id = "Text1" text = "textfieldText1" padding = "10" margin = "10" x = "10" y = "160" / >
    < image id = "img1" text = "" padding = "10" margin = "10" x = "10" y = "160" / > "
    < textfield id = "Text2" text = "textfieldText2" padding = "10" margin = "10" x = "10" y = "160" / >
    < / define >
    < set id = "1" orientation = "HORIZONTAL" padding = "10" margin = "10" width = "200" height = "200" x = "10" y = "160" >
    < textfield id = "Text3" text = "textfieldText3" padding = "10" margin = "10" x = "10" y = "160" / >
    < image id = "img2" text = "" padding = "10" margin = "10" x = "10" y = "160" / > "

    < / define >
    < set id = "2" orientation = "VERTICAL" padding = "10" margin = "10" width = "200" height = "150" x = "10" y = "160" >
    < textfield id = "Rem5" text = "textfieldText5" padding = "10" margin = "10" width = "200" height = "150" x = "10" y = "160" / >
    < image id = "img3" text = "" padding = "10" margin = "10" x = "10" y = "160" / > "
    < textfield id = 'Text6"text ="textfieldText6"padding ="10"margin ="10"x ="10"y ="160"/ >
    < / define >
    < set id = "4" orientation = "VERTICAL" padding = "10" margin = "10" width = "200" height = "150" x = "10" y = "160" >
    < textfield id = 'Text7"text ="textfieldText7"padding ="10"margin ="10"width ="200"height ="150"x ="10"y ="160"/ >
    < image id = "img4" text = "" padding = "10" margin = "10" x = "10" y = "160" / > "
    < textfield id = "Texte8" text = "textfieldText8" padding = "10" margin = "10" width = "200" height = "150" x = "10" y = "160" / >
    < / define >
    < / slide >

    The analysis is totally false. You operate processXML() should be like this:

    function processXML(e:Event):void
    {
              slideData = new Array();
              loader.removeEventListener(Event.COMPLETE, processXML);
              loader.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
              myXML = new XML(e.target.data);
              voiceOver = myXML.@voice_over;
              startOffset = myXML.@start_offset;
              myXML_Container_Length = myXML.children().length();
              var node:XMLList;
              for (var j:Number = 0; j <= myXML_Container_Length - 1; j++)
              {
                        id_cont_array.push(myXML.containerss[j].@id);
                        node = myXML.containerss[j].children();
                        myXML_textField_Length = node.length();
                        for (var k:Number = 0; k <= myXML_textField_Length - 1; k++)
                        {
                                  switch (node[k].name().toString())
                                  {
                                            case "textfield":
                                                      trace(node[k].@id);
                                                      id_textfield_array.push(node[k].@id);
                                                      break;
    
                                            case "image":
                                                      id_image_array.push(node.@id);
                                                      break;
                                  }
                        }
              }
    }
    
  • Count (*) with the nested query

    Hello
    I have a question about the count (*) with the nested query.

    I have a table T1 with these columns:
    Number of C1
    Number of C2
    Number of C3
    Number of C4
    Number of C5

    (The type of each column is not relevant for example).

    This query:
    Select C1, C2, C3, C4
    from T1
    Group C1, C2

    It is not correct becausa C3 and C4 are the columns specified in the GROUP BY expression.

    If you run this query:
    Select count (*)
    (select C1, C2, C3, C4
    from T1
    Group C1, C2)

    I don't have an error message (properly, the result is the number of records).

    Why?

    Thank you.

    Best regards
    Luca

    because the optimizer rewrites as

    SELECT     COUNT(*)
                  FROM   T1
              GROUP BY   C1, C2  
    

    G.

    Edited by: g. March 1, 2011 09:19

  • performance for this convoluted nested query

    Hello

    I wonder about the performance of this convoluted nested query:

    Select t.parentId from TreeParentChild t
    where t.childId =: childId and t.childOwnerId in)
    Select tt.parentOwnerId in the TreeParentOwner tt
    where t.parentId = tt.parentId
    )

    There are two tables of interest. The first establishes parent-child relationships,
    and includes the id of the owner of the 'child', which always has exactly one owner.

    table TreeParentChild
    ---------------------
    long parentId
    long childId
    long childOwnerId

    The other table lists of owners for the 'parents' who gave
    parentId can have several owners mapped into multiple lines

    table TreeParentOwner
    ---------------------
    long parentId
    long parentOwnerId

    And the purpose of the above query is to get all the parentids for a given childid
    who have an owner mapping said that the parentid has an owner that is
    the owner of the child.

    This query makes sense to me, but I wonder about his performance, because a column
    external selection corresponds to a column in the internal selection. What is - c
    also called nested request type?

    Andy

    Hi, Andy.

    If you are interested in the jargon, a join where you not actually select anything from one of the tables is called a join semi .

    user9990110 wrote:
    ... It must also pin to a childId data so I've rewritten as:

    SELECT     t.parentId
    FROM     TreeParentChild t
    WHERE     t.childId = :childId AND (t.parentId, t.childOwnerId) IN
         (
              SELECT     tt.parentId, tt.parentOwnerId
              FROM     TreeParentOwner tt
         )
    ;
    

    Is this correct?

    Oops! I forgot this condition: it takes only!
    Yes, your correction is correct.

    And what you would like the clues in this case for 2 tables for better performance?

    Similarly, what would you as clues to the two tables for better performance in the case of the solution to join internal you gave?

    For each query, you can use a composite index on t (parentId, childOwnerId) and an index composed on tt (parentId, parentOwnerId).

    There is yet another way to do what you want: an EXISTS subquery.

    SELECT     t.parentId
    FROM     TreeParentChild          t
    WHERE     t.childId = :childId
    AND      EXISTS
         (
              SELECT     0
              FROM     TreeParentOwner tt
              WHERE     tt.parentId       = t.parentId
              AND     tt.parentOwnerId  = t.childOwnerId
         )
    ;
    

    With rare exceptions, EXISTS subqueries are always correlated.

    I suspect that the best way to this is the first way I posted, using a join.

  • nested query

    Hello
    I'm stuck in a nested query. My table structure is as below.

    create table a1 (varchar2 (10) c1, c2 varchar2 (10));
    create table a2 (varchar2 (10) c1, c2 varchar2 (10));

    and my data

    insert into a1 values ('1', 'A11');
    insert into a1 values ('2', 'A12');

    insert into a2 values ('1', 'A21');
    Insert in a2 (c2) values ('A22');

    now when I try to extract all records in table A1 with column C1 not in column C1 of table A2 then returning me 0 documents instead of returning the second disc with c1, c2 as '2', 'A12 '.

    Can anyone explain why its happening then?

    Hello

    An explanation for this can be found in the doc below.

    [http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions013.htm]

    If any item in the list that follows a NOT IN operation is null, then all lines are evaluated to FALSE or UNKNOWN, and no row is returned

    Concerning
    Anurag Tibrewal.

    PS: There to learn new things every day.

  • Nested while loops

    Attached is a very simple with two nested all VI in loops and two buttons on the front panel.

    1 button, when you press left the inner loop.  2 button pressed leaves the outer loop and the program must end.  I put in a probe at the end of the outer loop and of course a REAL will to the terminator when I press the 2 key, but the program does not stop.  Apparently, all inner loops must be completed prior to the outer loop can terminate.

    Obviously, someone at NEITHER took the decision to design a long time ago, but the rationale is intriguing.  If one end of the loop becomes a REAL it must end, no?

    Although the example is trivial, the problem that it illustrates is a real for me.  I want to offer a panic button stop is a vast and complex and I don't see how I can do with things as they are.

    What you see is the result of the dataflow paradigm used by LV as you said, all the code inside the loop must complete / finish before the outer loop stops.

    Providing one Stop button to stop all in one comprehensive program can be a complex task. The key issue is that EACH loop, function, sub - VI, case structure, structure of the event, the structure of sequence and so on... must stop to stop the loop.  If you have something like a file entry or a reading of GPIB instruments which take 100s of milliseconds or seconds to complete, the shutdown will take at least that long process, assuming that the tedious node was running when the judgment was issued.

    One other point: you put inside terminal 2 touch it the case of the event that responds to the key. Which ensures that the button will be read so the mechanical action works as expected.  With her out of the loop it will only play once.

    A registrant can be used to 'spread the word' when it's time to stop.  The time-out he will keep waiting forever and will also allow the other parallel inside code while loop to run during waiting for him.

    Lynn

  • Identifier not valid several nesting query

    For the life of me I can't understand why I am getting an error on the first line (in bold) - something is wrong with my nesting, but I can't understand that. It is an invalid identifier on 'CLIENT' error in line 1 has something to do with my nesting I think. Any help?

    Select * from (select cust. ) Region_ID of

    (select cust_nbr from)

    (select region_id,

    Sum (tot_sales) tot_sales the Group of commands by region_id) reg

    Join

    (select sum (tot_sales) tot_sales, region_id,

    cust_nbr of the order of cust_nbr group, region_id) cust

    on cust.region_id = reg.region_id

    where cust.tot_sales > reg.tot_sales *. 2)) ca

    inner join customer c

    We ca.cust_nbr = c.cust_nbr;

    2776946 wrote:

    I'll edit the select * part so the global query can be likened to an analytic function, but the moment I can't get why my request is not read the alias 'CUST '...

    You must take into account the scope of alias variables

    They are valid from the outside to the inside; not inside out like you trying

  • Subselect query returns "invalid identifier", but the nested query return lines

    I don't think it's a general SQL question.

    Select * from persons where person_id in)

    Select person_id with people whose name = 'Obama' - subquery

    ) and age > 18;

    When I run the subquery, I get:

    ORA-00904: "PERSON_ID": invalid identifier

    00904, 00000 - '% s: invalid identifier '.

    * Cause:

    * Action:

    Error on line: column 5: 8

    This is because the table people do not have the person_id field.

    But when I run the nested together query it returns all the lines in people with the AGE greater than 18.

    How is he succeeds when the subquery is obviously wrong?

    363f652b-263D-4418-933F-74a1d0a41b4c wrote:

    I don't think it's a general SQL question.

    Select * from persons where person_id in)

    Select person_id with people whose name = 'Obama' - subquery

    ) and age > 18;

    When I run the subquery, I get:

    ORA-00904: "PERSON_ID": invalid identifier

    00904, 00000 - '% s: invalid identifier '.

    * Cause:

    * Action:

    Error on line: column 5: 8

    This is because the table people do not have the person_id field.

    But when I run the nested together query it returns all the lines in people with the AGE greater than 18.

    How is he succeeds when the subquery is obviously wrong?

    Yes - this is a general SQL question and ask often enough.

    Correlated subqueries depend on the inner query, be able to see and access to the columns of the outer query. Normally see you referenced in the WHERE clause of the subquery and not in the SELECT clause, but the reference is valid in both places. This works because the columns of the tables in the main query are accessible in the subquery. "Person_id" is probably a column in the table 'people '.

    Which can be a cause of problems 'odd' when the column (in your case "person_id") is more of a table.

    Use an alias in the subquery in the subquery and you will find that it will not succeed.

    See these two articles AskTom where he addresses this specific issue

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:3317493900346468494

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:155200640564

  • How to add a xmlelements not nested in a nested query xmlelement

    I have the following query prints in a file xml very well:

    Select xmlroot)
    XmlElement
    (
    EMSData,
    XMLAGG
    (

    XMLELEMENT
    (
    year,
    XmlAttributes (calyear),
    XMLAGG
    (
    XmlElement
    (
    meantime,
    XmlAttributes (intervalType as 'Type', 'Value' ValeurIntervalle),
    XmlElement
    (
    data,
    XmlAttributes (selectType as "Select", supplier, mission, instrument),
    XMLFOREST
    (
    bytes,
    files
    )
    )
    )
    ValeurIntervalle desc order, supplier, mission, orderBy, instrument
    )
    )
    calyear desc order
    )
    (), version '1.0') .getClobVal () in l_xml
    FROM MyTable
    Calyear group;

    The output is:
    <? XML version = "1.0"? >
    < EMSDATA >
    < CALYEAR YEAR = "2011" >
    < Type INTERVAL = 'DAY' Value = "320" >
    < Select DATA = 'SYSTEM' >
    < BYTES > 2750877820501 < / BYTES >
    <>273997 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = '319' >
    < Select DATA = 'SYSTEM' >
    < BYTES > 5155961487454 < / BYTES >
    <>378457 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = "318" >
    < Select DATA = 'SYSTEM' >
    < BYTES > 4606818769422 < / BYTES >
    <>420231 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = "317" >
    < Select DATA = 'SYSTEM' >
    < BYTES > 3686199358862 < / BYTES >
    <>399271 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = '316' >
    < Select DATA = 'SYSTEM' >
    < BYTES > 4989867970498 < / BYTES >
    <>406249 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = "315" >
    < Select DATA = 'SYSTEM' >
    < BYTES > 4027315556027 < / BYTES >
    <>463319 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = "314" >
    < Select DATA = 'SYSTEM' >
    < BYTES > 4893244762669 < / BYTES >
    <>600252 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < / YEAR >
    < / EMSDATA >

    What I have to do is to add a few items just above the nested element under < YEAR >, i.e.:

    <? XML version = "1.0"? >
    < EMSDATA >
    < DailyStartDate > 28 November 11 < / DailyStartDate >
    < WeeklyStartDate > 29 - SEP - 11 < / WeeklyStartDate >
    < MonthlyStartDate > 1 October 01 < / MonthlyStartDate >
    < CALYEAR YEAR = "2011" >
    < Type INTERVAL = 'DAY' Value = "320" >
    < Select DATA = 'SYSTEM' >
    < BYTES > 2750877820501 < / BYTES >
    <>273997 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = '319' >
    < Select DATA = 'SYSTEM' >
    < BYTES > 5155961487454 < / BYTES >
    <>378457 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = "318" >
    < Select DATA = 'SYSTEM' >
    < BYTES > 4606818769422 < / BYTES >
    <>420231 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = "317" >
    < Select DATA = 'SYSTEM' >
    < BYTES > 3686199358862 < / BYTES >
    <>399271 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = '316' >
    < Select DATA = 'SYSTEM' >
    < BYTES > 4989867970498 < / BYTES >
    <>406249 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = "315" >
    < Select DATA = 'SYSTEM' >
    < BYTES > 4027315556027 < / BYTES >
    <>463319 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < Type INTERVAL = 'DAY' Value = "314" >
    < Select DATA = 'SYSTEM' >
    < BYTES > 4893244762669 < / BYTES >
    <>600252 FILES < / FILES >
    < / DATA >
    < / INTERVAL >
    < / YEAR >
    < / EMSDATA >

    I can select these separate items of data in the table or I can add them to the XML through a local variable. I tried several ways to add this to my above query but am stuck. If I bring to the table, the field names are dailyStartDate, weeklyStartDate and monthlyStartDate. Again, I only want the distinct values and therefore something for everyone in this XML file rather than enumerate over and over again in the XML.

    Please notify.

    Best,
    NAT

    If you already have the values in variables, why not just do that?

    select xmlroot(
     xmlelement
     (
      EMSData,
      XMLForest(
       v_DailyStartDate as "DailyStartDate",
       v_WeeklyStartDate as "WeeklyStartDate",
       v_MonthlyStartDate as "MonthlyStartDate"
      ),
      XMLAGG
      (
       XMLELEMENT
       (
        year,
    
  • When no rows returned in the query loop, replace Null - need help

    Hello

    I have a requirement where I have a request in the loop for and based on the results of the query, I do some operations.

    But even if the query does not match, I should get back something like 'No Data'.

    My loop is:

    FOR V_SL IN)
    SELECT ID, CATEGORY, DI_CD, REV_CD, SL_ID
    OF SB, SLOT_2001 S2 SLOT_DATA WHERE
    PBM BENEFIT_ID = S2. BENEFIT_ID AND
    REV_CD = IN_REV_CD AND
    (PROC_CD IS NULL OR PROC_CD = IN_PROC_CD)
    ORDER OF DIAGCODE, PROCEDURECODE)
    LOOP
    END LOOP;

    I do some operations inside the loop for. I want the loop to run even if the query returns no rows.

    Can someone help me out here.

    Thank you
    Rambeau

    Frank. I am really surprised to see this coming from you. A slider to not find all the lines loop does not cause an exception no_data_found.

  • nested query sup

    Hello
    How to write ro nested several rows (row should be composed of a range of values) query sub between the tables if they have no common column.
    Based on this range of weight that I consolidate other columns.

    For example:
    My table should contain

    weight range:
    -------------------
    1 > 2
    2 > 3
    3 > 4
    .
    .
    .
    etc.

    Please repost your question adding clarity and an example so that we can understand what you're asking. Also include your full version number.

    SELECT * FROM v$version;
    
  • nested VI loops

    Hi all

    I have a main VI which calls another VI that consist of a while loop and an indicator showing the number of iteration. How can I view the iteration as it increments on my main vi, as I see it display only the number that the while loop ends. Is attached to my screws, someone please guide me. Thank you very much.

    Try this...

  • Nested for loops EACH in the XML editor

    I have a xml like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <DATA_DS>
         <Line_Approver>
              <getLineNumberAssigneesResponse>
              <result>
                    <LineNumber>1</LineNumber>
                    <Assignees>One</Assignees>
               </result>
              <results>
    
                   <LineNumber>2</LineNumber>
                   <Assignees>Two</Assignees>
              </result>
    
              </getLineNumberAssigneesResponse>
         </Line_Approver>
    <DATA_DS>
         <HEADER>
         <INVOICE_ID>300100071480733</INVOICE_ID>
         <AMOUNT>1111</AMOUNT>
         <INVOICE_CURRENCY_CODE>USD</INVOICE_CURRENCY_CODE>
         <INVOICE_NUM>100</INVOICE_NUM>
         <INVOICE_DATE>2015-11-13T00:00:00.000+05:30</INVOICE_DATE>
         <PAYMENT_CURRENCY_CODE>USD</PAYMENT_CURRENCY_CODE>
         <ORG_ID>204</ORG_ID>
         
         <INVOICELINES>
                  <LINE_NUMBER>1</LINE_NUMBER><LINE_TYPE>Item</LINE_TYPE><AMOUNT>1000</AMOUNT><INVOICE_ID>zzz</INVOICE_ID><EXPENDITURE_ITEM_DATE></EXPENDITURE_ITEM_DATE>
         </INVOICELINES>
         <INVOICELINES>
              <LINE_NUMBER>2</LINE_NUMBER><LINE_TYPE>Item</LINE_TYPE><AMOUNT>111</AMOUNT><INVOICE_ID>300100071480733</INVOICE_ID><EXPENDITURE_ITEM_DATE></EXPENDITURE_ITEM_DATE>
         </INVOICELINES>
         </HEADER>
    
    <some more xml/>
    </DATA_DS>
    
    </DATA_DS>
    

    As you can see there are two results and and two invoice lines.

    I want to create a table of invoice lines for which the line number is present in the result.

    So my psudo code is as follows

    for each in result:
         assign result.linenumber to variable
         for each in InvoiceLines:
              compare the InvoiceLines.Line_number to variable:
                   if match print row.
    

    I know I won't have access to the LineNumber result with in second forloop because of the determination of the lexical scope.

    Far from assignment, I am unable to get the value of the number of the line itself.

    I tried two methods of application for with in what work force. The underside of work that uses the absolute path.

    What xpath Miss. Can I do better?

    FOR1: <?for-each:/DATA_DS/Line_Approver/getLineNumberAssigneesResponse/result?>
    
    FOR2: <?for-each:/DATA_DS/DATA_DS/HEADER/INVOICELINES?>
    

    LINE_NUMBER

    LINE_TYPE

    AMOUNT

    For 1 <? LineNumber? > 2 LINE_NUMBER

    LINE_TYPE

    AMOUNT ENDFOR1 ENDFOR2

    I think I gave enough information. Answer just in case I did not say anything clearly.

    You can do this via a simple foreach loop and the code would be

    Please see the data XML and RTF attached for your reference.

    I changed the data in XML format (I added 10 instead of 1) just to make sure that its works or not, and it works very well.

Maybe you are looking for