Select exact match in LOV (revisited)

Hi all,
Regarding [url http://forums.oracle.com/forums/thread.jspa?messageID=9203960]Thread: Select exact match in LOV, which is already closed:
LOVs in ADF match the entered value using a LIKE operation. For example, let's say we have an attribute of type String with an associated LOV. When entering the value 'V', even if the value 'V' exists, the LOV will open and show values matching 'V%' ('V', 'Va', 'Vb'...).
Is there any chance to prevent the LOV opening when the exact match exists?
Thanks,
Barbara
Version
ADF Business Components 11.1.1.56.60
Java(TM) Platform 1.6.0_18
Oracle IDE 11.1.1.3.37.56.60
Edited by: Barbara Gelabert on 13-ene-2011 10:15

Hi,
There is a workaound for the above issue, i will prepare sample and publish soon. watch this thread and my blog
http://ramadf.blogspot.com
Regards
B.Ram

Similar Messages

  • Select exact match in LOV

    Hi all
    I work with LOVs and digit value in the inputText of the LOV, if the value is unique and property is autosubmit in the LOV this is selected automatically without displaying the popup, if the value has several matches, the popup LOV is displayed, i.e. if I digit the number "6" in the inputText and pressed enter, see the LOV to the values (multiple values 6,66,60,678,660 ,...) starting with 6, although the value of "6" there and could be selected. I wonder if there is a way to accomplish this, as it would improve application performance by not having the need to show the popup when you enter the correct value.
    When I digit a value in the LOV and exists, this value is selected and not display the popup.
    I hope you can help and made to understand the best way.
    thank you very much
    Atte.:
    REA

    Here are the steps:
    1) Define the LOV for the attribute in the View Object. (like the same way you would do for a select One Choice component).
    2) For the attribute, in the 'control hints', ensure that the control type is 'Input Text with list of values'. By default, it would be 'choice list'.
    3) Step 2) could be done, by while defining the LOV definition, move to the 'UI hints' tab & choose 'Default List Type' to 'Input Text with list of values'.
    4) You can use a VC from the source VO - in order to customize the search region. If not, all the attributes of the VO are shown in the search region in the pop up.
    5) Check 'Query List automatically' to populate the results - once the popup is launched.
    6) Drag and Drop the attribute in the page as 'Input Text with list of values'.
    7) set the autoSubmit="true" for the component.
    Sample:
    <af:inputListOfValues id="departmentName"
    popupTitle="Search and Select: #{bindings.DepartmentName.hints.label}"
    value="#{bindings.DepartmentName.inputValue}"
    label="#{bindings.DepartmentName.hints.label}"
    model="#{bindings.DepartmentName.listOfValuesModel}"
    required="#{bindings.DepartmentName.hints.mandatory}"
    columns="#{bindings.DepartmentName.hints.displayWidth}"
    autoSubmit="true"
    shortDesc="#{bindings.DepartmentName.hints.tooltip}">
    <f:validator binding="#{bindings.DepartmentName.validator}"/>
    </af:inputListOfValues>
    PageDef:
    <listOfValues StaticList="false" IterBinding="EmployeesIterator"
    Uses="LOV_DepartmentName" id="DepartmentName"/>
    Thanks,
    Navaneeth

  • Select parent ids that have exact match on child values (no more no less)

    I am having difficulty getting the correct results using TSQL
    I have a parent table, primary key -> Parent.Id and a child table related by Child.Parent_Id
    The child table contains keywords.
    I want to get only the parents back that have an exact match on the keywords.
    I tried the query...
    select Parent_Id from child where child.keyword in ('one' 'two', 'three') group by parent_id having count(distinct keyword = 3)
    This does not work if there are more than three .. For example a parent will be returned if it has ('one' 'two', 'three', 'four')
    What can I do?

    USE tempdb;
    GO
    DECLARE @P TABLE (PId int NOT NULL UNIQUE);
    DECLARE @C TABLE (PId int NOT NULL, keyword varchar(25) NOT NULL, UNIQUE (PId, keyword));
    INSERT INTO @P VALUES(1);
    INSERT INTO @P VALUES(2);
    INSERT INTO @P VALUES(3);
    INSERT INTO @C VALUES(1, 'one');
    INSERT INTO @C VALUES(1, 'two');
    INSERT INTO @C VALUES(1, 'three');
    INSERT INTO @C VALUES(1, 'four');
    INSERT INTO @C VALUES(2, 'one');
    INSERT INTO @C VALUES(2, 'two');
    INSERT INTO @C VALUES(2, 'three');
    INSERT INTO @C VALUES(3, 'one');
    INSERT INTO @C VALUES(3, 'two');
    SELECT
    P.PId
    FROM
    @P AS P
    INNER JOIN
    @C AS C
    ON C.PId = P.PId
    WHERE
    C.keyword in ('one', 'two', 'three')
    GROUP BY
    P.PId
    HAVING
    COUNT(DISTINCT C.keyword) = 3
    AND COUNT(DISTINCT C.keyword) = (SELECT COUNT(*) FROM @C AS C2 WHERE C2.PId = P.PId);
    WITH AggStr AS (
    SELECT
    PId,
    (SELECT CAST(',' AS varchar(MAX)) + C.keyword FROM @C AS C WHERE C.PId = P.PId ORDER BY C.keyword FOR XML PATH('')) AS c1
    FROM
    @P AS P
    SELECT
    PId
    FROM
    AggStr
    WHERE
    c1 = ',one,three,two';
    select PId from @c Child
    where child.keyword in ('one', 'two', 'three')
    and not exists
    (select 1 from @c C1 where C1.PID = Child.PID
    and C1.Keyword not in ('one','two','three'))
    group by pid having count(distinct keyword) = 3
    Looks like my original query performs as good as aggregate query.
    Premature optimization is the root of all evil in programming. (c) by Donald Knuth
    Naomi Nosonovsky, Sr. Programmer-Analyst
    My blog

  • No exact match was found. Click the item(s) that did not resolve for more options. You can also use Select button to choose External Data.

    HI,
    I have SharePoint Online 2013 environment, i have created a external content type from wcf service. I want to use this as External Data column in document library. When i look for values in content type it populates and when i click any values and adds and
    then click saves it shows the below error
    No exact match was found. Click the item(s) that
    did not resolve for more options. You can also use Select button to choose External Data
    __fkc000950056003700kc000950056003700kc000e400f2001400kc000950056003700k830035004700160027004700d20057000700020064009600870056004600:
    No Matching Items
    Please help on this.
    varinder

    I don't understand the question exactly, could you restate it.  Sorry mate, I might just be braindead.
    But, as far as the issue, it is by design.  the column is a lookup columns which essentially ties to the external data.  if that data is removed, the column on your simple list becomes invalid and any edits of the simple list item will require
    it to be changed.
    are you wanting to make the ECT read only?  that's simple enough.  you can pop open SPD and edit the ECT, then remove the C/E/D operations (create/update/delete).  That will not, however make it read-only in any other systems that access that
    external data, as I assume its not just SP or else it wouldn't be external
    Christopher Webb | MCM: SharePoint 2010 | MCSM: SharePoint Charter | MCT | http://christophermichaelwebb.com

  • Search MS Word for Exact Match

    I've got a script that opens an MS Word document, then searches through a directory for each image file (.jpg), then does a find and replace using the filename as the search string, and inserts the image in place of the text it finds. My problem is that
    it's not doing an exact match. This means for example that if it looks for image1.jpg and that text exists in the word document inserts the image in it's place (the text being a placeholder). But if mimimage1.jpg was in place before it then it would insert
    the .jpg there - not doing an exact match.
    Here's the code I've got so far:
    # Get variables from XML file
    $MyDir = Split-Path $MyInvocation.MyCommand.Definition
    # Get settings from variables.xml.
    [xml]$settings = get-content "$MyDir\variables-test.xml"
    # Assign the settings to local variables.
    $SMTP = $settings.Settings.Setting.SMTP
    $port = $settings.Settings.Setting.port
    $from = $settings.Settings.Setting.EmailFrom
    $to = $settings.Settings.Setting.EmailTo
    $subject = $settings.Settings.Setting.Subject
    $body = $settings.Settings.Setting.Body
    $savepath = $settings.Settings.Setting.SavePath
    $docfile = $settings.Settings.Setting.WordDoc
    $XMLpath = "$MyDir\variables.xml"
    [String[]]$strXML=@()
    [xml]$xml = get-content $XMLpath
    $parse_results = New-Object System.Collections.ArrayList
    add-type -AssemblyName "Microsoft.Office.Interop.Word"
    $wdunits = "Microsoft.Office.Interop.Word.wdunits" -as [type]
    $application = New-Object -comobject word.application
    $application.visible = $false
    $document = $application.documents.open($docfile)
    set-variable -name wdGoToLine -value 3 -option constant
    set-variable -name wdGoToAbsolute -value 1 -option constant
    # Create new directory
    $date = (Get-Date -format "dd-MM-yyyy")
    $newdir = $savepath + "archive" + "-" + $date
    New-Item -ItemType directory -Path $newdir
    # Search Word document for filename and insert image
    foreach($file in Get-ChildItem $savepath -Filter *.jpg)
    if ($application.Selection.Find.Text = $file)
    if ($application.Selection.Find.Execute())
    $insertfile = $savepath + $file
    $objSelection = $application.selection
    $objShape = $objSelection.InlineShapes.AddPicture($insertfile)
    $gotoline = $objSelection.GoTo($wdGoToLine, $wdGoToAbsolute,1)
    # Move spreadsheets and images to archive location and cleanup after dfm2xls.ps1 before ending script
    foreach($movexlsx in Get-ChildItem $savepath -Filter *.xlsx)
    $xlpath = $savepath + $movexlsx
    Move-Item $xlpath $newdir
    foreach($movejpg in Get-ChildItem $savepath -Filter *.jpg)
    $imgpath = $savepath + $movejpg
    Move-Item $imgpath $newdir
    # Save document then close application
    $newsave = $savepath + $date + "-report.docx"
    $document.SaveAs([ref]$newsave)
    $document.Close()
    $application.quit()
    At the moment it doesn't do an exact match but I've tried using:
    $MatchWholeWord = $True
    $MatchCase = $False
    and then
    $application.Selection.Find.Execute($MatchWholeWord, $MatchCase)
    But that stopped it from finding any matches. Can anyone help?
    Thanks in advance

    Hi AJ Mellor,
    If you want to replace the words of the .jpg file's name with the picture in word file, this script should be helpful for you to modify your script:
    Hey, Scripting Guy! How Can I Read Words in a Text File and Make Those Same Word Italic in a Word Document?
    Insert pictures in a folder into a Word document (PowerShell)
    In addition, to get the words of the file name instead of the full path name, please refer to the script below:
    $files = Get-ChildItem $savepath -Filter *.jpg
    $words = $files.basename
    foreach($word in $words){
    I hope this helps.

  • 11.1.1.4:Could not find the item selected to match the value of type Number

    Hi,
    I have a taskflow with an input parameter.
    The input parameter value is to be assigned to a list item as the default selected value.
    I have mapped the pageFlow scope parameter to set value to the list item using input page parameters defined in task flow.
    but When i Run the task flow the value does not get assigned to the drop down list and jdevloper console screen shows up the following message
    "Could not find the item selected to match the value 2 by type: oracle.jbo.domain.Number in LOV."
    But If I click the Lov to check the values it shows that value is present in the list.
    The same configurations works if the list of values is for a column with type as java.lang.String.
    Is it somethng different that is to be done for a Number field to assign value from a taskflow parameter?
    Edited by: user3067156 on Jun 25, 2011 3:34 PM

    Hi Jobinesh,
    I am assigning the default value in the task flow using input page parameters ...
    <view id="VIEW1">
    <page>/title.jsff</page>
    <input-page-parameter>
    <from-value>#{pageFlowScope.pInputTyp_Id}</from-value>
    <to-value>#{bindings.pTyp_Id1.attributeValue}</to-value>
    </input-page-parameter>
    </view id>
    It does not assign the value, if Bind variable(pTyp_Id1) NDtype and task flow input parameter(pInputTyp) class type, both are set to use type oracle.jbo.domain.Number.
    If I change both to use java.lang.String and additionally also change the VO defination the accept the bind variable of type string, it assigns the value correctly.
    Usecase:
    I have a a task flow for which has its first page a search page.
    The Search page is created using operation execute with params and dragging the query parameters on the page.
    The Query parameters are to be filled using a select one choice option and the list is bound to the master values.
    This task flow can be used inside a standalone page as a region to provide a search page
    The same task flow can be called from within another taskflow which will provide the default values for the drop down lists ..
    Since the search page is a jsff fragment i dont have a page on load handler to provide default values..
    So assiging the values using input page parameters defined in task flow view tag.
    For testing I am passing the taskflow input parameters by calling the task flow from a jspx page a region . When I configure this task flow a region in a page its asks for providing the values for the parameters
    And the same gets configured in my testpage def as
    <executables>
    <variableIterator id="variables"/>
    <taskFlow id="Flow1" taskFlowId="/WEB-INF/Flow1.xml#Flow1"
    activation="deferred"
    xmlns="http://xmlns.oracle.com/adf/controller/binding">
    <parameters>
    <parameter id="pTyp_Id" value="1207"/>
    </parameters>
    </taskFlow>
    </executables>
    Edited by: user3067156 on Jun 27, 2011 1:50 PM

  • Is there a way to promote results with exact match?

    Hi,
    Is there a way to promote (like add results block or something) results with exact match over results that match?
    (when stemming is on, so the search consider also words with morpholgy match, and sometimes display them at the top, and wWe want to put in top of the results a block of results with exact match)
    keren tsur

    HI,
    Yes you can promote the result with exact match.....
    1. Navigate to the search center
    2. Navigate to the search result setting page and click to the Query rule as per your scope.
    3. Create the new query rule depend upon your result source.
    4. Give the query rule name. Under the Query Condition-> select "Advanced Query Text Match"-> Select Option that you want form matches input->Make the Check box "Entire Query Matches Exactly".
    5. Create the promoted results and Result block as per your description.
    6. save the Query rule and apply the query rule to your search vertical.
    Regards,
    sharepoint for developer
    Basant Pandey

  • How to execute exact match & contains text search simultaneoulsy in Oracle 10g

    Hi,
    We have scenario where there are more than 50 million rows in a table with description column length as 1000 character. We have a web interface from where we generate a rule of comma separated keywords like
    "Standard", Single, Cancel, "deal"    & so on. The words in quotes needs to be checked for exact match & the one without quotes will be searched using contains.
    The problem is that we can have a rule of such a combination as large as 4000 characters of inclusion & 2000 such characters for exclusion (not to consider the description under exclusion) and this search when run on the table with millions of rows does not work using oracle regular expression, but works with smaller no. of search keywords.
    Is there a better way to do such a kind of search in Oracle or if not then outside oracle using any other tool
    Thanks,
    AP

    Please find below the table script, few insert statements along with the SP & function. Please help.
    -- Create Table
    CREATE TABLE Roomdescriptionmaster
    ID long,
    ROOMDESCRIPTION nvarchar2, --- max 1000 charaters
    Createddate datetime
    ----- Insert statements
    INSERT INTO ROOMDESCRIPTION (ID, ROOMDESCRIPTION, Createddate ) VALUES (1, 'Double Room (2 Adults + 2 Children) | FREE cancellation before Mar 16, 2014 PAY LATER All-Inclusive [ Included:10 % VAT] Meals:All meals and select beverages are included in the room rate.Cancellation:If canceled or modified up to 2 days before date of arrival,no fee will be charged.If canceled or modified later,100 percent of the first two nights will be charged.In case of no-show, the total price of the reservation will be charged. Prepayment:No deposit will be charged', sysdate)
    INSERT INTO ROOMDESCRIPTION (ID, ROOMDESCRIPTION, Createddate ) VALUES (1, 'Double or Twin Room | FREE cancellation before Feb 1, 2014 PAY LATER All-Inclusive [ Included:10 % VAT] Meals:All meals and select beverages are included in the room rate.Cancellation:If canceled or modified up to 2 days before date of arrival,no fee will be charged.If canceled or modified later,100 percent of the first two nights will be charged.In case of no-show, the total price of the reservation will be charged. Prepayment:No deposit will be charged', sysdate)
    INSERT INTO ROOMDESCRIPTION (ID, ROOMDESCRIPTION, Createddate ) VALUES (1, 'Quadruple Room (3 Adults + 1 Child) | FREE cancellation before Mar 16, 2014 PAY LATER Full board included [ Included:10 % VAT] Meals:Breakfast, lunch & dinner included.Cancellation:If canceled or modified up to 2 days before date of arrival,no fee will be charged.If canceled or modified later,100 percent of the first two nights will be charged.In case of no-show, the total price of the reservation will be charged. Prepayment:No deposit will be charged', sysdate)
    INSERT INTO ROOMDESCRIPTION (ID, ROOMDESCRIPTION, Createddate ) VALUES (1, 'Triple Room with Lateral Sea View (2 Adults + 1 Child) | FREE cancellation before Dec 6, 2013 PAY LATER All-Inclusive [ Included:10 % VAT] Meals:All meals and select beverages are included in the room rate.Cancellation:If canceled or modified up to 2 days before date of arrival,no fee will be charged.If canceled or modified later,100 percent of the first two nights will be charged.In case of no-show, the total price of the reservation will be charged. Prepayment:No deposit will be charged', sysdate)
    INSERT INTO ROOMDESCRIPTION (ID, ROOMDESCRIPTION, Createddate ) VALUES (1, 'Single Room with Lateral Sea View | FREE cancellation before Dec 6, 2013 PAY LATER All-Inclusive [ Included:10 % VAT] Meals:All meals and select beverages are included in the room rate.Cancellation:If canceled or modified up to 2 days before date of arrival,no fee will be charged.If canceled or modified later,100 percent of the first two nights will be charged.In case of no-show, the total price of the reservation will be charged. Prepayment:No deposit will be charged', sysdate)
    --SP
    CREATE OR REPLACE PROCEDURE
    SP_PGHGETROOMDESCRIPTION(v_BId                number,
                               v_DaysOfData         integer,
                               v_Incl1              nvarchar2,
                               v_Incl2              nvarchar2,
                               v_Incl3              nvarchar2,
                               v_Excl1              nvarchar2,
                               v_CurrentIndex       integer,
                               v_RecordPerPage      integer,
                               v_IndexMultiplier    integer,
                               ref_recordset        out sys_refcursor
                               ) as
    start_index        integer;
    end_index          integer;
    Incl1              nvarchar2(2000);
    Incl2              nvarchar2(2000);
    Incl3              nvarchar2(2000);
    Excl1              nvarchar2(2000);
    v_desc_utf_value   VARCHAR2(10);
    begin
    v_desc_utf_value:= 'utf8';
      if v_incl1 is null or trim(v_incl1) = '' then
         --dbms_output.put_line('include 1 is null or blank');
         Incl1 := '';
      else
         Incl1 := lower(v_Incl1);
      end if;
      if v_incl2 is null or trim(v_incl2) = '' then
         --dbms_output.put_line('include 2 is null or blank');
         Incl2 := '';
      else
         Incl2 := lower(v_Incl2);
      end if;
      if v_incl3 is null or trim(v_incl3) = '' then
         --dbms_output.put_line('include 3 is null or blank');
         Incl3 := '';
      else
         Incl3 := lower(v_Incl3);
      end if;
      if v_Excl1 is null or trim(v_Excl1) = '' then
         --dbms_output.put_line('Exclude 1 is null or blank');
         Excl1 := '';
      else
         Excl1 := lower(v_Excl1);
      end if;
       -- Old code
       --     and regexp_like(lower(ROOMDESCRIPTION), Incl1, 'i')
       --    and regexp_like(lower(ROOMDESCRIPTION), Incl2, 'i')
       --     and regexp_like(lower(ROOMDESCRIPTION), Incl3, 'i')
       --     and not regexp_like(lower(ROOMDESCRIPTION), Excl1, 'i')
    --- First call to SP
      if v_CurrentIndex = 1 then
          start_index := v_RecordPerPage * v_IndexMultiplier;
          end_index   := (v_CurrentIndex - 1 + v_IndexMultiplier) * v_RecordPerPage;
          open ref_recordset for
         select * from (
          select ROOMDESCRIPTION, Createddate,  rownum as rn
          from roomdescriptionmaster
          where BID = v_BId
          and TO_NUMBER(trunc(sysdate) - to_date(to_char(createddate, 'yyyy-mm-dd'),'yyyy-mm-dd')) <= v_DaysOfData
          and length(FN_GET_RESTRICTION(lower(ROOMDESCRIPTION),Incl1,Incl2,Incl3,Excl1,v_desc_utf_value)) > 0
          and row_num <= v_RecordPerPage * v_IndexMultiplier
          order by row_num;
      else
      --- Subsequent calls to SP using paging from UI
          start_index := (v_CurrentIndex - 1) * v_RecordPerPage + 1;
          end_index   := (v_CurrentIndex - 1 + v_IndexMultiplier) * v_RecordPerPage;
          open ref_recordset for
          select * from (
          select ROOMDESCRIPTION, Createddate,  rownum as rn
          from roomdescriptionmaster
          where BID = v_BId
          and TO_NUMBER(trunc(sysdate) - to_date(to_char(createddate, 'yyyy-mm-dd'),'yyyy-mm-dd')) <= v_DaysOfData
          and length(FN_GET_RESTRICTION(lower(ROOMDESCRIPTION),Incl1,Incl2,Incl3,Excl1,v_desc_utf_value)) > 0
          order by roomdescriptionmasterid desc
          where rn >= start_index
          and rn <= end_index
          order by rn;
      end if;
      commit;
    end SP_PGHGETROOMDESCRIPTION;
    --Function
    CREATE OR REPLACE FUNCTION FN_GET_RESTRICTION(
    v_rate_description IN NVARCHAR2,
    v_include_1 IN NVARCHAR2,
    v_include_2 IN NVARCHAR2,
    v_include_3 IN NVARCHAR2,
    v_exclude IN NVARCHAR2, v_desc_utf_value IN VARCHAR2)
      RETURN NVARCHAR2
    IS
    CURSOR include_1_cur IS
    select regexp_substr(str, '[^,]+', 1, level) str
    from (select v_include_1 str from dual)
    connect by level <= length(str)-length(replace(str,','))+1;
    CURSOR include_2_cur IS
    select regexp_substr(str, '[^,]+', 1, level) str
    from (select v_include_2 str from dual)
    connect by level <= length(str)-length(replace(str,','))+1;
    CURSOR include_3_cur IS
    select regexp_substr(str, '[^,]+', 1, level) str
    from (select v_include_3 str from dual)
    connect by level <= length(str)-length(replace(str,','))+1;
    CURSOR exclude_cur IS
    select regexp_substr(str, '[^,]+', 1, level) str
    from (select v_exclude str from dual)
    connect by level <= length(str)-length(replace(str,','))+1;
    include_1_rec include_1_cur%rowtype;
    include_2_rec include_2_cur%rowtype;
    include_3_rec include_3_cur%rowtype;
    exclude_rec exclude_cur%rowtype;
    tmp_var NVARCHAR2(200);
    tmp_var_int NUMBER;
    tmp_flag_int NUMBER;
    return_str NVARCHAR2(200);
    tmp_length NUMBER;
    tmp_length_include_1 NUMBER;
    tmp_length_include_2 NUMBER;
    tmp_length_include_3 NUMBER;
    tmp_length_exclude NUMBER;
    tmp_regex_pattern VARCHAR2(1000);
    flag_include_1_match INTEGER;
    flag_include_2_match INTEGER;
    flag_include_3_match INTEGER;
    flag_exclude_match INTEGER;
    BEGIN
      tmp_length_include_1 := nvl(length(v_include_1),0);
      tmp_length_include_2 := nvl(length(v_include_2),0);
      tmp_length_include_3 := nvl(length(v_include_3),0);
      tmp_length_exclude := nvl(length(v_exclude),0);
      flag_include_1_match := 0;
    flag_include_2_match := 0;
    flag_include_3_match := 0;
    flag_exclude_match := 0;
      IF tmp_length_include_1>0 OR tmp_length_include_2 >0
      OR tmp_length_include_3 >0 OR tmp_length_exclude >0 THEN
      IF v_desc_utf_value ='utf8' THEN
        ----------------------------------------------------- UTF 8 STARTED --------------
    -----------------------------------------   INCLUDE 1
      tmp_length := tmp_length_include_1;
      IF tmp_length > 0 THEN
      tmp_flag_int :=0;
    FOR include_1_rec in include_1_cur
    LOOP
      tmp_var := trim('' || include_1_rec.str);
      --dbms_output.put_line(tmp_var);
      tmp_regex_pattern := '[^[:alnum:]]'||tmp_var||'[^[:alnum:]]|^'||tmp_var||'$|^'||tmp_var||'[^[:alnum:]]|[^[:alnum:]]'||tmp_var||'$';
      tmp_var_int := nvl(regexp_instr(v_rate_description,tmp_regex_pattern,1,1),0);
      IF (tmp_var_int <> 0) THEN
      tmp_flag_int :=1;
      flag_include_1_match := 1;
      EXIT;
      END IF;
    END LOOP;
    ELSE
      flag_include_1_match := 1;
    END IF;
    --------------------------------------------  INCLUDE 2
    tmp_length := tmp_length_include_2;
      IF tmp_length > 0 THEN
        tmp_flag_int :=0;
    IF flag_include_1_match =1 THEN
      FOR include_2_rec in include_2_cur
    LOOP
      tmp_var := trim('' || include_2_rec.str);
    tmp_regex_pattern := '[^[:alnum:]]'||tmp_var||'[^[:alnum:]]|^'||tmp_var||'$|^'||tmp_var||'[^[:alnum:]]|[^[:alnum:]]'||tmp_var||'$';
      tmp_var_int := nvl(regexp_instr(v_rate_description,tmp_regex_pattern,1,1),0);
      IF (tmp_var_int <> 0) THEN
      tmp_flag_int :=1;
      flag_include_2_match := 1;
      EXIT;
      END IF;
    END LOOP;
    END IF;
    ELSE
      flag_include_2_match := 1;
    END IF;
    -------------------------------------------- INCLUDE 3
    tmp_length := tmp_length_include_3;
      IF tmp_length > 0 THEN
      tmp_flag_int :=0;
       IF flag_include_2_match =1 THEN
      FOR include_3_rec in include_3_cur
    LOOP
      tmp_var := trim('' || include_3_rec.str);
    tmp_regex_pattern := '[^[:alnum:]]'||tmp_var||'[^[:alnum:]]|^'||tmp_var||'$|^'||tmp_var||'[^[:alnum:]]|[^[:alnum:]]'||tmp_var||'$';
      tmp_var_int := nvl(regexp_instr(v_rate_description,tmp_regex_pattern,1,1),0);
      IF (tmp_var_int <> 0) THEN
      tmp_flag_int :=1;
      flag_include_3_match := 1;
      EXIT;
      END IF;
    END LOOP;
    END IF;
    ELSE
      flag_include_3_match := 1;
    END IF;
    -------------------------------------------- EXCLUDE
    tmp_length := tmp_length_exclude;
    IF tmp_length > 0 and flag_include_3_match =1 THEN
      FOR exclude_rec in exclude_cur
    LOOP
      tmp_var := trim('' || exclude_rec.str);
    tmp_regex_pattern := '[^[:alnum:]]'||tmp_var||'[^[:alnum:]]|^'||tmp_var||'$|^'||tmp_var||'[^[:alnum:]]|[^[:alnum:]]'||tmp_var||'$';
      tmp_var_int := nvl(regexp_instr(v_rate_description,tmp_regex_pattern,1,1),0);
      IF (tmp_var_int <> 0) THEN
      tmp_flag_int := -1;
      return_str := '';
      EXIT;
      END IF;
    END LOOP;
    END IF;
      ELSE
      ----------------------------------------------------- UTF 16 STARTED --------------
      -----------------------------------------   INCLUDE 1
      tmp_length := tmp_length_include_1;
      IF tmp_length > 0 THEN
      tmp_flag_int :=0;
      FOR include_1_rec in include_1_cur
    LOOP
      tmp_var := trim('' || include_1_rec.str);
      --dbms_output.put_line(tmp_var);
    tmp_var_int := nvl(INSTR(v_rate_description,tmp_var,1,1),0);
      IF (tmp_var_int <> 0) THEN
      tmp_flag_int :=1;
      flag_include_1_match := 1;
      EXIT;
      END IF;
    END LOOP;
    ELSE
      flag_include_1_match := 1;
    END IF;
    --------------------------------------------  INCLUDE 2
    tmp_length := tmp_length_include_2;
      IF tmp_length > 0 THEN
        tmp_flag_int :=0;
    IF flag_include_1_match =1 THEN
      FOR include_2_rec in include_2_cur
    LOOP
      tmp_var := trim('' || include_2_rec.str);
    tmp_var_int := nvl(INSTR(v_rate_description,tmp_var,1,1),0);
      IF (tmp_var_int <> 0) THEN
      tmp_flag_int :=1;
      flag_include_2_match := 1;
      EXIT;
      END IF;
    END LOOP;
    END IF;
    ELSE
      flag_include_2_match := 1;
    END IF;
    -------------------------------------------- INCLUDE 3
    tmp_length := tmp_length_include_3;
      IF tmp_length > 0 THEN
      tmp_flag_int :=0;
       IF flag_include_2_match =1 THEN
      FOR include_3_rec in include_3_cur
    LOOP
      tmp_var := trim('' || include_3_rec.str);
    tmp_var_int := nvl(INSTR(v_rate_description,tmp_var,1,1),0);
      IF (tmp_var_int <> 0) THEN
      tmp_flag_int :=1;
      flag_include_3_match := 1;
      EXIT;
      END IF;
    END LOOP;
    END IF;
    ELSE
      flag_include_3_match := 1;
    END IF;
    -------------------------------------------- EXCLUDE
    tmp_length := tmp_length_exclude;
    IF tmp_length > 0 and flag_include_3_match =1 THEN
      FOR exclude_rec in exclude_cur
    LOOP
      tmp_var := trim('' || exclude_rec.str);
      tmp_var_int := nvl(INSTR(v_rate_description,tmp_var,1,1),0);
      IF (tmp_var_int <> 0) THEN
      tmp_flag_int := -1;
      return_str := '';
      EXIT;
      END IF;
    END LOOP;
    END IF;
    END IF;
    IF tmp_flag_int = 1 THEN
    return_str := 'truely matched';
    ELSE
    return_str := '';
    END IF;
    ELSE
    return_str := '';
    END IF;
    return return_str;
    EXCEPTION
      WHEN OTHERS THEN
      --dbms_output.put_line('Exception');
        RAISE;
    END FN_GET_RESTRICTION;

  • I am wanting to exactly match two ID numbers from two differing worksheets within one work book. Once matched I am wanting to retrieve a row value from the second worksheet into the first. Any help much appreciated.

    I am wanting to exactly match two ID numbers from two worksheets within the one work book. ID numbers are non linear. Once exactly matched I wish to retrieve a corresponding row value from worksheet two and have it appear in worksheet one against the correct ID number. I have been looking at IF, VLOOKUP, and MATCH functions and suspect that what I want to do requires a combination of two or more. Any help will be greatly appreciated.
    regards Vaughanh

    Vaughan,
    Data A:D is all cells start at column A thru column D.
    There is built-in help using the menu item "View > Show Function Browser"  in the search field (top right) you can enter vlookup and you will see the detailed description.
    From this we see:
    VLOOKUP
    (search-for, columns-range, return-column, close-match)
    search-for:  The value to find. search-value can contain any value type.
    columns-range:  A range of cells. range is a reference to a single range of cells, which may contain values of any type.
    return-column:  A number that specifies the relative column number of the cell from which to return the value. return-column is a number value. The leftmost column in the range is column 1.
    close-match:  An optional value that determines whether an exact match is required.
    close match (TRUE, 1, or omitted):  If there’s no exact match, select the column with the largest top-row value that is less than the search value. Wildcards can’t be used in search-for.
    exact match (FALSE or 0):  If there’s no exact match, return an error. Wildcards can be used in search-for.
    So... the 2,0 means return the value form the same row as the lookup value but from the 2nd column of the range.  3, 0 means from the 3rd column.  the ", 0" means exact match

  • How to get exact match when working with Oracle Text?

    Hi,
    I'm running Oracle9i Database R2.
    I would like to know how do I get exact match when working with Oracle Text.
    DROP TABLE T_TEST_1;
    CREATE TABLE T_TEST_1 (text VARCHAR2(30));
    INSERT INTO T_TEST_1 VALUES('Management');
    INSERT INTO T_TEST_1 VALUES('Busines Management Practice');
    INSERT INTO T_TEST_1 VALUES('Human Resource Management');
    COMMIT;
    DROP INDEX T_TEST_1;
    CREATE INDEX T_TEST_1_IDX ON T_TEST_1(text) INDEXTYPE IS CTXSYS.CONTEXT;
    SELECT * FROM T_TEST_1 WHERE CONTAINS(text, 'Management')>0;
    The above query will return 3 rows. How do I make Oracle Text to return me only the first row - which is exact match because sometimes my users need to look for exact match term.
    Please advise.
    Regards,
    Jap.

    But I would like to utilize the Oracle Text index. Don't know your db version, but if you slightly redefine your index you can achieve this (at least on my 11g instance) :
    SQL> create table t_test_1 (text varchar2(30))
      2  /
    Table created.
    SQL> insert into t_test_1 values ('Management')
      2  /
    1 row created.
    SQL> insert into t_test_1 values ('Busines Management Practice')
      2  /
    1 row created.
    SQL> insert into t_test_1 values ('Human Resource Management')
      2  /
    1 row created.
    SQL>
    SQL> create index t_test_1_idx on t_test_1(text) indextype is ctxsys.context filter by text
      2  /
    Index created.
    SQL> set autotrace on explain
    SQL>
    SQL> select text, score (1)
      2    from t_test_1
      3   where contains (text, 'Management and sdata(text="Management")', 1) > 0
      4  /
    TEXT                             SCORE(1)
    Management                              3
    Execution Plan
    Plan hash value: 4163886076
    | Id  | Operation                   | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |              |     1 |    29 |     4   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T_TEST_1     |     1 |    29 |     4   (0)| 00:00:01 |
    |*  2 |   DOMAIN INDEX              | T_TEST_1_IDX |       |       |     4   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("CTXSYS"."CONTAINS"("TEXT",'Management and
                  sdata(text="Management")',1)>0)
    Note
       - dynamic sampling used for this statementJust read that you indeed mentioned your db version in your first post.
    Not sure though if above method is already available in 9i ...
    Message was edited by:
    michaels

  • MySql database query (exact match from a list)

    I've got a list of keywords entered into a database field
    called
    'tour_keywords' like:
    europe, austria, lakes, mountains, tyrol, alpine etc
    What I want is for results to be return IF ONLY an exact
    match is found
    in the database. The way I have it at the moment (see mySql
    query below)
    I only need to type 'tain' or 'kes' and I get results for
    'moun'tain's'
    OR 'la'kes'' :(
    Can I stop this and match only the keywords as specified in
    the database
    field.
    This is the DB query I have:
    $query_rsResultsList = sprintf("SELECT * FROM tours WHERE
    tour_keywords
    LIKE '%%%s%%' ", $colname_rsResultsList);
    Thanks
    Os.

    Michael Fesser wrote:
    > .oO(Osgood)
    >
    >
    >>I've got a list of keywords entered into a database
    field called
    >>'tour_keywords' like:
    >>
    >>europe, austria, lakes, mountains, tyrol, alpine etc
    >
    >
    > Uh ...
    >>What I want is for results to be return IF ONLY an
    exact match is found
    >>in the database. The way I have it at the moment (see
    mySql query below)
    >>I only need to type 'tain' or 'kes' and I get results
    for 'moun'tain's'
    >>OR 'la'kes'' :(
    >
    >
    > What about a different table design?
    Yeah nice thought. I only have a little to no knowledge of
    working with
    one table, let alone two or three.
    Your current approach is not only
    > bad in terms of normalization, it's also very
    inefficient, since the DB
    > can't use any indexes when performing a search. Full
    table scans are
    > expensive.
    Humm why can't mySql just search a field containing multiple
    words for a
    particular matching word with a simple query.....maybe that's
    what's
    inefficient. Granted, I'm totally inefficient as well
    (unfortunately I
    was born that way) but two inefficients dont make an
    efficient ;)
    > Since this is a typical m:n relation (many to many), I
    would use three
    > tables: one for the main tour data, one for the keywords
    and a third one
    > to connect these:
    >
    > tours
    > -----
    > tourId INT UNSIGNED
    > ...
    > PRIMARY KEY (tourId)
    >
    > keywords
    > --------
    > keywordId INT UNSIGNED
    > keyword CHAR(20)
    > PRINARY KEY (keywordId)
    >
    > tourKeywords
    > ------------
    > tourId INT UNSIGNED (FOREIGN KEY on tours.tourId)
    > keywordId INT UNSIGNED (FOREIGN KEY on
    keywords.keywordId)
    > PRIMARY KEY (tourId, keywordId)
    >
    > This makes it very easy to insert new keywords and to
    assign as many
    > keywords as necessary to a particular tour. In addition
    searching for
    > all tours matching one or even multiple(!) keywords is
    very efficient.
    > Try that with your current design.
    Here's wishing lol.
    >>Can I stop this and match only the keywords as
    specified in the database
    >>field.
    >>
    >>This is the DB query I have:
    >>
    >>$query_rsResultsList = sprintf("SELECT * FROM tours
    WHERE tour_keywords
    >>LIKE '%%%s%%' ", $colname_rsResultsList);
    >
    >
    > In the example above the search query would look like
    >
    > SELECT ...
    > FROM tours t
    > INNER JOIN tourKeywords USING(tourId)
    > INNER JOIN keywords USING(keywordId)
    > WHERE keyword = 'mountains'
    >
    > or for multiple keywords:
    >
    > ...
    > WHERE keyword IN ('mountains', 'lakes')
    > GROUP BY t.tourId
    Damn.... stop messing with my head.
    I'm sure youre 100% correct but I'm a long way off the pace
    when it
    comes to database structure.

  • Does exact match has priority over extension mapping?

    Hi, i'm using extension mapping in my web application. So one
    servlet is responsible for all requests with extension 'do'.
    Now i would like to have one special request served by another
    servlet. What's the best way to implement this? I'm thinking
    about setting up an exact match mapping for the special request
    and an extension mapping for the rest. There's only one thing
    i worry about: if i use the 'do' extension in my special request
    (for consistency reasons), which servlet will handle this request?
    Thanks in advance for your comments.
    Markus

    A exact match on path will override the extension mappng. Here's the rules from the servlet 2.3 spec (also contains examples)..
    1. The container will try to find an exact match of the path of the request to the
    path of the servlet. A successful match selects the servlet.
    2. The container will recursively try to match the longest path-prefix: This is done
    by stepping down the path tree a directory at a time, using the �/� character as
    a path separator. The longest match determines the servlet selected.
    3. If the last segment in the URL path contains an extension (e.g. .jsp), the servlet
    container will try to match a servlet that handles requests for the extension.
    An extension is defined as the part of the last segment after the last �.� character.
    4. If neither of the previous three rules result in a servlet match, the container will
    attempt to serve content appropriate for the resource requested. If a "default"
    servlet is defined for the application, it will be used.
    The container must use case-sensitive string comparisons for matching.

  • WARNING: ADFv: Could not find selected item matching value ...

    Using Windows JDev 11.1; I have an entity object with an attribute which has a LOV configured to supply a select-one-choice render. The LOV query requires that a bind variable be supplied. When creating a new record in the entity via the VO, I can use the ViewImpl to create a new row, retrieve the RowSet which corresponds to the attribute LOV query, set the named where clause parameter, and I'm away. When updating however, I'm getting the following error reported:
    09/12/2009 2:44:04 PM oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding getInputValue
    WARNING: ADFv: Could not find selected item matching value EMPLOYER of type: java.lang.String in the list-of-values.
    I can't supply the bind variable value before the row is instantiated (and presumably populated with the current value/key) because the View Accessor RowSet is only accessible via the RowImpl. If after the query has executed, I apply the bind variable value, re-execute the RowSet query, I can see that it's populated, and I can create a RowSetIterator to loop through the LOV RowSet and confirm that the key/value is there. I can even setCurrentRow on the RowSet but I still find that the above error appears in the serve log output seemingly after all this code executes.
    So my question is what is the technique for supplying bind variables to attribute LOV View Accessors as part of an underlying EO object query.
    In the run-time, the list items appear unpopulated (current value and list items). If I reload the page, it all comes up fine, which could tend to suggest that a PPR event might fix me up, but I would prefer to know how this should be done.
    Thanks in advance.
    Edited by: robli on Dec 9, 2009 9:01 PM

    Hi,
    Is your issue resolved. I'm facing similar issue. I have created a viewaAccessors in EO, associated these to ViewObject attributes as List of Values.
    I created the table in UI using the ViewObject.
    I see those as selectOneChoice but not values (Empty list).
    If I create new record in the table by CreateInsert. table now shows the ListOfvalues.
    any Idea what am I missing.
    Thanks,
    Satya
    Edited by: stammine on Mar 2, 2010 4:09 PM

  • Query to display the exact match product at top or increase the nearness

    Hello All,
    I am using the iStore search and it is returning results for Part Number and Description search. If I am searching a particular Part Number , it is displaying the particular product and its related products. I need the exact matched product in the first row (topmost).
    When I checked the back-end query, It is using contains for powerful search.
    How can I display the exact match product at top or increase the nearness in search.
    Please help.
    I have seen a similar thread in the forum.
    Contains: exactly match
    Thanks in advance,
    Muhammed Aslam
    Edited by: tpmuhammedaslam on Jan 10, 2013 3:48 AM

    Hello Muhammed Aslam,
    If fuzzy search is enabled, then cannot search by part number.
    The seeded query for iStore product search is based on the description as follows:
    Product Search (Section Search - R12)
    select * from
    (select T.*, RowNum as row_num
    from (select inv_item_id INVENTORY_ITEM_ID
    ,description DESCRIPTION
    ,0 CATEGORY_ID
    ,nearness NEARNESS
    ,concatenated_segments CONCATENATED_SEGMENTS
    ,primary_uom_code PRIMARY_UOM_CODE
    ,primary_unit_of_measure PRIMARY_UNIT_OF_MEASURE
    from (SELECT * FROM (select /*+ FIRST_ROWS leading(i) INDEX (x,IBE_SECTION_SEARCH_U1) */
    distinct i.inventory_item_id, i.description, 0
    ,x.inventory_item_id inv_item_id, score(100) nearness
    ,mtl_system_items_b_kfv.concatenated_segments,
    mtl_system_items_b_kfv.primary_uom_code,
    mtl_system_items_b_kfv.primary_unit_of_measure
    from ibe_ct_imedia_search i,ibe_section_search x
    ,mtl_system_items_b_kfv
    where contains (i.indexed_search, :1 , 100) > 0
    and i.language = userenv('LANG')
    and i.organization_id = :2
    and i.web_status='PUBLISHED'
    and x.inventory_item_id = i.inventory_item_id
    and i.inventory_item_id = mtl_system_items_b_kfv.inventory_item_id
    and i.organization_id = mtl_system_items_b_kfv.organization_id
    and x.minisite_id = :4
    and x.organization_id =:5
    order by nearness desc ) WHERE rownum < :6
    ))T
    where rownum where row_num >= :8
    Product Search (Category Search - R12)
    select * from
    (select T.*, RowNum as row_num
    from (select inventory_item_id INVENTORY_ITEM_ID
    ,description DESCRIPTION
    ,category_id CATEGORY_ID
    ,nearness NEARNESS
    ,concatenated_segments CONCATENATED_SEGMENTS
    ,primary_uom_code PRIMARY_UOM_CODE
    ,primary_unit_of_measure PRIMARY_UNIT_OF_MEASURE
    from (select i.inventory_item_id, i.description, i.category_id
    ,score(100) nearness
    ,mtl_system_items_b_kfv.concatenated_segments
    ,mtl_system_items_b_kfv.primary_uom_code
    ,mtl_system_items_b_kfv.primary_unit_of_measure
    from ibe_ct_imedia_search i,
    mtl_system_items_b_kfv
    where contains (i.indexed_search, :1 , 100) > 0
    and i.language = userenv('LANG')
    and i.web_status='PUBLISHED'
    and i.organization_id = :3
    and exists (select 1
    from ibe_dsp_section_items s,ibe_dsp_msite_sct_items b
    where s.section_item_id = b.section_item_id
    and b.mini_site_id = :4
    and s.inventory_item_id = i.inventory_item_id
    and (s.end_date_active > sysdate or s.end_date_active is null)
    and s.start_date_active < sysdate)
    and rownum < :5
    and i.inventory_item_id = mtl_system_items_b_kfv.inventory_item_id
    and i.organization_id = mtl_system_items_b_kfv.organization_id
    order by nearness desc ))T
    where rownum where row_num >= :7
    Regards,
    Debbie

  • LOV opens pop window when we pass exact value to LOV

    HI Team,
    I have 2 LOV's LOV1 and LOv2, Lov2 is dependent on LOV1 and my issue is whenever i am entering an value in LOV1 LOV event (pageContext.isLovEvent()) is not capturing in fact its not coming neither Process Form request nor Process request of the CO.
    so to capture that i created one more CO at LOV Region and now its capturing the LOV event(pageContext.isLovEvent()) but if i pass the exact value to LOV1 still pops up the search panel window with result as value entered in LOV but business dont want to select from pop window as they have entered a exact value it should not opne the pop window.
    as the pop window is comin because of the New CO.
    Can you please help me how to resolve either capture the evnet without CO at LOV region or if i CO at LOV region how to avoid pop window if i eneter a exact value in LOV..
    regards,
    Mushtaq.

    Hi,
    You need to attach a partial event on poplist and there you can write logic to fetch values and populate valid values in the field. As when we assign values to LOV it doesn't fire any event so you have have to fetch values you supposed to populate and then assign it to fields in table.
    The value of poplist can be passed as parameter to event or you can row reference.
    Regards,
    Reetesh Sharma

Maybe you are looking for