Out of the LOOP FOR...

I'm having a problem with the output format

Oracle 10.2 g

Data
    time                                  home_team_id      away_team_id     home_team_name      away_team_name  offensive_player_moniker  offensive_player_last_name
11/14/2003 7:39:00 PM                       11122                                                    parks                                               Steve             Smith                    
11/14/2003 7:32:00 PM                                                24555                                                    bombers                  Chris              Carter                
12/14/2008 1:35:00 PM                                                33211                                                         carts                   Marty            Booker   
12/14/2008 1:30:00 PM                      15555                                                    sharks                                                 Bob              Sanders
12/14/2008 1:38:00 PM                      15555                                                    sharks                                                 Marvin           Harrison
portion of LOOP FOR
 FOR ii IN 1..player_results.COUNT LOOP  
            
          If player_results(i).shot_result = 7 then
          
                If results_temp(i).home_team_id = player_results(ii).team_id then
                        tDataStream :=  xArcPara || results_temp(i).home_team_name || ': ' || player_results(ii).moniker || ' ' || player_results(ii).last_name || ' ('  ||  player_results(ii).time || ')';
                End if;    
                 
                If results_temp(i).away_team_id = player_results(ii).team_id then
                      tDataStream :=   xArcPara || results_temp(i).away_team_name || ': ' || player_results(ii).moniker || ' ' || player_results(ii).last_name || ' (' || player_results(ii).time || ')';
                End if;

     End if;
         
                writePlainLine(tDataStream); 

     End Loop;
Output Curren

Carts: Marty Booker (01:35)
Sharks: Bob Sanders (01:30)
Sharks: Marvin Harrison (01:38)

What I want
Carts: Marty Booker (01:35)
Sharks: Bob Sanders (01:30), Marvin Harrison (01:38)

structuring basically the vairable tDatastream would be my guess as to the whole issue... everything but on how to get my desired output?

Note of course on your complete logic, but why bother with a loop around anyway? :

SQL> with t as (
 select to_date('11/14/2003 7:39:00 PM','MM/DD/RRRR hh:mi:ss pm') time, 11122 home_team_id,null away_team_id,null home_team_name, 'parks' away_team_name,'Steve' offensive_player_moniker, 'Smith' offensive_player_last_name from dual union all
 select to_date('11/14/2003 7:32:00 PM','MM/DD/RRRR hh:mi:ss pm'), null, 24555, null, 'bombers', 'Chris', 'Carter' from dual union all
 select to_date('12/14/2008 1:35:00 PM','MM/DD/RRRR hh:mi:ss pm'), null, 33211, null, 'carts', 'Marty', 'Booker' from dual union all
 select to_date('12/14/2008 1:30:00 PM','MM/DD/RRRR hh:mi:ss pm'), 15555, null, null, 'sharks', 'Bob', 'Sanders' from dual union all
 select to_date('12/14/2008 1:38:00 PM','MM/DD/RRRR hh:mi:ss pm'), 15555, null, null, 'sharks', 'Marvin','Harrison' from dual
)
select away_team_name || ': ' || xmlagg(xmlelement(e, offensive_player_moniker || ' ' || offensive_player_last_name || ' (' || to_char(time,'hh:mi') || '), ')).extract('//text()') x from t
group by  away_team_name
/
X
--------------------------------------------------------------------------------
bombers: Chris Carter (07:32),
carts: Marty Booker (01:35),
parks: Steve Smith (07:39),
sharks: Bob Sanders (01:30), Marvin Harrison (01:38), 

Tags: Database

Similar Questions

  • Problem on the out of the loop For of Cluster

    Hello!  I'm using Labview 2009.

    I have a problem in the transmission of the indexed number of a loop through function array-cluster to a cluster. Please check my attachment... The problem is, he always says the number of items in the numbers indexed is 9, any number of loops, I input for loop.

    This problem has been solved before? I could not find any related post here...

    Raymond

    Hey Vg,

    You have to right click on your table to the cluster, goto 'Size of Cluster' function and select, in this case, 2.

    RGS,

    Lucither

  • Table of path error 1430 in the loop for

    Hello!

    I have a problem with the 1430 error: path is empty or relative, which seems impossible. The thing is that I have a battery of indicators of path connected to the loop for (check the .jpg and there is no problem with writing to a file by using the paths of an array with the first and last index.) Others are not saved because of the error... to be honest, that all data paths are absolute. Record in the file of the idicator path is the work of a Subvi (merge data vi) but it is in a for loop because I need to make it available to multiple files. There is no error that occur with the work of Subvi to a path. The question is: what labview makes with the paths saved in a table between the loops? I have just run out of ideas so if someone had some time, I would really appreciate for all the tips and ideas.

    K.

    Hello again,

    If someone was interested in the happy ending: the solution is: 2 loops for. I think there must be something with the way that labview sends data between iterations. In any case - don't know how much exactly but works

    the floor is .jpg.

  • Samples buffered not updated in the loop For

    Hello.

    I'm having some trouble with DAQmx Read.

    I have 2 cards USB 6509 making a digital output to solve some multiplexers and I want to measure differential voltage

    using 2 boards of 6255 USB. I have a sample clock shared for 6255 boards through a PFI line. Unfortunately

    6509 boards do not allow for the synchronization of hardware I can say.

    So, to synchronize the functions I used a flat sequence to ensure that multiplexers are processed before acquiring the data of voltage

    and as you can see on the VI (LabVIEW 8.6) I use a loop to run 16 iterations and build a table with these data.

    The problem is that sometimes I get is error 200287 or 200010. And when I don't get an error, the data of 16 iterations

    is the same and it is incorrect because I'm monotoring the data to enter into the 6255 boards using a multimeter and data do not match.

    I seems to me that the analog input is read-only data iteration and I can't understand why.

    Also this VI takes a long time to run and it freezes for a few seconds on a few iterations.

    Can someone take a look at the VI and enlighten us please?

    I'm really stuck on this part.

    Thanks in advance.

    See you soon.

    Rui

    Rui,

    Well-that the code has sufficient space to improve performance!  Other than samples obvious to read the error that was made out, I recommend:

    • Use "master of task.vi" to commit the task before starting the loop - as you have tasks enter the loop 'unverified' and so for each iteration tasks are verified, reserved, committed, started, stopped, no committed, without reserve and unverified. That's a lot of unnecessary work behind the scenes!
    • Do not pass 30000 as a sample to the slave task rate HAVE read the actual sampling frequency of the main task of a task property node and pass a LARGE value this actual sampling frequency to the task of the slave (sample rate can get under duress and you cause a bit of a problem)
    • Bring your constants out of the loop, that the 8.6 compiler doesn't have some of the modern optomizations available for reading constant each iteration is frowned on
    • Check your version of DAQmx.  You want more 9.1 to avoid the bug of the autostart.
  • Excerpt from my table using the loop For

    Hello

    I have this loop to create a 2D array. The result is on the table below. I want that this 2D table should be fully completed and compiled, then it will be sent out of the loop.

    I don't want to extract the value of table 2D is a loop. This is the problem that I am facing.

    My ultimate goal is to extract the individual number of the final table of the 2D table line and be an entry for other functions.

    Please help me. Thank you

    PX

    Hi PX.

    Here's a solution without using screw express

  • How to get the items on a loop at the same time during the execution of the loop for

    Hello

    I am a student. I would like to know how to get the outside loop counter values For in parallel so that the loop runs rather than obtaining the value finally outside the loop for future prospects for the answers.

    Thank you

    Frederick

    You already said yes, and you have said some of the different ways (registrants, locals, reference, queue, etc.). Since the information was provided to your request, the thread can be considered closed? If you want details about how to implement something, you must provide the details on what you are doing.

  • Why this disable structure encapsulating the loop for that I'm falling?

    In the middle of coding and debugging I noticed something weird... now I'm just curious.

    Here is what happened (audio WARNING may be a bit much, fans of pumping in a warehouse im in...):

    https://www.YouTube.com/watch?v=vC9BKJ0CwmY

    I'm really just curious to know why this is happening - it seems that there is the note of "make sure wire you the error" fault behind the loop that the disable struc overlapped a bit...

    Why the struc disable that first, I dropped in this video did seize all of the loop?

    -pat

    You have this decoration of the label on your block diagram behind your loop For. When you put the new business structure, he captured this label which is outside the loop For. This forces the case structure to take the loop too, since it is the only way to recover the property node and label.

  • Value of the loop 'For' pass before the complete loop - FPGA

    Hello

    8.5 LV, LV FPGA, PCI 7831-R FPGA Board

    I got a cramp of brain on this one.  I have a function (Arb. GIS read) that Im using to generate an arbitrary signal which I created in memory.  I can't move to the value of data however.  I don't know why I can not, its because it is nested in a "loop For" who runs indefinetly and updates only the value whenever it loops back to 'zero '.  Ideas quick and dirty on how to use this value as it is being updated in the loop in my hand vi?

    I've seen messages on the use of local variable 'Files' and property nodes, but I can not just give a sense the.  Maybe because it's FPGA, something is different/no supported?

    * My principal is 'control MicroMirror Arb. SP", look in the #4 case and the condition of"false. "

    The 'Sub - VI' is called 'Arb Sig read RevB', and I'm trying to pass the variable 'Data' to hand while the loop For always runs.

    Thank you!


  • Cannot use Select inside the loop For inside the SCTL (FPGA) - Bug? An alternative?

    When I put a Select statement inside a loop in a loop of Timed Cycle in LabVIEW FPGA, I get the following error when I try to compile:

    "An internal software error occurred. Please contact National Instruments technical support on ni.com/support with the following information:

    Error-61003 occurred at

    Possible reasons:

    LabVIEW FPGA: you cannot include this function in a loop For when the loop is within a single cycle timed loop. »

    I didn't know that whatever it is documented that says that this is not allowed; is this a bug or am I missing some documents?

    The code that causes this error looks like this, inside a SCTL (ignore Boolean wire wandering behind the loop for)

    I came up with the code below instead, which compiles into one Cycle timed loop, but it is a bit ugly. Does anyone have a better suggestion?

    This issue is currently followed under the CAR # 592391. Please keep an eye on our patches and new versions as usual!

  • Position of the loop For

    Hello

    I have auto indexed loop For (see attachment .vi).

    I would like to show the position of the loop For on the front panel. At the moment the position appears only at the end of each iteration of a loop. I would like to show the iteration of the loop (ie 1-6) at the beginning of each loop. How to do this please?

    Nevica

    Click right int-cable in a loop and create indicator.

    /Y

  • I get my email on two computers. How to make a computer out of the loop?

    I get my email on two computers. How to make a computer out of the loop without jeopardizing my Comcast email account?

    Using Outlook Express? Go to: tools | Accounts and delete the account. If you think you can it in the future, go to the properties of the account, and under the general tab, simply uncheck: include this account when receiving or synchronization.

    If you are interested, you can receive messages at a time without losing them on one.

    On both machines:

    Tools | Accounts | Mail | Properties | Advanced - Check: leave a copy of messages on the server.

    On a single computer only, make sure to delete messages after X days to satisfy your allocated space that you get from your server.

  • dad bought me a computer PORTABLE from NUTRIGEST I HAVE BEEN out of the CITY FOR SOME TIME AND LATER BETWEEN the AUTHENTICITY CODE PRODUCT, AND IT's not SAYIING VALID, BUT I KNOW THAT CANT BE REAL CODE IS

    dad bought me a computer PORTABLE from NUTRIGEST I HAVE BEEN out of the CITY FOR SOME TIME AND LATER BETWEEN the AUTHENTICITY CODE PRODUCT, AND IT's not SAYIING VALID, BUT I KNOW THAT can NOT BE TRUE

    If it is a new machine call or go to circuit city and get them fixed.  If they sold you the laptop, indicating that it included Windows XP then the onus is on them that provide you a valid COA and the product key.

    John

  • repeating nodes using loop but when XML string concating then concating only last iteration of the loop FOr?

    I stuck with a problem that I use FOR loop to generate expandable nodes.
    Now when I concat the node generated in the primary node and then I only last iteration of the loop FOR.
    can someone suggest me a way to manage this error...
    BECAUSE me IN 1.pl_phone_tab. County
    LOOP
    SELECT xmlelement ("phone"
    , xmlelement ("PHONETYPE", xmlattributes ('01' AS "dmnADRP_PHONETYPE"), pl_phone_tab (i) .p_phtype_tab)
    , xmlelement ("PHONENUM", pl_phone_tab (i) .p_phnum_tab)
    , xmlelement ("PRIMARY_CONTACT", pl_phone_tab (i) .p_prcon_tab)
    )
    IN p_phone_xml
    DOUBLE; END LOOP;
    SELECT xmlelement ("PhoneInfo"
    xmlconcat (p_phone_xml))
    IN p_phone_info_xml
    DOUBLE;
    Here, I'm a single node, but there must be two nodes for node of PHONE
  • Why out of the loop after a managed exception is thrown

    I am trowing a custom exception inside a nested for loop. The execption notes, however, both the inner and outer loop output once the exception is thrown. I tried to add a continue statement, but that has not solved the problem.

    Jet moves execution of capture, closing the loop.  You can send a cancelable event instead.

  • Satellite A300 power suddenly goes out during the race for hours

    Dear users of the Forum,

    I am facing a strange problem in operation.
    My laptop Satellite A300 is suddenly down power during the race for hours.
    It is auto off not exactly. Not the way windows stop, is rather like strength to off (as when I press on & power button to stop force).

    This happens automatically, starting again, the screen saying "windows does not stop properly, start windows normally" is apperanig.

    I suspected virus infection, I tried full scan with nod 32, essential microsoft, kaspesky - 1 by 1 (previous uninstall and install the new), but all the antivirus intremediately scan stopped due to this power off.

    Watch movie also stopped in the Middle, attempted to convert the movie file format also was arrested several times because of this problem of automatic disconnection.

    I tried to run only on the power (remove battery) and got the same result.

    can anyone identify the problem? can you please give me the solution?

    smarjit1

    Hello

    I put t think it is s virus.
    En me it looks like overheating. Eventually the high internal temperature requires the laptop to close. This is done automatically to prevent the equipment from damage
    I'm not quite sure what could cause this exactly, but in most cases the dust inside the fans affects cooling performance and lead to a temperature higher than m.

    Higher temperatures could affect the RAM modules too, and perhaps that is the reason why some applications don't work properly.

    What to say; try to clean the cooling fans using a jet of compressed air and check out how the laptop would proceed

Maybe you are looking for