Problem conditional table

Hello once more I saw to face another question that I hope that Flash guru will be able to answer.

I have a function that checks the two arrays and returns a Boolean value based on whether they match or not, then I have a conditional that maintains Boolean values. My problem is that if a solution is not in first position of my conditional table will cross and hit first the else statement so that it is not the right solution, at that time he treats like a no match. I need to find a way for her to go through the table first, find if something is found, then struck the conditional statements, not really sure how I can do this, any help or ideas would be greatly appreciated, thank you.

my check of the table function

both functions using a table of correspondence (push both selections of the user) and a range of solutions (a multidimensional array that contains pairs i.e. [1,2] [3,4]).

If the length of the table match reached 2 checkForSolution is called.

function checkIfArraysMatch(arrayA:Array,_arrayB:Array):Boolean

{

var isMatch:Boolean = true;

If (arrayA.length is arrayB.length)

{

for (var i: int = 0; i < arrayA.length; i ++)

{

If (arrayA [i]! = arrayB [i])

{

isMatch = false;

break;

}

}

}

on the other

{

isMatch = false;

}

return isMatch;

}

My conditional function

function checkForSolution(e:TimerEvent)

{

for (var i: int = 0; i < solutions.length; i ++)

{

If (checkIfArraysMatch (match, solutions [i]): checkIfArraysMatch (match.reverse (), [i]))

{

solutions.splice (i, 1);

function fires to manage a correct answer

}

on the other

{

objectsArr [0].imgHolder.visible = false;

objectsArr [1].imgHolder.visible = false;

objectsArr [0] .gotoAndStop (1);

objectsArr [1] .gotoAndStop (1);

}

match.splice (0);

objectsArr.splice (0);

for (var ii:int = 0; ii < cardArray.length; ii ++)

{

cardArray [ii] .addEventListener (MouseEvent.CLICK, moEvent);

}

If (! solutions.length)

{

trace ("end");

}

}

Well okay, I got it working. Just change the flow of events to return another Boolean value, similar to my checkIfArraysMatch function and now it seems to work ok.

Tags: Adobe Animate

Similar Questions

  • Problem with tables

    Hi all!

    I was doing a simple practic, it is a random 3D Board and the problem is that I can't properly use the index in real time with random numbers.

    Here you have two VI, the first is simple, it is a 3D picture, but if you want, you can change the rows or columns and you will see the element changing to the same table 3D.

    But in the second is the problem, here's another 3D painting, but it is filled with random numbers, and when filling it finished start more and, instead, I see all the loose of the original 3D array.

    How could I do that the picture of random origin remains until I want to generate the following, and before that I then generates the one that I can get all the digital changig loose control (pages, rows and coulmns)?

    Your VI is run once and then stop. If you want to update you choose index different values then you must encapsulate this part in a while loop with a stop condition.

    When you want to generate a different set of random numbers click the stop button, and then rerun the VI.

    I suggest you only start by reading some tutorials online on LabVIEW programming. They should teach you the basics.

    Start here: http://www.ni.com/gettingstarted/labviewbasics/

  • problems with table formatting

    Hi all

    I currently have problems with formatting or to use a table to record the data (well it will be saved in a .csv file, but I'm trying to use the table to get it all properly formatted to the .csv file for ease of reading). It is probably something easy I'm dominant or do not add. If someone with more knowledge of labview (I only worked a few months with her power) could guide me through the process of how to make my idea works, I would be very grateful.

    I've attached the labview file, so you can see what I'm trying to do and how I'm trying to approach it a little more.

    In addition, if you need a little more explanation, just ask.

    Thank you very much!

    At first glance, it seems that you have made more complicated it must be.

    You have a ton of controls and indicators that could be better managed as tables or groups.

    To your immediate problem of writing file, you could just build a digital table and then use the entry in the File.vi worksheet and select a comma as separator.  The step where you are creating the spreadsheet string and then write in the text file is not necessary.

  • Problem with table of waveform: time scale do not see the time correctly

    Hello

    I have some problems with a graphic.

    I want to display data, and the duration between two unique data can vary. It's something between 50ms and 500 ms.

    The problems I have:

    1. the time is not correctly displayed in the graph (allways 02:00:10 instead of the current time)
    2. the data points in the table have a distance of 1 s (x-scale). This is not correct.

    I've tried several things, but I thinkt that I am on the wrong track.
    Could you please help me?

    Johannes

    LabVIEW 7.1 (!)

    I'm sorry. The property on the left node was not necessary...

  • Problem with table/table and past data capture

    Hi all

    Newbie is back and I have a problem with my program.

    A brief introduction of what I'm trying to do.

    I'll show you a failure to a system event.

    Based on each event, I will need to connect the error description, the tag, the fault start time and duration.

    All the event information will be displayed on the front table and this table will increase when new event occurred.

    For descriptions and tags - this is fixed based on what fault affects, respectively.

    The issue I'm having is to capture time.

    What I have in mind is to use the time to enter the start time and duration also.

    Departure time is not question because once I press boolean = true, it gives the start time.

    For the duration, when I press boolean = false, it wil give the total duration.

    However, I have a problem as follows:

    (1) to capture what a comprehensive data set (for example / / Desc: fault 1, Tag: one, start time: 2008-12-16 11:15:06 duration: 0 00:00:05) and it passed inside the trap fault Table.

    (2) if the same failure has occurred, it will overwrite the latest information. However, I need to keep the display of old and new events.

    Please notify.

    Opinions and suggestions are welcome mosssssst.

    Million thanks in advance.

    Hi Roziela,

    Thanks for the post and I hope that your well today.

    You must add logic to detect the change of the event (no fault to fault) and produce a Boolean result by 'raising' edge.

    I have a code to do this,

    Let me know what you think,

  • Sum conditional table

    Hello

    I am very new to labview so patient with me.

    I would go through the elements of an array which fulfil certain conditions and add them up, so that the condition is not met.  I would then take that money and build a new table, the second element is the element that did not meet the condition.  I would then like to continue where I left, but begins a new summons which could then be added to my new table until the condition is not met and so on...

    For example

    In view of the range:

    0.5

    0.5

    0.5

    4

    0.5

    0.5

    0.5

    4

    .. masse out...

    1.5

    4

    1.5

    4

    I was able to get a sum until the condition is not met by using a while loop, however, I can not understand how continue where I left in the table.

    If someone can give me a point in the right direction that would be appreciated.

    Try this:

    You must always face the condition where the latter does not meet the requirement, but that would be easy to fix. Try it.

  • dealing with problem of tables to play instrument

    Hi all

    I have struggled with this problem for weeks and hope someone in this forum can help out me. I'm reading data from a Phmetre via the RS232 to my computer. I read with reading VISA database and write code and have configured my setup series to finish reading to a line Feed (\n). I use the code in my attachment to analyze the data to read only the number of ph using string functions, search and replace, etc.

    Like the phnumber, I get only for a fraction of a second poster (when my tranmits instrument data IE every 5 seconds) using just the function of this channel, I added a case statement to search channels > 0 to display the data (number of ph) until the next update. I showed this in my snippet too. It works fine, but I get a bunch of 0 in the output array when my case is false.

    I initialized the array with dimension size 0 too and then use the array to build to add any new information to my existing table using a while loop with shift registers, but the table in the annex, I get has each exit number of ph with 7 other 0. I guess the array build feature allows 8 tables of element which will be formed with each transmission, or the way I am parsing the data is perhaps incorrect. I'm pretty new to Labview so don't know what I'm doing wrong.

    Conversely, in order to work around this problem I tried to add 8 elements of my annexed table at a time to see if I can generate a ph real number with each transmission, but don' know to do that either. I need to obtain a table of items with all numbers different ph no no to do a running average and min/max function but have contacted many people who could not help me arrive at an appropriate solution to this problem.

    I'm looking forward to any suggestions to make my code work better. I'm sorry that I couldn't reach the entire code as its exclusive information.

    Thank you very much!

    I can't confirm this function completely just watch a snippet, but according to your description, it seems like if you read the serial port at a faster rate that the device sends a new value. That's fine, but clearly, you do not want to add another element to the table if there is no data there. It seems as if this is the problem that you are experiencing. So while you can do something with some "use of data", I do not completely understand > 0 check must also drive a structure deal to the control that you add to the table, or use the existing table.

    Tip: Since you are a beginner, you should get used to try not having son ebb and passes. Clean wiring is not a matter of pickiness. It's a matter of being able to follow and understand the code, especially for someone else who may have to look at your code.

  • Problem joining tables; duplicate records

    I have problems with my request. She joined essentially three tables. I am inside the environment of the Apex, but this problem is with my request. I have three tables:

    JOBS

    Job_Id PK

    Job_Number

    Goal

    Title

    JOB_BUNDLES

    Job_Bundle_Id PK

    Modification_Number

    Justification

    Job_Id FK

    JOB_TASKS

    Job_Task_Id

    Sequence

    Task_Id (values can be either 1,2,3,4,5 or 6)

    Job_Bundle_Id FK

    You can see the stream / connection between each table. A JOB can have several JOB_BUNDLES and one can JOB_BUNDLE have JOB_TASKS a lot. One-to-many relationships

    My query now displays a report of JOB_BUNDLES for a given job, represented in the form:

    SELECT
    Job_Bundle_Id, Modification_Number, Justification, Job_Id
    FROM JOB_BUNDLES JB
    WHERE JB.Job_Id = :P26_Job_Id
    

    The page element, P26_Job_Id represents the Job_Id of the WORK of the table argument. That said, each record JOB_BUNDLE will have JOB_TASKS related records; more specifically, there will be at least a record where JOB. TASKS. Task_Id = 6. This happens only once. I can't get my information from the request that I submitted and the information from the table JOB_TASKS where the Task_Id = 6. I tried to add a JOIN and a WHERE clause, but I still get duplicate records. If anyone has some insight on this issue, it would be greatly appreciated. Thanks in advance.

    What:

    SQL > select b.*

    2, (select t.sequence

    job_tasks 3 t

    4 where t.job_bundle_id = b.job_bundle_id

    5 and t.task_id = 6

    (6) seq

    job_bundles 7 b

    8 where b.job_id = 1;

    JOB_BUNDLE_ID MODIFICATION_NUMBER JUSTIFICATION JOB_ID SEQ

    ------------- ------------------- ------------------------------ ---------- ----------

    1 0 there is no justification 1 12

    2 that 1 I'm just here for test 1

    3 2 it's the third amendment 1 7

    3 selected lines.

  • Problem with table tree ADF

    Hello

    I have following scenario.

    I have two read only vo (expert mode, not based on the entity) with a link between them. I want to display the data in a tree with checkboxes to parent nodes and child table. When the user selects a check box to the corresponding parent node with child nodes checkboxes should be auto selected.for achieve this I created transient Boolean attributes on two VO on the user interface layer, I use the Valuechangelistner to get the records of the child and the update of the transitional attribute.but, the problem is that the selection does not occur on the UI for the child node check boxes.

    Here is the code for updating the transient attributes.

    {} public void deptSelected (ValueChangeEvent valueChangeEvent)
    Add the code in the event here...
    DCBindingContainer bc = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    Iterator DCIteratorBinding = bc.findIteratorBinding ("DepartmentVOIterator");
    Region of DepartmentVORowImpl (DepartmentVORowImpl) = iterator.getCurrentRow ();
    RowIterator ri = region.getEmployeesVO ();
    String ID = null;
    {if (valueChangeEvent.getOldValue ()! = null)}
    Check Boolean = (Boolean) valueChangeEvent.getNewValue ();
    if(Check==true) {}
    region.setisDeptSelected (true);
    }
    Else if (check == false) {}
    region.setisDeptSelected (false);
    }
    {while (RI.hasNext ())}
    EmployeesVORowImpl empRow = ri.next ((EmployeesVORowImpl));
    if(Check ==true) {}
    empRow.setAttribute ("isEmployeeSelected", true);
    }
    Else if (check == false) {}
    empRow.setAttribute ("isEmployeeSelected", false);
    }}

    }

    }

    whenever the parent is checked valueChangeListner to fires and but the changes don't get triggered on the user interface. I suspect that some how the viewlinkaccesor is getting executed and transitional attribute values are lost.

    Guidance on the question?

    Thank you

    Sam.

    Sam, your question a bit sounds like something that I did in my last project.  I have a treeTable with two columns with components selectBooleanCheckbox.  Mine has the boxes with render = "false" for the parent nodes, but I see no reason why you couldn't do what you want with the parent nodes.

    The key is in the bean support - the value attribute of the boxes should be a map, so you can have individual values for each node.  So, I have:

    Map reqServices = new HashMap();
        public void setReqServices(Map reqServices) {
             this.reqServices = reqServices;
         }
         public Map getReqServices() {
             return reqServices;
         }
    

    And on the page, the elements are similar:

                
                    
                
    

    Note this node. ConduitePlan is the index of the card, so when you process the card value is true if the checkbox for that conduitePlan has been verified or does not exist in the map or is set to false if the box is unchecked.  It is added to the card when the user first checks the box, it changes to false if the previously checked box is unchecked.  You will probably use a ValueChangeListener to check the child nodes when a parent node is activated.

  • weird problem of table absolutely do my head

    Hi people

    I'm writing a script to replace the numbers in the text with a few numbers of single track (for the laser engraving).

    I have set up an array of points for each number of replacement path and everything was a lot, but then just at the end everything went crazy.

    It's as if the path in reading the table, the values which are then modified for each position on the page are somehow update the original source value!

    I can't for the life of tell me what is happening and have been banging my head for the last two days.

    I'm a complete javascript numpty, so I guess that's a blatant fundamental question that I can't see.

    really hoping that someone can point out my problem.

    to test, open a doc of illustrator, add 3 text boxes, type "0123" in the first "04561" in the second and "78912" in the last, select all 3 and run the script.

    you will notice that any number in several boxes will start wildly compensation, because the points of origin of the table have been changed?

    popular suggestions

    see you soon... /Jeff

    //================================

    script to replace the numbers of text by numbers of friendly way of laser cutting

    Table of forms of letter:

    var numShapes = [];

    numShapes [0] = [[5.67,0.00], [0.00,5.67], [0.00,39.69], [5.67,45.35], [17.01,45.36], [22.68,39.69], [22.68,5.6-7], [17.01,0.00], [11.34,0.00]];

    numShapes [1] = [[5.67,34.02], [17.01,45.35], [17.01,0.00]];

    numShapes [2] = [[0.00,39.69], [5.67,45.35], [17.01,45.35], [22.68,39.69], [22.68,39.69], [22.68,28.35], [0.00, 0.00], [22.68,0.00]];

    numShapes [3] = [[0.00,45.35], [22.68,45.35], [17.01,28.35], [22.68,22.68], [22.68,5.67], [17.01,0.00], [5.67,0.00], [0.00,5.67]];

    numShapes [4] = [[22.68,17.01], [0.00,17.01], [17.01,45.35], [17.01,0.00]];

    numShapes [5] = [[22.68,45.35], [0.00,45.35], [0.00,28.35], [5.67,22.68], [17.01,22.68], [22.68,17.01], [22.68, 5.67], [17.01,0.00], [5.67,0.00], [0.00,5.67]];

    numShapes [6] = [[5.67,22.68], [17.01,22.68], [22.68,17.01], [22.68,5.67], [17.01,0.00], [5.67,0.00], [0.00,5.6-7], [0.00,22.68], [11.34,45.35]];

    numShapes [7] = [[0.00,45.35], [22.68,45.35], [5.67,0.00]];

    numShapes [8] = [[22.68,17.01], [22.68,5.67], [17.01,-0.00], [5.67,-0.00], [0.00,5.67], [0.00,17.01], [5.67, 22-68], [17.01,22.68], [22.68,28.35], [22.68,39.68], [17.01,45.35], [5.67,45.35], [0.00,39.68], [0,28.35 0.0]];

    numShapes [9] = [[11.34,0.00], [22.68,22.68], [22.68,39.69], [17.01,45.35], [5.67,45.35], [0.00,39.69], [0.00,2 8.35], [5.67,22.68], [17.01,22.68]];

    the scale of each letter, STD numbers 8x16mm

    scalar var = [1,1];

    myDoc var = app.activeDocument;

    selectedObjects = myDoc.selection;

    Search for new layer forms numbers

    {if (! doesLayerExist ("laserText"))}

    laserText = myDoc.layers.add)

    laserText.name = "laserText".

    } else {}

    laserText = myDoc.layers.getByName ("laserText")

    }

    for (var i = 0; i < selectedObjects.length; i ++) {}

    get the numbers in a table of the text element

    var curText = .silence selectedObjects [i];

    var curTextArray = arrayFromText (curText);

    Get the position of the text

    var f is selectedObjects [i] .geometricBounds;.

    var origin = [[0] Go, Go [3] + 15];                                                           Basic approximate setting

    var gridUnit = [28.347 * scalar [0], 28.347 * scalar [1]];                         convert points in mm

    draw each shape number

    for (var j = 0; j < curTextArray.length; j ++) {}

    var curNum = parseInt (curTextArray [j]);

    var newPathItem = laserText.pathItems.add ();

    newPathItem.stroked = true;

    newPathItem.filled = false;

    curNumPath = numShapes [curNum];

    position of installation of each new issue

    for (var k = 0; k < curNumPath.length; k ++) {}

    curNumPath [k] [0] = curNumPath [k] [0] * [0] scalar + original [0];

    curNumPath [k] [1] = curNumPath [k] [1] * scalar [1] + original [1];

    }

    newPathItem.setEntirePath (curNumPath);

    origin from stage to the next unit of rack on the next issue

    origin = [origin [0] + gridUnit [0], origin [1]];

    }

    }

    -utility functions

    function arrayFromText (inputText) {}

    var entry = inputText

    splitText var = input.split("");

    return of splitText

    }

    function doesLayerExist (name) {}

    for (i = 0; i < app.activeDocument.layers.length; i ++) {}

    If (app.activeDocument.layers [i] .name == name) return true;

    }

    Returns false;

    }

    you will notice that any number in several boxes will start wildly compensation, because the points of origin of the table have been changed?

    correct, there is no 'clone' command Array, curNumPath = numShapes [curNum]; does not have a separate copy of the table, curNumPath is just a reference to numShapes table

    var arr1 = [[0,1],[2,3]];
    var arr2 = arr1;
    
    $.writeln(arr1);
    $.writeln(arr2);
    
    arr2[0][0] = 7;
    
    $.writeln(arr1);
    $.writeln(arr2);
    
  • Potential problems for tables without primary keys and unique keys

    GoldenGate 11.2.1.0.3/Solaris 10
    DB: Oracle for Oracle (Source and target is 11.2.0.3)
    Topology: unidirectional


    In our one-way configuration GG, little of the tables being replicated is not a primary key or a Unique key.

    Last week when we have implemented GG for the test, we received warnings for these table below.
    GGSCI > add trandata WMHS_UD.crtn_dtl
    
    2013-01-12 11:34:33  WARNING OGG-00869  No unique key is defined for table 'CRTN_DTL'. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.
    
    Logging of supplemental redo data enabled for table WMHS_UD.crtn_dtl.
    Replication seems to work very well for these tables.

    Googling, I think that there may be performance degradation when you replicate tables without PK or the United Kingdom.

    But are there other potential problems such as data of a certain kind not replicated to the lack of PK/UK?

    It really depends on the data.

    By default, GG is combining all columns as a virtual primary key but don't no conflict control by default. So when you can be sure that the record you insert into the table is unique, then it will work.
    BUT as soon as you insert the same record, which is already inserted, then you will encounter problems.

    Let me show what happens when you use an initial charge because it makes it easier to describe:
    We start at 10:00 the capture for a table. Now, you insert a record at 10:00 in the tables. When you now start an initial charge to 10.02, then check you have inserted in the database to 10.01 will be repeated two times. During the IPL as the initial charge is made to 10.02 and it includes data of 10.01 AND it will be replicated again through the process of capture/replicate.

  • Problem in table form

    Hi all

    For our customer, we want to create a tabular presentation for all the world to reserved for hours in our database.

    Looks like the shape of tables:
    Read activity I we Th his di ve
    1 3 8 1 5 example
    2 3 5 0 7 2 example

    A reserved time may be a different type of time.

    Now, we want to create a total row below the last row of availalable for each type of time. It should like this:
    Read activity I we Th his di ve
    1 3 8 1 5 3 example
    2 3 5 0 7 2 4 example

    1 1 3 8 1 5 3-total
    2 3 5 0 7 2 4-total

    The total line by default, in the form of tables, I can't use because I have to show several total lines.

    I also tried to create a new region with the totals. Then I have 2 problems.
    The first problem is the lay-out. I would like to show the totals exactly under the value of the day. When I use a default report (with standard report columns) so it is highly impossible to do (and if I try in Firefox and Internet Explorer, then it will not look the same). When I use text instead of columns fields report standard then the lay-out is perfect but then my table won't work any more (problem 2).

    It seems that if I create a new region with textfield (also if I disable them) that the name of the field (F01, F02 etc.) might be the same as the name of the textfields in tabular form. If you ever read where I can change this name.

    Does anyone have a solution for this problem?

    I am using Oracle 11 G with APEX version 4.1

    Thanks in advance!

    As stated in my previous post, use the APEX_ITEM. API TEXT such as described here http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_item.htm #CHDDCHAF.

    Do not forget that you are using p_idx a value greater than 12.

    Once you do this the standard AppyMRU will not process the f13 from. You will need to treat f13 from using your custom MRU, use you your MRU APEX_APPLICATION. G_F13 leave.

    FOR I IN 1..APEX_APPLICATION.G_F13.COUNT LOOP
     -- DO YOUR INSERTS/UPDATES HERE
    END LOOP;
    

    Kind regards

  • Problem: two tables of facts and a dimension in accordance with

    Hello world!

    I need solve this situation:

    I have two fact tables, say F1 and F2, which are both linked to D1, my dimension in line
    I just need to select fields of D1, but I know that, when querying, OBIEE links to a table of facts anyway... How is it chooses the fact table? In other words, if I want to only fields D1, not the system also queries of F1 or F2? What is a random choice?

    Is there a way to "force" this choice, saying the system for example to choose only from F1?

    Is there a work around to resolve this situation? Remember, I only need fields D1.

    Thank you!!

    The solution to your problem is "column name".
    Go to the layer of presentation and double click on your domain. Then you will see name column option. Click on set. give the corresponding column actually it (in your column of fact give deal F1)

    References: http://oracle-bi.siebelunleashed.com/articles/implicit-fact-column/
    Thank you
    GSR

    Published by: GSR on 20 March 2012 15:22

  • How to get if THEN ELSE another condition table

    Hi eveybody,.
    I have a situation and I need your advice guys.
    I apply if THEN ELSE condition in PL/SQL from another table. I do the merger in tableA that will run IF Column1 in tableC = Y.
    Ex: Tablec has three columns: source, dest, condition. Condition IF = Y in tableC, then merge into tableA use (Sql query in table C source selection) B.

    Please let me know how to get the condition = Y of table C.
    Condition IF = Y for each source in C, then fusion will happen for this source.

    Please provide your comments and your responses.
    I'd really appreciate your comments and your responses.
    Thank you very much.

    user13426784 wrote:
    DB link is passed as parameter in MS and we need to check the status for this link db to TableC.

    select   status
      into  v_status
      from  tableC
      where db_link = v_source;
    if v_status = 'Y'
      then
        EXECUTE IMMEDIATE 'MERGE INTO tableA A USING
    (select  from tableA@' || v_source || ')B
    when matched insert
    when not matched update';
    end if;
    

    SY.

  • XDB. XMLIndex problem and table (XMLSEQUENCE (EXTRACT (xmltype, path))

    Hello
    I have a database of Oracle 11 g Release 11.1.0.6.0 - 64 bit Production With the Real Application Clusters option.

    I feel something strange with an XMLType column.
    I have a table configurator.t_vehicle_configuration (id_vehicle x_configuration NUMBER, XMLType).
    x_configuration is unstructured.

    I created an index on the field of xml in this way:

    CREATE INDEX idx_vehicle_configuration ON configurator.t_vehicle_configuration (x_configuration) INDEXTYPE IS XDB. XMLIndex;

    Then I have a package implementing a function that count nodes in the xml field and its return values

    This does not (return 0 instead of 1):
        SELECT count(*)
          INTO count_
          FROM configurator.v_vehicle_configuration vc,
               table(XMLSEQUENCE(EXTRACT(vc.x_configuration, '/vehicleconf/GeoFence/spaceTarget[@id="'||in_id_space_target||'"]/user[@id="'||in_id_user||'"]/alarmwhen'))) p
         WHERE vc.id_vehicle = in_id_vehicle;
        
        RETURN count_;
    This mode of operation (return 1):
        str_ := '/vehicleconf/GeoFence/spaceTarget[@id="'||in_id_space_target||'"]/user[@id="'||in_id_user||'"]/alarmwhen';
    
        SELECT count(*)
          INTO count_
          FROM configurator.v_vehicle_configuration vc,
               table(XMLSEQUENCE(EXTRACT(vc.x_configuration,str_))) p
         WHERE vc.id_vehicle = in_id_vehicle;
        
        RETURN count_;
    As this mode of operation:
        SELECT /*+ NO_XMLINDEX_REWRITE */ count(*)
          INTO count_
          FROM configurator.v_vehicle_configuration vc,
               table(XMLSEQUENCE(EXTRACT(vc.x_configuration, '/vehicleconf/GeoFence/spaceTarget[@id="'||in_id_space_target||'"]/user[@id="'||in_id_user||'"]/alarmwhen'))) p
         WHERE vc.id_vehicle = in_id_vehicle;
        
        RETURN count_;
    And also this way it works:
        SELECT count(*)
          INTO count_
          FROM configurator.v_vehicle_configuration vc,
               table(XMLSEQUENCE(EXTRACT(vc.x_configuration, '/vehicleconf/GeoFence/spaceTarget[@id="228"]/user[@id="49"]/alarmwhen'))) p
         WHERE vc.id_vehicle = in_id_vehicle;
        
        RETURN count_;
    I sailed a bit on the internet but I have found no help for my problem...
    I guess that's something concerning the substitution on the fly of the variables, which does not work with an index.
    Do you have any suggestions?
    Is there a way that will prevent the rewriting of all the functions?

    Thanks in advance

    First

    On 11.1.0.6.0 Please do not use table (xmlsequence (extract ())) Please use the SQL/XML standard XMLTAble operator...

    SELECT COUNT(*)
       INTO count_
      FROM configurator.v_vehicle_configuration vc,
               XMLTABLE
              (
                  '$XML/vehicleconf/GeoFence/spaceTarget[@id=$ID_SPACE_TARGET]/user[@id=$ID_USER]/alarmwhen'
                  passing vc.x_configuration as "XML",  in_id_space_target as "ID_SPACE_TARGET",  in_id_user as "ID_USER"
               )
         WHERE vc.id_vehicle = in_id_vehicle;
    
        RETURN count_;
    

    2. never generate XPATH strings dynamically (Note XMLTABLE simply will not allow it). It is almost impossible to optimize since in the case escalated, the query may be a function of the processing line, and it leaves the vulnerable application WHO the problems of injection. Earlier versions of XML DB supported the use of string concatenation technique to provide the value of predicate as a method of implementation of the bind variable, but from what I remember, this is only implemented and tested for storage relatiion object. Even when workng with storage relational object this technique should not be used in the development of new code n a 10.2.x post database. As far as I know this was not implemented for binary XML / XML INdex since the implementations of XMLQUERY, XMLTable and XMLEXists provided a much more robust implementation and standardized to link the underlying values at query runtime

    If you do not know the XPATH expression until run time please build the complete SQL statement dynamically and run it via EXECUTE IMMEDIATE or DBMS_SQL, then pay attention to injection vunerabilities in your application.

    The fact that you get different results seems to be the result of the previous method of binding of predicates works do not correctly with the XML Index. If the solution I gave above does not work, please fill out a bug and that we can continue the investigation

    Published by: mdrake on February 25, 2011 17:32

Maybe you are looking for

  • The iPhoto v8.1.2 update

    I understand to get iPhoto to work on El Capitan, I need to upgrade to the latest version. My problem seems to be that the version I have is the original that came preinstalled on my macbook pro (v8.1.2). I can not find the new version of the App Sto

  • Installation errors (x 86 and x 64 platform)

    I need help to install a purchased ms office professional plus 2010.  It behaves as if it has download and at the end of the download, I get the error message that I need to run x 86 or x 64 platform.  I really have no idea what it means.  did some r

  • 'No' genuine copy of windows after a hard disk failure.

    I have a 2 years old HP Pavilion G series and recently my hard drive has failed and could no longer boot to the top, so I bought a new hard drive and reinstalled windows using the drive of my friends and my original product key. (I don't have a disc

  • determine the 'parent' of a selection

    Assuming that the cursor is in a story or selected text in a story, how, of app.selection, determine the paragraph, in which the cursor is?Of the paragraph, I could not history but I can't find any 'parent' properties from a selection to determine wh

  • Impossible to get form elements to align

    capricious form pageCSSThe "preferred method of contact" and the section of radio buttons will not do what I want. Do not know what is affecting TI / what to change. I cut a jpg screencap to show what I want.Also do not post 2 lines and I do not unde