How-To "IN" a list of items to an XQuery Expression.

Greetings All, I have a query that is working as expected:
SELECT count(*)
FROM XML_TEST
WHERE XMLExists('/ArrayOfCustomField/CustomField/NumberValue\[. >= 12.48 and . <= 321.56\]' PASSING CustomFields);
This provides me with essentially the "BETWEEN" operator.
However, I need to mimic the "IN" operator, e.g.)
SELECT count(*)
FROM XML_TEST
WHERE XMLExists('/ArrayOfCustomField/CustomField/NumberValue\[ IN 12.48, 321.56, 4993.2\]' PASSING CustomFields);
**The query directly above obviously does not work.
With that said how do I reformat the offending query to do what I need it to do?
I am not restricted to using XMLExists and I am open to any type of xml query that will allow me to pass in a string of items to query on.
Any and all help would be greatly appreciated.
Oracle Version: 11.1.0.7 SP 12
Table DDL:
CREATE TABLE "XML_TEST"
AccountID RAW(16) NOT NULL ENABLE,
RAW(16) NOT NULL ENABLE,
CustomFields "SYS"."XMLTYPE"
Table DML:
clobVal := '<?xml version="1.0" encoding="utf-8"?>
<ArrayOfCustomField xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CustomField ReferencedID="3A887DE7B2FA4A19B9F66FCC19E02062">
<StringValue>Picture</StringValue>
</CustomField>
<CustomField ReferencedID="014F2EFA42CF40829A9A5FB761759071">
<StringValue>Picture</StringValue>
</CustomField>
<CustomField ReferencedID="59690AD42A5B4C83B4917D024908F905">
<NumberValue>12.48</NumberValue>
</CustomField>
<CustomField ReferencedID="06675CD4B0FD4C769C3266260159EAC4">
<DateValue>1242394042</DateValue>
</CustomField>
</ArrayOfCustomField>';
INSERT INTO XML_TEST (AccountID, TenantID, CustomFields)
VALUES ('ADDA071176A94654A2BE2129A1ABFBF9', 'F068F6D54ED2DB11ABE500188B001DE0', xmltype(clobVal));
-- INSERT #2
clobVal := '<?xml version="1.0" encoding="utf-8"?>
<ArrayOfCustomField xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CustomField ReferencedID="60A33C7BEB3245FB9D49F57E58A0856A">
<StringValue>Picture</StringValue>
</CustomField>
<CustomField ReferencedID="8DDF1D2A565D4515883BB90308439124">
<StringValue>Picture Book</StringValue>
</CustomField>
<CustomField ReferencedID="88FF49FAF75942EBABB13C84C647737F">
<NumberValue>321.56</NumberValue>
</CustomField>
<CustomField ReferencedID="F78F8772988F44A1873F3E79D1722BD1">
<DateValue>1242494042</DateValue>
</CustomField>
</ArrayOfCustomField>';
INSERT INTO XML_TEST (AccountID, TenantID, CustomFields)
VALUES ('1C9825F2EEC6419B9D77AB5A4CB87543', 'F068F6D54ED2DB11ABE500188B001DE0', xmltype(clobVal));
Regards, L

The point was only to demonstrate how you'd mimic the IN operator.
I used
  ENAME/text()= ("SCOTT","JAMES")
...which in your case would be sth like
  '/ArrayOfCustomField/CustomField/NumberValue = (12.48, 321.56, 4993.2)'

Similar Messages

  • How to edit the list box items in labwindow/​CVI?

     how to edit the list box items in labwindow/CVI?

    Listbox items cannot be edited directly in the control: what you can do is to select a line an, transfer its content to a textbox control, edit text there and move text back to the listbox control. Available interactions with the listbox control are listed in the help.
    An alternative to it is to use a tree customized to appear like a listbox: tree item labels can be edited directly in the control, at least those in the base column of the tree. You can look at the example \samples\userint\treelist.cws that shows how a tree can be customized this way. I haven't opened it, but this old example too should show the ability to edit tree cells.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How do I clear list of items purchased without deleting the apps?

    How do I clear list of items purchased without deleting the apps? Also, is there away to attach photos from camera roll when replying or writing a new email?

    There is no way to remove items from the purchased list on the iPad.
    You can send a photo from the mail app by tapping and holding down in the body of the email and select - Insert Photo or Video - from the black options bar that will pop up.

  • How to make menu/list (form) item open in it's own window instead of blank one?

    Items in a form (list/menu) that I've created are opening in a blank window (pop-up) when clicked. I would like them to open in "self" mode so that pop up blockers on various computers don't become a challenge for site visitors. Can anyone please tell me how I could make that adjustment using Dreamweaver? I am a novice (if that) in coding, so if there is a design view solution that would be absolutely awesome. Any assistance to get me on the right track would be GREATLY appreciated!! BTW I also made the form a library item (just in case that fact is needed). Also if you need to see the actual link it is
    http://www.graphicmechanic.com/DEKALBCOUNTY/index.html. The "I WANT TO" list is the part I'm referring to.
    I am also attaching 3 files (the .lbi file, the template and the page both are applied to).
    I tried a couple of things already. One was javascript, but I still seemed to have problems, the others were selecting the form and changing the target to self. Another developer said that I would need to apply the target attribute to each link, but I am having trouble doing this.

    No.  They removed that functionality as an improvement to iTunes in version 11.    I saw one person mentioning making a screen grab of the window and displaying it as an image in Preview while looking at the actual iTunes in another window, but it doesn't quite strike me as being the same...
    http://www.apple.com/feedback/itunesapp.html

  • How to access spark list selected items

    selected items is some sort of vector? I can't access the items in it, can anyone shed some light on how to acess them? Maybe print them to the screen?

    I too am dragging through the documentation with a fine toothed comb and am at a loss of how to get something as simple (and intiutive) as myList.items.
    Maybe I'm overthinking it, but if I have a custom item renderer with a checkbox in it and when the user clicks the checkbox and it's selected state changes, I'd like to let the List that contains the List Item know of it... not that the item was messed with, but more to the point, that the checkbox was messed with and which item it was a member of...
    Right now I can't even figure out how to do something as rediculously simple as creating a creationComplete handler that iterates through the list items and calls a function in them to set a reference to itself that the list item can reference.     

  • How scroll through a list of items in list box with code in C# winforms to create auto scrolling

    I am new to programming and I have been tasked to create a form to display information in list box controls on a big screen. The list boxes have to show all data by auto scrolling through all data row by row then start again at the top once it has displayed
    all data. Is there a way to do this automatically in code using a timer? I look all over the web and have not found any way to do this in win win forms. Is it possible?
    Thanks 

    Here's the c# code
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    namespace WindowsApplication13
    public partial class Form1 : Form
    System.Timers.Timer timer = new System.Timers.Timer();
    int position = 0;
    public delegate void delegateUpdateListbox();
    public Form1()
    InitializeComponent();
    private void Form1_Load(object sender, EventArgs e)
    timer.Interval = 1000;
    timer.Enabled = true;
    timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
    void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
    position += 1;
    if (position == listBox1.Items.Count)
    position = 0;
    delegateUpdateListbox deleg = new delegateUpdateListbox(updateListbox);
    this.Invoke(deleg);
    void updateListbox()
    listBox1.SelectedIndex = position;
    As long as the listbox's SelectionMode is set to "One" (the default), you don't have to do anything to un-select the previous item.
    For your secnd question, the code inside the timer checks whether the position is the same as the length of the contents of the listbox and resets its value to zero, so that the selection will go back to the first item in the list.

  • How to color a list box item at run time

    I do not want to change colors in a selected or a highlighted item.  I want to color foreground on any item based on a program condition.
    IN windows forms I could change the drawmode property to ownerdrawfixed and then override the listbox rendering event and paint the item based on condition.
    I don not find such a property in the WPF listbox.  Is there a different way to do this?
    NR

    Thanks Olaf.   I changed the section below to my code as you suggested and it works fine now.  I can now modify it to make it applicable to other scenarios.
    public
    partial
    class
    MainWindow
    : Window
    public
    System.Collections.ObjectModel.ObservableCollection<string>
    MyItems { get;
    set;
    public
    MainWindow()
    MyItems =
    new
    System.Collections.ObjectModel.ObservableCollection<string>();
    InitializeComponent();
    private
    void
    button1_Click(object
    sender, RoutedEventArgs
    e)
    MyItems.Add(textBox1.Text);
    this.DataContext
    = this;
    NR

  • How to create a list of string if a regular expression is given ?

    Hi folks,
    I have a regular expression say abcd[a-z]\\\.[0-9] . ( please ignore one '\')
    For this string i know that
    following string matches successfully
    1. abca.0
    2. abcb.1
    3. abcz.9 ......etc n number of combination are possible.
    is there any algorithm which will create some randomn strings from a regular expression.
    input to algorithm : some string pattern
    output to algorithm : some matching strings ( can be a single or an array of matching strings)
    Thanks in advance..
    Sethu
    Edited by: Sethumadhavan on Apr 16, 2008 6:32 AM

    Can u please give little more explanation...
    If i get some some values i can exit with the values ... and from the values i got i can ignore the duplicates ...
    But i am not getting the basic algorithm to get list of strings.....( DFA? or NFA?)
    thanks
    sethu

  • How to Populate a List item with LOV'S

    How to Populate a list of items with Lov's
    and then how to dynamically change the Values of one LIST Item
    Based on the Value of anothe List item

    976798 wrote:
    --Hello..I want to ask that How to bind a list item with  table values? this below code does not populate items from database to list item.Pls any body give me solution.
    declare
         group_id RecordGroup;
         list_id Item:=Find_Item('LST_CLASS');
         status number;
    begin
         group_id:=Create_Group_From_Query('Answer_List','select CLASS_ID,CLASS_NM from CLASS_MSTR');
         status:=Populate_Group('Answer_List');
         message(to_char(status));
         Populate_List(list_id,group_id);
         end;Welcome to the Oracle Forums. Please take a few minutes to review the following:
    <ul>
    <li>Oracle Forums FAQ
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>How to ask questions the smart way
    </ul>
    Following these simple guidelines will ensure you have a positive experience in any forum; not just this one!
    Check this link: How to Dynamically Populate a Pop List ?
    Hope this helps
    Hamid
    If someone's response is helpful or correct, please mark it accordingly.

  • How to limit the number of items in a KPI Status list web part?

    How to limit the number of items in a KPI Status list web part? There is no paging option for Business Category Status list or any limit can be made by changing the Item limit in default view unlike other SharePoint List web parts. So How to achieve it?
    Kindly help.
    Regards,
    ZA
    zzzSharePoint

    Hi,
    According your post, I know you would like to set the item display limit in Status List web part.
    In the web part, the number of items to display is based on the view which you selected when configuring the web part. The default view for status list is status list view.
    However, I am not able to limit the items’ display number of the status list view. After changing the items limit, the list item displayed would not match the number specified by Item Limit. Thus, it is not possible to limit the number
    of items in the Status list web part.
    It could be a potential issue in SharePoint 2010.
    We will log this issue to our suggestion box. As after the submission, we may not have any time guarantee when the fix may be released, but it may come out on next cumulative update.
    Appreciate your time and efforts.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • How to limit the number of items that a list control can hold?

    Hi,
    I am using a Flex3 List control for one of my projects.
    I add drag & drop functionality to it, so that i can drag & drop elements from one control to another.
    How to limit the number of items that a list control can hold / can be dropped in a list control ?
    - Sen.

    1. Listen for the dragdrop event on the control you are dragging onto.
    2. check the length of the items in the dataprovider - if it exceeds your maximum override the default drop action with e.preventDefault(); (assuming you used e for the event on the handler).
    Regards,
    Mark.

  • How to keep the list to show max.of 3 items at a time

    i had a list, the rows are dynamically generated, the problem comes with when the item are more than 3. the 4th one is half visible which looks odd. i want to see 3 rows at a time, how is this possible.  i set rowCount, variablerowheight it didn't work.
    thanks for reading.

    package  Components{
     public
    public  
    class AdvancedLegendList extends List{
    public function AdvancedLegendList(){
    super();} 
    override protected function measure():void
    if(this.height>3) 
    this.height=measureHeightOfItems(-1,1);}
    and set the list as
    <Components:AdvancedLegendList id="itemList"dataProvider="{_incentivesCopy}borderVisible="false" width="295"rowCount="
    {Math.min(DataContext.Incentives.length, 3)}"variableRowHeight="true"selectable="
    false"verticalScrollBarStyleName="sbTrackStyle" paddingRight="1"
    <Components:itemRenderer> <fx:Component>
    if i have override the measure() function in script, i dont know how to access this list.

  • TS3999 In MONTH, (PC) iCal only clearly lists 2 items a day. The 3rd item is "faded" and bottom portion cut off, w/ a "more" triangle in the lower-right corner. How can I expand (vertically) so the 3rd line posts clearly, and ONLY shows "more" if 4+ event

    In MONTH, (PC) iCal only clearly lists 2 items a day. The 3rd item is "faded" and bottom portion cut off, w/ a "more" triangle in the lower-right corner. How can I expand (vertically) so the 3rd line posts clearly, and ONLY shows "more" if 4+ events?
    Better yet... as there's a lot of "wasted" space w/ too large Month title and empty space surrounding the Month title above and too much space surrounding the month/year slider bar below, how can I minimize these to allow me more usable / valuable calendar "contents" so I don't need to waste so much time clicking "more" just to see the bottom of the truncated third event and find out there are no 4+ events posted that date?  i.e. more "user-friendly" presentation?
    Thx!
    [email protected]

    In MONTH, (PC) iCal only clearly lists 2 items a day. The 3rd item is "faded" and bottom portion cut off, w/ a "more" triangle in the lower-right corner. How can I expand (vertically) so the 3rd line posts clearly, and ONLY shows "more" if 4+ events?
    Better yet... as there's a lot of "wasted" space w/ too large Month title and empty space surrounding the Month title above and too much space surrounding the month/year slider bar below, how can I minimize these to allow me more usable / valuable calendar "contents" so I don't need to waste so much time clicking "more" just to see the bottom of the truncated third event and find out there are no 4+ events posted that date?  i.e. more "user-friendly" presentation?
    Thx!
    [email protected]

  • How to insert multiple list item as separate records

    I have a form with a list field in which user can select
    multiple item <select multiple="multiple"><option
    value></option></select>. My problem is that I don't
    know how to do an insert sql operation that puts every selected
    item on the list field into a separate record in a database table.
    I think that first I should get it to know how many item was
    selected from the list, than write the insert into statement
    between loop tags which loops the operation until every item has
    inserted. I'm not sure about it and even if I'm right, I don't know
    how to code it. Could someone show me a sample code for such a
    "problem"?

    quote:
    Originally posted by:
    Newsgroup User
    The ScareCrow wrote:
    uh, depending on the db (say it's sql server) you might want
    to swap the loop &
    cfquery to make that one big insert rather than a bunch of
    cfqueries.
    The following approach will work with just about any db and
    only uses once connection
    <cfquery>
    insert into sometable
    (field1, field2, etc)
    <cfloop list = "#somelist#" item = "thisitem">
    select distinct #thisitem#, 'something else', etc
    from some_small_table
    <cfif listfind(somelist, thisitem) lt
    listlen(somelist)>
    union
    </cfif>
    </cfloop>
    </cfquery>

  • How to create distribution list in workflow? for  sending mail or work-item

    Hi,
    How to create distribution list in workflow? for  sending mail or work-item to multiple users.
    Regards,
    Surjith

    Hi Surjith,
    A.Working with Distribution Lists Creating a Distribution List.
    1 Businees Workplace->shared folder - create new subfolder name = WF_distributor
    2.Then click on the distribution list in Businees Workplace.
    say create Name = WF_Vliste
    folder Name = WF_distributor
    3.distribution list content tab
    Enter Recipient (SAP User ID)
    B.Wrkflow Builder
    Find out the dialig step in which u want to use distribution list
    Use workflow Rule 30000012 (SWX_READ_DLI).
    Maintain the binding from workflow container to rule container.
    Just pass the name of the distribution list from WF to Rule container.
    Regards
    Sagar S

Maybe you are looking for

  • Windows apps doesn't display properly

    Hello I am having a problem with windows apps. It only shows a part of the app. For example my Mail app in an email it only shows part of the message the rest of the message is beyond of the screen but I don't horizontal or vertical scroll. I hope I

  • Table for staffing status

    Hi all, Can you tell what table is for <b>staffing status</b>. I can c this in transaction <b>PPOME</b> but couldnt find table for this. Just I am trying to find status of possition. is there any function module for this? Thanks Shiva

  • How to reverse array display order?

    Is there a way to reverse the way labview displays array data?  When using a boolean array I would like the LSB to be on the right side. I know that you can use the reverse array function, but that changes the actual data. I would rather just change

  • What Are the Advantages of using Sub VI

    I am just wondering what the advantages are when using sub VI. 

  • Album Images Issue

    I am using a SONY XPERIA M2 and i'm having few problems. 1- When I connect to the PC, it does not detect both internal memory and SD card. It only detects SD card. So when I transfer the images to the SD card if I want them to be transferred on my PC