How to use a list of strings as a parameter of data service

Hello.

I need to create a service that receives a list of string as parameter. I read the thread list of values as param - is possible to bring down the query? but I was unable to make it work.

In the my namespace, I defined an element:

< xs: element name = "keyList" >
< xs:simpleType >
< xs:list itemType = "XS: String" / >
< / xs:simpleType >
< / xs: element >

In my dataservice, I stated the following function:

declare function tns:list ($keyList as element (bt: keyList)) as {element(bt:employee) *}

for $key in $keyList
for $employee in emp:EMPLOYEES()
where (fn:upper - eq fn:upper-case(fn:string($key))) case($employee/STR_KEY)
return
< bt: employee >
< bt: name > {fn:data($employee/STR_NAME)} < / bt: name >}
< / bt: employee >
};

When I test this situation, the generated SQL code considers that all the keys as the only parameter:
(...)
WHERE (UPPER (t1." STR_NAME") =?)
(...)

So, if I try a string of a list, it works:
(...)
WHERE (UPPER (t1." THE STR_NAME") ="STRING1")
(...)

But with two or more strings...
(...)
WHERE (UPPER (t1." THE STR_NAME") ="WORD1 WORD2")
(...)

What I am doing wrong?

Also, on the wire, I mentioned, I would like to know how I could make the reference "for $paramString in $paramStrings / AN_ELEMENT ' using my code.

Best regards and thanks for your time!

My answer in list of values as param - is possible to bring down the query? has been

I think you want:

for $paramString in $paramStrings / AN_ELEMENT

and you have:

for $key in $keyList

$keyList is a single element that contains a complete list, so $key is the only element that contains a complete list. And that is why it does not work for you.

Yourself and the other poster are doing more complicated things they should be. You can simply use the following (you need not specify a child of $keyList here). The ' * ' after XS: String means minOccurs = 0 maxOccurs = unlimited.

declare function tns:list($keyList_as_xs:string*)...

for $key in $keyList
...

Tags: Fusion Middleware

Similar Questions

  • How to use several adf 12 shape and insert the form data in to table during the click on "submit" button

    How to use several adf 12 shape and insert the form data in to table during the click on "submit" button. Can we use several form from adf or not?

    Make sure that you dragged the VO based EO.

    Also make sure that the VO attributes based EO Updatable property.

    The query according to VO is used only to add LOV to the column of the original VO ModelId.

    See you soon

    AJ

  • How to use a var a string

    Hello, sorry for my question,

    but I want to use a var a string:

    I know it's a completely beginners question, but I didn t need to date:

    Zahl var = Math.floor ((Math.random () * 99) + 1);

    SYM.$("frame")

    (. CSS

    {' background-image': ' url("images/zahl.jpg") '}

    }

    );

    I tried with {number} and [number], but it does not work.

    Help would be great

    Oliver

    {'background-image':'url ("images /" + number + ".jpg") "}

  • How to use a list in a query so that you can sort the list according to an attached table?

    1. my initial query returns the phone numbers with inconsistent structures. Example:

    -555 (555) - 5678

    666-555-5678.

    555.5678 (444)

    1-888-555-5678

    2. I have to loop through the list and perform a certain number of cleaning functions, this is why the list looks like this:

    555-555-5678.

    666-555-5678.

    444-555-5678.

    888-555-5678.

    3. now, I need to use this list in a query, if I can use the first three digits to seek a regional indicative table sign and its link and be able to sort by area code. The indicative table looks like this:

    ThreeDigitCode AreaID

    555                         1

    666                         2

    444                         1

    888                         4

    I need to put the phone in the query list, so I can do a search of the areaID and the comparable information to a table that says AreaID 1 is Eastern and his sort-position is 1, etc..

    Thanks in advance for your advice.

    You can add an empty your query column, when you select the phone

    numbers and use this column to store the ThreeDigitCode:

    SELECT phone_number, '' as threeDigitCode FROM #your_table#
    

    then clean up the numbers and place the 3 digits in others

    column. And then using query of query to join phone numbers with

    area codes:

    
      
    
    
    
      SELECT *
      FROM phone_number
        INNER JOIN area_codes ON area_codes.threeDigitCode =
    phone_number.threeDigitCode
    
    

    Mack

  • How to use an install.xpi configuration file to configure email data

    Manual installation of my e-mail account failed because Thunderbird search my domain name and is not in its database. If my webhost gave me a file of automatic configuration for Thunderbird for my e-mail, called install.xpi - account but how to use this file? I can't double-click them in Windows to do anything. Thunderbird program, he wants to create a new account, but I can't do anything else in it as importing files.

    How to use the install.xpi file so it creates my e-mail account with the appropriate configuration variables? Thanks for your help.

    Launch Thunderbird, close the wizard, goto the Add-ons, select Tools menu (alt + T)

    There is a small button to the left of the search window. Click this button and select install module file and navigate to your xpi file, select it and you leave.

  • Re: how to use &lt; af:validateLongRange &gt; to string

    Hi all

    I use Jdev11.1.2.3.0

    I have a field as a description of the type.i chain validation for this field set to enter characters 0-20 more than this by using < af:validateLongRange >

    < af:validateLongRange
    minimum = "1" messageDetailMinimum = "Please enter valid values" hintMinimum = "Please enter valid values" / >

    < maximum af:validateLength = "20" / >

    Here I can only record the numeric values up to 20. but I'm not able to store strings (letters) when I'm in the string values is to show the error as I said in the messageDetailMinimum.so how come off this.can any one help me please...

    Thank you

    G.Shilpa.

    This, I do not understand. You want to limit the entry for max 20 characters independently which characters. That's what the maximumLength property = "20" is for. There is no need in this case validation. However, if you must have a validation, you can use a regular expression as validator

    autoSubmit = "true" >

    messageDetailNoMatch = 'Length violation' / >

    Timo

  • How to use regexp_replace to replace strings instead of substrings in commas

    I have a table that has a column that contains the strings separated by columns. For example

    Tbl1

    ===========

    ID || Col1

    1 A-B-C, B - C, A-B-C

    I use select ID, regexp_replace (Col1, ' ([^,] +), \1', '\1') of tbl 1

    and I get

    Tbl1

    ===========

    ID || Col1

    1 A-B-C

    I'm looking for is

    Tbl1

    ===========

    ID || Col1

    1 A-B-C, B - C

    Why is my regular expression matching chain also instead of match the whole string? Thank you!

    You try to delete the duplicates?

    with tbl (ID, Col1) as long as)

    Select 1, 'A-B-C,B-C,A-B-C' of all the double union

    Select 2, 'A-B-C,B-C,A-B-C,B-C,E-F-G,E-F-G' of the double

    )

    SELECT id, listagg (str, ',') within the Group (order by lvl) as NewCol1

    de)

    Select r.*, row_number() over (partition by id, order of str from lvl) rn

    de)

    Select the level lvl, id, regexp_substr (Col1, ' [^,] +', 1, level) Str

    from tbl

    connect by level<= regexp_count(col1,="" ',')="" +="" 1="">

    ID = prior id and

    prior sys_guid() is not null - prevent connect loop using unique val

    + 0

    )

    where rn = 1

    Group by id

    ID NEWCOL1
    1 «A-B-C, B - C»
    2 'A-B-C,B-C,E-F-G '.
  • How to trace the number and string in a line (meter data via MODBUS recorder)?

    Hi all I did the log data amount using digital via modbus (RS485) meter to monitor how much and to reject what has and name operator, Machine and the part number.

    I have problem on plot number & string in one line, as shown in the image below:

    How to move this channel on a line? I enclose my vi.

    Thank you ~.

    Hi rhiesnand,

    at the moment you add 2 new lines in your table.

    The solution is to concatenate the two parts of the line to a greater range of 1 d before adding this table as a new row to your table 2D!

    Like this:

  • How to use an xquery query in the Proxy of the OSB service?

    I created an xquery query and added to the alsb. I wanted to use it in a proxy service to replace an element in $body. How can I do?

    With replace action in your workflow proxy service:
    http://download.Oracle.com/docs/CD/E13159_01/OSB/docs10gr3/eclipsehelp/tasks.html#wp1121647
    http://download.Oracle.com/docs/CD/E13159_01/OSB/docs10gr3/eclipsehelp/ui_ref.html#wp1298470

  • How to use the graph of the intensity in the iPad data dashboard.

    Hello

    I use a graph of intensity in my vi main under a project of myRIO.

    I created a shared variable of the 2D array. When I selected the variable in the ipad it does not show that he presents in the pc...

    I want to mention that I have selected the multiplier as (= 30/255) 0.117647 in labview in pc

    I use the version of labview 2015 myRIO.

    and I am using iOS 10 in my iPad

    can someone help me please

    Hi adil,.

    The graph of the intensity is not supported in the dashboard of data.

    Kind regards

    Denny

    AE Singapore

  • How to use the restoration of the system to a previous date?

    I need to restore my computer to an earlier date? How can I do!

    This gives the basic idea & info you need (I think) - http://windows.microsoft.com/en-GB/windows7/products/features/system-restore

  • How to use SMotion to move a virtual machine on two data warehouses


    Hello, I have a virtual machine that has two VD (VD1 and VD2) and they are on different data (DS1 and DS2) warehouses.  The OS is on VD1 and VD1 on DS1.  Data on VD2 and VD2 is on DS2.

    Is it possible to use SMotion to pass just VD1 of DS1 to anthers datastore (DS3) but leave VD2 on DS2?

    I tried to move, but I don't see an option to move just a VD.

    Any help will be appreciated, thanks in advance.

    I found the ADVANCED button on the section of storage of the migration wizard, see the screenshot below.  It allows you to individually select your locations of migration.

    Hope this helps someone.

  • How to use the command to move the machine to a data store in another data store in WTT(Windows Test Technology) Atlas (2.7)?

    I searched doc help WTT Atlas, just found this: "the MoveMachine command allows users to move client computers between the basins of the machine. This command assumes that the user has permissions of correction to carry out operations and generates an error if this is not the case. "

    Note: this command just explain machine displacement between the watersheds of the machine instead of the data store.

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • How to use % symbol for parameters in conditions in Discoverer

    Hi all

    In fact, I have to add four settings in that
    two param should be % (average for select all) as a default.

    That is to say that we use LIKE '%' in the query.

    the problem is when I enter a value for a parameter, it should train for this value,
    and if I need anything, I should enter the "%" symbol,

    so, for what Iam confused how to use this,

    Although I tried with a few options, it receives satisfactory results.

    someone will help me please to achieve this.

    Thank you in advance

    Published by: user10271105 on Sep 17, 2008 03:37

    Hello

    You can create a parameter and give % as default. If you set the condition to use AS and when the default is used for the parameter, then the query contains LIKE '%' and everything is selected.

    If you are using a list of values with your parameter, then you must add the '%' to your list of values so that the user can select this value.

    However, this method will not work if some values in your database contains characters of percentage, because the condition LIKE 'ABC DEF %' will return as well as ABC % DEF ABCXYZDEF.

    Unfortunately like escape syntax is not available in discoverer, so you have to invent a value that the user can enter for all, for example ALL the default value for the parameter.

    Then use a similar State to:

    question LIKE: param OR item = DECODE (: param,'* ALL *', item)

    Rod West

  • TableLayoutManager how to use?

    Hello

    I want the data in table Formate I use http://devblog.blackberry.com/2009/10/how-to-use-table-view-layout/ this link to store the data in a tabular format.

    But I am facing a problem when I add after code.

            TableLayoutManager colFMgr = new TableLayoutManager(new int[]       {           TableLayoutManager.USE_PREFERRED_SIZE,           TableLayoutManager.USE_PREFERRED_SIZE,           TableLayoutManager.USE_PREFERRED_SIZE,           TableLayoutManager.USE_PREFERRED_SIZE,           TableLayoutManager.USE_PREFERRED_SIZE       }, Manager.HORIZONTAL_SCROLL);
    
    
    

    When I type Manager I have the option to create a class, interface, and variable. here what I create?

    pls as me.

    Thank you

    AjayPatil

    Thanks to all those who relpy me. Another problem then it is actully I me errror. now I solve my problem.

    Thank you

    Ajay

Maybe you are looking for