Search with multiple criteria

I have searched high and low on the internet o find a way to
do a search through multple fields but the more I lookthe more i
get confused. here is the problem. i want to do a search where the
user can input a data element and select the matching type and
display he results.below is the code that i have for my search
page, but I am confused about the more important parts of the fom -
the actual search variables.
If you look t the code below you see that I have a test field
named "recordID" and a drop down list named "select".
I want to dispay the results in which 'recordID' looks in
table thatis equal to 'select'.
an example of what I want is at the following link.
http://www.phpscriptsearch.com/

DizzDizzy wrote:
> I went to
http://www.webassist.com/professional/products/productdetails=
=2Easp?PID=3D117&CouponID=3Dss2008&RID=3D590&WAAID=3D92
> but i could not find the solution there
Hi Dizz:
Under the banner you'll find links for Overview, Features,
System=20
Requirements, Support. When you click on the Features link,
the MooFX=20
Accordian javascript class runs to update the content on the
page. The=20
bullet points are clickable to similarly update the content
on the page. =
Click on the bullet point "Pro search and sort enhancements"
and read=20
the paragraph at the bottom under the screen shots:
Sophisticated search capabilities
DataAssist integrates the advanced search functionality
previously=20
available in Database Search. Now you can combine advanced
Google-style=20
keyword searches (across multiple database columns) with
price, date or=20
number ranges =96 all without coding.
Please take a look at the feature tour:
http://www.webassist.com/professional/products/featuretour/media_117.asp
As for the Prof's requirements, the form submits two values,
a recordID=20
and a selection to either search by company or by store
number.
If Prof has a table named company and another named store
number, the=20
way you'd search these tables would be to have another table
that=20
contains the selectcategories with a column containing the
values=20
"company" and "storeNumber" along with ID columns that relate
to a=20
categoryID column in the companies table and the storeNumber
column in=20
the Stores table. Using this relationship Prof can create a
reccordset=20
on his results page that returns the values using an INNER
JOIN to=20
combine the tables in the recordset. Similarly by
constructing the=20
relationships properly as to his records (let's say he's
searching 45RPM =
singles - anybody remember those thingies?) His company table
can have=20
an ID column that references his product table where a
companyID is=20
stored. Again, a JOIN statement is used to include the
product=20
information, including the ProductID in the Recordset.
Similarly for the =
Stores table, again, the Products table has a column that
identifies the =
store that carries that productID. If more than one store
carries the=20
product, the column should be a storesID column that
references a=20
ProductStores table which references the stores that carry
the product=20
by a common ID. Again, using the JOIN (this recordset query
would get=20
complex) the necessary data can be returned.
The DataAssist Search Server Behavior applies a sophisticated
WHERE=20
clause to the recordset. so that the requested records can be
returned=20
to the page. Prof is not needing a tool to build database
management, so =
I can see his point... but if this is something you do
regularly,=20
DataAssist will pay for itself over and over in time saved.
And WebAssist is conducting a 50% off sale through next
Friday, so it's=20
a good time to get on board. Here's a link to the discount
page for all=20
the products:
http://www.webassist.com/professional/products/productresults.asp?CouponI=
D=3Dss2008&RID=3D590&WAAID=3D92=20
enthusiastically,
mark haynes.

Similar Messages

  • How to create a search with multiple criteria

    Hi
    I've a table that contain staff information. (name, dept. position, ext, email...etc)
    I've created a search page that allow the user to search any field. The result should appear in the same page
    first i've created the form:
    enter staff First_Name:
    enter Dept. :
    select position:
    submit button
    Then I've created the record set that select all the feilds from the table, now i need a help in the criteria, This is what I used:
    SELECT *
    FROM tblstaff
    WHERE First_Name LIKE %colname% AND Dept = coldept
    for both colname and coldept
    default = 1
    runtime value = $HTTP_POST_VARS['First_Name']    -    $HTTP_POST_VARS['Dept']
    It seems to work fine when i enter all the values in the search form. but what if i left some fields empty? In other word how can I add (All in the drop down menu and accept empty value for the text search)??
    can anyone help me?

    The simplest way to do this is to add a wildcard character to the end of coldept and make the field optional.
    SELECT *
    FROM tblstaff
    WHERE First_Name LIKE %colname% AND Dept LIKE coldept%
    If the department field is left empty, it will match all departments.
    By the way, you should not be using $HTTP_POST_VARS or $HTTP_GET_VARS. It's obsolete code, and will break on a modern installation of PHP. Use $_POST and $_GET instead.

  • How to search with multiple constraints in the new java API?

    I'm having a problem using the new MDM API to do searches with multiple constraints.  Here are the classes I'm trying to use, and the scenario I'm trying to implement:
    Classes:
    SearchItem: Interface
    SearchGroup: implements SearchItem, empty constructor,
                 addSearchItem (requires SearchDimension and SearchConstraint, or just a SearchItem),
                 setComparisonOperator
    SearchParameter: implements SearchItem, constructor requires SearchDimension and SearchConstraint objects
    Search: extends SearchGroup, constructor requires TableId object
    RetrieveLimitedRecordsCommand: setSearch method requires Search object
    FieldDimension: constructor requires FieldId object or FieldIds[] fieldPath
    TextSearchConstraint: constructor requires string value and int comparisonOperator(enum)
    BooleanSearchConstraint: constructor requires boolean value
    Scenario:
    Okay, so say we have a main table, Products.  We want to search the table for the following:
    field IsActive = true
    field ProductColor = red or blue or green
    So the question is how to build this search with the above classes?  Everything I've tried so far results in the following error:
    Exception in thread "main" java.lang.UnsupportedOperationException: Search group nesting is currently not supported.
         at com.sap.mdm.search.SearchGroup.addSearchItem(Unknown Source)
    I can do just the ProductColor search like this:
    Search mySearch = new Search(<Products TableId>);
    mySearch.setComparisonOperator(Search.OR_OPERATOR);
    FieldDimension myColorFieldDim = new FieldDimension(<ProductColor FieldId>);
    TextSearchConstraint myTextConRed = new TextSearchConstraint("red",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConBlue = new TextSearchConstraint("blue",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConGreen = new TextSearchConstraint("green",TextSearchConstraint.EQUALS);
    mySearch.addSearchItem(myColorFieldDim,myTextConRed);
    mySearch.addSearchItem(myColorFieldDim,myTextConBlue);
    mySearch.addSearchItem(myColorFieldDim,myTextConGreen);
    the question is how do I add the AND of the BooleanSearchConstraint?
    FieldDimension myActiveFieldDim = new FieldDimension(<IsActive FieldId>);
    BooleanSearchConstraint myBoolCon = new BooleanSearchConstraint(true);
    I can't just add it to mySearch because mySearch is using OR operator, so it would return ALL of the Products records that match IsActive = true.  I tried creating a higher level Search object like this:
    Search topSearch = new Search(<Products TableId>);
    topSearch.setComparisonOperator(Search.AND_OPERATOR);
    topSearch.addSearchItem(mySearch);
    topSearch.addSearchItem(myActiveFieldDim,myBoolCon);
    But when I do this I get the above "Search group nesting is currently not supported" error.  Does that mean this kind of search cannot be done with the new MDM API?

    I'm actually testing a pre-release of SP05 right now, and it still is not functional.  The best that can be done is to use a PickListSearchConstraint to act as an OR within a field.  But PickList is limited to lookup Id values, text attribute values, numeric attribute values and coupled attribute values.  It works for me in some cases where I have lookup Id values, but not in other cases where the users want to search on multiple text values within a single field.

  • Counting rows with multiple criteria

    I know this is a silly beginner question, but is there an easy way to count the number of rows in a table which match criteria based on different columns (sort of a countif with multiple criteria). For example, if Column A in a table has "All, Some, None" responses and Column B has "Main, Off" responses, is there an easy way to count the number of rows in which Column A has All and Column B has Off?

    Neondiet wrote:
    From an intellectual and philosophical view I agree with you. But from a practical view what I really want to do is just use one application for my spreadsheet tasks, not jump back and forth because one sheet I share with MS Windows users, and another with Numbers users, and another with OS X users who don't have Numbers or Excel but do have NeoOffice. Maybe I have to settle for that though.
    Yeah... this kind of situation stinks. Its like needing to writing software that will run on both Macs and PCs.
    Anyway, I've followed the advise in this forum and resorted to using a hidden column with concatenated values to solve my own problem, though it does seem like a bit of a hack compared to managing a single formula in a single cell. Horses for courses I suppose.
    jaxjason has posted a very elegant pivot table like solution that utilizes this technique. See http://www.numberstemplates.com/forums/showthread.php?t=36
    Btw, from what I've read on the net to date, SUM (in Excel) with an array formula answers the original authors problem of counting occurrences of values, not SUMPRODUCT; which I believe sums up the contents of cells in a range, if cells in other ranges match specific criteria.
    Yes, if you use the '*' (as indicated above) then SUM() is sufficient though SUMPRODUCT() will work as it degenerates to SUM when there is only one argument. If you use two arrays as arguments (like: = SUMPRODUCT((A1:A4="All"), (B1:B4="Off")), then SUMPRODUCT() is necessary. Here's my understanding of how it works (I hope your able to follow my abuse of algebraic techniques):
    =SUM((A1:A4="All") * (B1:B4="Off"))
    expanding the array expressions...
    =SUM((A1="All", A2="All", A3="All", A4="All") * (B1="Off", B2="Off", B3="Off", B4="Off"))
    at this point Excel computes the equality expressions, for example...
    =SUM((TRUE, FALSE, TRUE, FALSE) * (TRUE, TRUE, FALSE, FALSE))
    expanding the array multiplication...
    =SUM((TRUE * TRUE, FALSE * TRUE, TRUE * FALSE, FALSE * FALSE))
    Excel, apparently, then, when forced to multiply Boolean values, maps TRUE -> 1 and FALSE -> 0...
    =SUM((1 * 1, 0 * 1, 1 * 0, 0 * 0))
    performing the multiplications...
    =SUM((1, 0, 0, 0))
    summing...
    =1 + 0 + 0 + 0
    resulting...
    =1
    I'm afraid, now, if I continue any further, Yvan will chastise me.

  • SP2013: Scaling search with multiple app server

    Hi Team,
    I am scaling a new SP environment with multiple App Server.
    I have used AutoSPINstaller to install SP2013 and Search. My search components are spread across all servers. All Search components on all servers and I have a blank publishing site as part of my content source.
    My issue is when i start full/Incremental crawl. It keeps on crawling for the whole day and do not produce any crawl error neither it stops. We waited for even 2 das but the crawl kept on going on.
    Any help will be really appreciated.
    Thanks Ba$va

    Hi Basva ,
    Follow these steps (one at the time) to reset the Content Source crawl:
    Start -> Run -> Services.msc -> Restart the “SharePoint Server Search 15”.
    Make sure  the Application Server Administration Service Timer Job working .
    Navigate to Central Administration-> Manage service application->
    Search Service Application,
    Reset Index and see if that fixes the problems.
    Go into the Services.msc  on each server and change the "RECOVERY" method of the “SharePoint Server Search 15” from "FIRST FAILURE"  to "TAKE NO ACTION" so that the service did not restart before
    all the servers had their "SharePoint Server Search 14" stopped.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Sharepoint search with multiple managed metadata terms

    How do we search multiple managed metadata terms programmatically? I tried the following but did not get any results. The below url does not yield any results.
    http://app-0efff1c35fb5bc.xxxxxxx.com/sites/test/webpart/_api/search/query?querytext=%27owstaxIdDocumentx0020Type:Checklist;Intel%27&selectproperties=%27Path,Title,Author,LastModifiedTime&rowlimit=500&trimduplicates=false&enablequeryrules=false
    owstaxIdDocumentx0020Type:Checklist;Intel
    The results exist when the querytext is changed to owstaxIdDocumentx0020Type:Checklist. How do we perform an "AND" operation with multiple terms?
    V

    Have you tried:
    owstaxIdDocumentx0020Type:Checklist AND owstaxIdDocumentx0020Type:Intel
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Search with multiple values in only one field

    Hello there,
    I have this query to get the results when the user make a search query:
    select * from (
    select
    "ID",
    "ID" ID_DISPLAY,
    "SHIFT_DATE",
    "SHIFT",
    "OFFENSE_ID",
    "DESCRIPTION",
    "ANALYST",
    "STATUS",
    "SUBSTATUS"
    from "#OWNER#"."IDSIEM_OFFENSES")
    where
    OFFENSE_ID IN(:P223_OFFENSES) AND
    instr(upper("DESCRIPTION"),upper(nvl(:P223_DESCRIPTION,"DESCRIPTION"))) > 0
    AND
    instr(upper("SHIFT"),upper(nvl(:P223_SHIFT,"SHIFT"))) > 0
    AND
    instr(upper("SUBSTATUS"),upper(nvl(:P223_SUBSTATUS,"SUBSTATUS"))) > 0
    AND
    instr(upper("ANALYST"),upper(nvl(:P223_ANALYST,"ANALYST"))) > 0
    AND
    instr(upper("SHIFT_DATE"),upper(nvl(:P223_SHIFTDATE,"SHIFT_DATE"))) > 0
    AND
    instr(upper("STATUS"),upper(nvl(:P223_STATUS,"STATUS"))) > 0
    ORDER BY OFFENSE_ID DESC
    The thing that I want to do is to put multiple values on the field P223_OFFENSES when I search. For example an offense is a number, so I would like to put in the search field 1111, 3333, 4444, 5555 and the report shows me those 4 offenses in the report. The search operation works only when I put only 1 offenses, but when I put more than 1 separated by comma, it shows me this error: report error:ORA-01722: invalid number. That's why because is a number and the comma character is not allowed, how can I achieve this? Thank you in advance.
    Regards, Bernardo

    Try this one please
    select *
      from (select "ID",
                   "ID" ID_DISPLAY,
                   "SHIFT_DATE",
                   "SHIFT",
                   "OFFENSE_ID",
                   "DESCRIPTION",
                   "ANALYST",
                   "STATUS",
                   "SUBSTATUS"
              from "#OWNER#"."IDSIEM_OFFENSES")
    where (instr(upper("DESCRIPTION"),
                  upper(nvl(:P223_DESCRIPTION, "DESCRIPTION"))) > 0)
       AND (instr(upper("SHIFT"), upper(nvl(:P223_SHIFT, "SHIFT"))) > 0)
       AND (instr(upper("SUBSTATUS"), upper(nvl(:P223_SUBSTATUS, "SUBSTATUS"))) > 0)
       AND (instr(upper("ANALYST"), upper(nvl(:P223_ANALYST, "ANALYST"))) > 0)
       AND (instr(upper("SHIFT_DATE"),
                  upper(nvl(:P223_SHIFTDATE, "SHIFT_DATE"))) > 0)
       AND (instr(upper("STATUS"), upper(nvl(:P223_STATUS, "STATUS"))) > 0)
       AND regexp_like(offense_id,'^('||
                       regexp_replace(regexp_replace(:P233_OFFENSES,'[[:space:]]'),
                                      '|')||')$','i')
    What I am trying to achieve is this
    *** I expect your user to put in the values separated by commas like 27823, 27815, 27834 ****
    1. from the input the user gives back via :P233_OFFENSES, remove SPACES.
    2. Replace all "," with "|"
    3. do a regexp_like search by boxing in the input values with a "^" and "$" so that it does not select values like 278157  which contains the value you searched for viz. 27815
    You can better understand this if you try this query out
    with q1 as
    ( select 1 as id, 27823 as offense_id from dual
      union
      select 2 as id,  27815 as offense_id from dual
      union
      select 3 as id  ,27834 as offense_id from dual
      union
      select 11 as id, 227823 as offense_id from dual
      union
      select 12 as id,  278157 as offense_id from dual
      union
      select 13 as id , 278347 as offense_id from dual
      union
      select 21 as id, 278233 as offense_id from dual
      union
      select 22 as id,  278156 as offense_id from dual
      union
      select 23 as id  ,627834 as offense_id from dual ),
      q2 as (
    select regexp_replace(regexp_replace('27823, 27815, 27834','[[:space:]]'), ',','|') as P233_OFFENSES from dual )
    select * from q1 q, q2 g
       where regexp_like(q.offense_id , '^('||P233_OFFENSES||')$','i') ;
    This should return only the first 3 rows

  • File Search and multiple criteria?

    I there a way to have more than one search criteria, ie: name... contains.. AND kind...is?
    Thanks

    Sorry, no.
    If you have ARD 3 you can use the spotlight search on Tiger machines which allows multiple searching criteria.

  • UME user search with multiple search fields (AND / OR search)

    Hi,
    I'm struggling with a UME user search problem. I have multiple search fields: lastname, firstname, department
    Searching in this fields is working with the default IPrincipalSearchFilter.SEARCHMETHOD_AND (default)
    <a href="http://help.sap.com/javadocs/NW04/current/um/com/sap/security/api/IPrincipalSearchFilter.html#setSearchMethod(int)">JavaDocs SearchMethod_AND</a>
    Now I would like to add an additional search field for searching in telephone, cellphone as well. BUT searching for a phone number with searching for one of the other fields should not be a AND search. Is this possible?
    Here is the actual non-working code:
         Vector retVector = new Vector();
         //get Userdata with IUserFactory
         IResourceFactory resourceFactory = ResourceFactory.getInstance();
         IURLGeneratorService urlGen = (IURLGeneratorService)resourceFactory.getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);
         IUserFactory userFac = UMFactory.getUserFactory();                    
         IUserSearchFilter srcFilter = null;          
         try
              srcFilter = userFac.getUserSearchFilter();
         } catch (UMException e)
              // TODO Auto-generated catch block
              e.printStackTrace();
         if(lastName.length() > 0)
              srcFilter.setLastName(lastName + "*",ISearchAttribute.LIKE_OPERATOR, false);
         if(firstName.length() > 0)
              srcFilter.setFirstName(firstName + "*",ISearchAttribute.LIKE_OPERATOR, false);
         if(department.length() > 0)
              srcFilter.setDepartment(department + "*", ISearchAttribute.LIKE_OPERATOR, false);
    //Here I need help!!!!!!! Please advice!!!
         if(telephone.length() > 0)
              srcFilter.setTelephone("*" + telephone, ISearchAttribute.LIKE_OPERATOR, false);
              srcFilter.setCellPhone("*" + telephone, ISearchAttribute.LIKE_OPERATOR, false);
         //if(mobil.length() > 0)
         //     srcFilter.setCellPhone("*" + mobil, ISearchAttribute.LIKE_OPERATOR, false);
         //Set maxium value for Result and thus limit the static variable SIZE_LIMIT_EXCEEDED
         //This method can only be used, if only one search attribute is specified -> thanks SAP
         if(srcFilter.getElementSize() <= 1)
              srcFilter.setMaxSearchResultSize(300);
         ISearchResult srcResult = null;
         try
              srcResult = userFac.searchUsers(srcFilter);
         } catch (UMException e1)
              // TODO Auto-generated catch block
              e1.printStackTrace();
    Thanks for any help...
    Stefan

    Hello,
    I could still need some help. Is there no one who could give me a tip? Could I explain my problem clearly enough or do you need some more information about my problem?
    Or is the search topic with searchFilter not a very common used thing?
    Is there a possibility to do a search in the received search result? Can anyone explain how this would work?
    Any ideas are welcome.
    Regards,
    Stefan

  • How to do search with multiple texts across documents and rename the file with found text?

    Hello:
    I'm trying to do the batch search across the multiple documents and rename the file (or save as) after the found word?
    In example:
    I have many unique texts and would want to search across the multiple documents.
    If a document is found with that unique text then, the document is either renamed or save as with that unique text. 
    So, I could know what unique text that file holds.
    How do I do that?
    Let me know.
    Thanks

    Welcome to the forum!
    When you want to post a block of code, you can enclose it with the mark ups { code }
    That is the key word code surrounded by curly brackets, but without the spaces
    You seem to be running a very old (and unsupported release of the database)
    7.3 has not been a current release for about 10 years.
    It's probably been that long since I've used this technique, but i think it should work.
    You should consider welcoming your system to the 21st century by upgrading to a supported release ;-)
    If you used split to chop up your export file, use cat or dd to reassemble it.
    So, something like this:
    mknod bk.dmp p
    cat xaa xab xac xad xae xaf xag xah xai > bk.dmp &
    imp SYSTEM/$PASSWD parfile=imp_bk.parfile
    rm bk.dmp
    $ cat imp_bk.parfile
    file=bk.dmp
    log=imp.log
    full=y
    buffer=1048576
    ignore=y
    commit=y let us know if still have problems.
    Good Luck!

  • Comparision of a row with multiple criteria

    Hi All,
    I have below source table which gives me CUTSOMER_ID, FIRST_NAME, LAST_NAME, DOB, ZIPCODE and D_ID. Now i need to compare it with target, which gives me same columns. below are my comparision criteria.
    1. Compare CUSTOMER_ID, if it matches with any of the target CUSTOMER_ID mark the row with F_FLG = M
    2. If CUSTOMER_ID does not match, then compare the row with target based on compbination of (FIRST_NAME, LAST_NAME, DOB and ZIPCODE). If this combination of columns matches with any of the row from target, then marked row with F_FLG = M
    3. If CUSTOMER_ID and combination of (FIRST_NAME, LAST_NAME, DOB and ZIPCODE) column does not match with any of the target row, the use another set of column. compare the row with target based on compabination of (FIST_NAME, LAST_NAME, D_ID). If this combinatio of column matches with ay of the row from target, then marked row with F_FLG = M
    4. If any of the above criteria does not match, then mark the row with F_FLG = N
    CUSTOMER_ID     FIRST_NAME     LAST_NAME     DOB          ZIPCODE          D_ID
    101          GEORGE          MAC          15-APRIL-2009     12345          23456
    102          MICLE          DON          10-MARCH-1980     45678          29087
    103          VIJAG          UJIK          01-JAN-1950     67890          27689
    104          BONY          PANDA          03-MAY-1961     12345          27878These combinations should be performed once at a time. If it satisfies the first criteria, we do not need to check for remaining 3. If it does not match with 1 then perform 2 if matches flag the row and if not, go for 3rd criteria. if matches them mark with M else N
    Below is the Target rows.
    CUSTOMER_ID     FIRST_NAME     LAST_NAME     DOB          ZIPCODE          D_ID
    101          ADA          MICO          15-APRIL-2009     12345          23456
    999          MICLE          DON          10-MARCH-1980     45678          23567
    888          VIJAG          UJIK          01-APR-1999     89897          27689
    777          AAA          BBB          03-MAY-1961     87687          12345Here,
    for 1st row, CUSTOMER_ID matches with source and target, flag the row with valye = M
    for 2nd row, CUSTOMER_ID (102) does not match with Target. but combination of (FIRST_NAME, LAST_NAME, DOB and ZIPCODE) matches, flag the row with value = M
    for 3rd row, CUSTOMER_ID (103) and combination of (FIRST_NAME, LAST_NAME, DOB and ZIPCODE) does not match, but combination of (FIRST_NAME, LAST_NAME and D_ID) matches, flag the row with value = M
    for 4th row, none of the combination matches with Target, flag the row with value = N
    Output should be
    CUSTOMER_ID     FIRST_NAME     LAST_NAME     DOB          ZIPCODE          D_ID     F_FLG
    101          GEORGE          MAC          15-APRIL-2009     12345          23456     M
    102          MICLE          DON          10-MARCH-1980     45678          29087     M
    103          VIJAG          UJIK          01-JAN-1950     67890          27689     M
    104          BONY          PANDA          03-MAY-1961     12345          27878     N

    Try this one
    WITH data1 AS
         (SELECT 101 customer_id, 'GEORGE' first_name, 'MAC' last_name, TO_DATE ('15-APRIL-2009', 'dd-mon-yyyy') dob,
                 12345 zipcode, 23456 d_id
            FROM DUAL
          UNION ALL
          SELECT 102 customer_id, 'MICLE' first_name, 'DON' last_name, TO_DATE ('10-MARCH-1980', 'dd-mon-yyyy') dob,
                 45678 zipcode, 29087 d_id
            FROM DUAL
          UNION ALL
          SELECT 103 customer_id, 'VIJAG' first_name, 'UJIK' last_name, TO_DATE ('01-JAN-1950', 'dd-mon-yyyy') dob,
                 67890 zipcode, 27689 d_id
            FROM DUAL
          UNION ALL
          SELECT 104 customer_id, 'BONY' first_name, 'PANDA' last_name, TO_DATE ('03-MAY-1961', 'dd-mon-yyyy') dob,
                 12345 zipcode, 27878 d_id
            FROM DUAL),
         data2 AS
         (SELECT 101 customer_id, 'ADA' first_name, 'MICO' last_name, TO_DATE ('15-APRIL-2009', 'dd-mon-yyyy') dob,
                 12345 zipcode, 23456 d_id
            FROM DUAL
          UNION ALL
          SELECT 999 customer_id, 'MICLE' first_name, 'DON' last_name, TO_DATE ('10-MARCH-1980', 'dd-mon-yyyy') dob,
                 45678 zipcode, 23567 d_id
            FROM DUAL
          UNION ALL
          SELECT 888 customer_id, 'VIJAG' first_name, 'UJIK' last_name, TO_DATE ('01-APR-1999      ', 'dd-mon-yyyy') dob,
                 89897 zipcode, 27689 d_id
            FROM DUAL
          UNION ALL
          SELECT 777 customer_id, 'AAA' first_name, 'BBB' last_name, TO_DATE ('03-MAY-1961      ', 'dd-mon-yyyy') dob,
                 87687 zipcode, 12345 d_id
            FROM DUAL)
    SELECT customer_id, first_name, last_name, dob, zipcode, d_id, f_flg
      FROM (SELECT customer_id, first_name, last_name, dob, zipcode, d_id, f_flg,
                   ROW_NUMBER () OVER (PARTITION BY customer_id ORDER BY f_flg) rn
              FROM (SELECT DISTINCT d.customer_id, d.first_name, d.last_name, d.dob, d.zipcode, d.d_id,
                                    CASE
                                       WHEN d.customer_id = d2.customer_id
                                          THEN 'M'
                                       WHEN d.first_name = d2.first_name
                                       AND d.last_name = d2.last_name
                                       AND d.dob = d2.dob
                                       AND d.zipcode = d2.zipcode
                                          THEN 'M'
                                       WHEN d.first_name = d2.first_name AND d.last_name = d2.last_name AND d.d_id = d2.d_id
                                          THEN 'M'
                                       ELSE 'N'
                                    END f_flg
                               FROM data1 d, data2 d2
                           ORDER BY 1, DECODE (f_flg, 'M', 1)))
    WHERE rn = 1Regards,
    Mahesh Kaila

  • Search with multiple words not returning expected results

    I am using RoboHelp 9 and was performing my search on published WebHelp.
    In the Help there is a topic named "Port and Path Connection States" which references a status of "port not started".
    When I search for "port not started" (with quotes) the topic is returned.
    When I search for "port not started" (without quotes), I get this message: "The words you typed is not a valid expression.".
    I thought this search would be treated as an OR search, and I would get results for all topics that contained the word "port" or "not" or "started", but instead the expression is not valid. Can anyone tell me why? 

    Check your list of Stop words. It may include NOT.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Search with multiple "like" strings

    Hello!
    I have a search form (table based on pl/sql block) with 3 textfields to insert search terms.
    I want to perform queries like in google, for example:
    Term1: Oracle
    Term2: Mangold
    Term3: SQL
    The result table should show ALL rows containing Term1 AND Term2 AND Term3
    My code gives me all rows containing Term1 OR Term2 OR Term3...
    Here is what I did so far...
    (textfields are named t1, t2, t3, search destination field is named x)
    select ...
    from ...
    where UPPER(x) like '%' || upper(:t1) || '%' and UPPER(x) like '%' || upper(:t2) and UPPER(x) like '%' || upper(:t2)
    My code is:
    BEGIN
    q:='select ' ||
    't.TAPES_PK,' ||
    't.PROJECT_FK,' ||
    'substr(t.TAPE_TITLE, 1, 40) TAPE_TITLE,' ||
    't.TAPE_NO,' ||
    't.LOCATION_FK,' ||
    't.LOCATION_TITLE,' ||
    't.SHOT_DATE,' ||
    'substr(t.TAPE_DESCRIPTION, 1, 30) TAPE_DESCRIPTION,' ||
    't.VIDEO_FORMAT,' ||
    't.CLIPSCOUNT, ' ||
    'TM_GET_FILENAME_FROM_PK(t."TAPES_PK") FILENAME ';
    f:='from "#OWNER#"."TM_VIEW_TAPE_LIST" t where 1=1 ';
    if :P201_SEARCH_STRING is not null then
    wstring:='and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING) || '%'' ';
    end if;
    if :P201_SEARCH_STRING1 is not null then
    wstring:='and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING1) || '%'' ';
    end if;
    if :P201_SEARCH_STRING2 is not null then
    wstring:='and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING2) || '%'' ';
    end if;
    if :P201_SEARCH_SHOT_DATE is not null then
    wshot:=' and SHOT_DATE=to_date(''' ||
         :P201_SEARCH_SHOT_DATE || ''' , ''DD.MM.YYYY'') ';
    end if;
    if :P201_SEARCH_TAPE_NO is not null then
    wno:=' and TAPE_NO = :P201_SEARCH_TAPE_NO ';
    end if;
    if :P201_SEARCH_LOCATION <> -1 then
    wloc:=' and LOCATION_FK = :P201_SEARCH_LOCATION';
    end if;
    q:=q || f || wstring || wshot || wno || wloc;
    RETURN q;
    END;
    Thanks a lot
    Johann

    Shouldn't your code be:
    wstring := '';
    f :P201_SEARCH_STRING is not null then
    wstring:=wstring || " and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING) || '%'' ';
    end if;
    if :P201_SEARCH_STRING1 is not null then
    wstring:=wstring || " and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING1) || '%'' ';
    end if;
    if :P201_SEARCH_STRING2 is not null then
    wstring:=wstring || " and upper(TAPE_TITLE) like ''%' || upper(:P201_SEARCH_STRING2) || '%'' ';
    end if;
    Andy

  • How to search with multiple search condition in MDM5.5 API.

    hello my friends,
    how can i obtain right records like SQL:  "select * from mainTable where (A=a and B=b) or (A=c and B=d) or (A=e and B=f)";
                  A,B:fieldCode
                  a,b,c,d,e,f :fieldValue
    Thanks!

    Hi Orloffmax,
    I missed a point here.
    All field dimensions within a search group needs to be the same field dimension.
    For example:
         (A=a || A=b) // OK
         (A=a || B=b) // not OK
    So you are getting the below error.
    So the only option left to perform search now is
    1. Create a Search Object for (A=a and B=b), Perform the search and Save the list of RecordsIds
    2. Create a Search Object for (A=c and B=d), Perform the search and Save the list of RecordsIds
    3. Create a Search Object for (A=e and B=f), Perform the search and Save the list of RecordsIds
    4. As you have to perform an OR Operation Search on all the above 3, you can do a round about thing as APIs are not helping much. You can put all the above Records in a HashMap with both Key and Value as RecordId. By doing this you'll get a list of Unique record Ids.
    I am not able to find out a way in which the APIs can help you more, so have suggested you such an approach. If you ever find a better one, do share please.
    Regards,
    Sruti

  • Create Dynamic groups with multiple criteria

    Hello,
    I want to create a dynamic group of sql computers in a particular domain.
    What should be the criteria?
    System creates this:
    ((object is windows computer and (dns domain name equals contoso.com) and true) OR (object is SQL computers and (display name matches wildcard *) and True))
    How can I set to below?
    ((object is windows computer and (dns domain name equals contoso.com) and true)
    AND (object is SQL computers and (display name matches wildcard *) and True))
    Thanks

    Use
    the link that Blake already supplied to the site of Jonathan and use this XML part.
    Replace the XXXXXXXXXX of course with the name of your class/group. Don't forget to add a reference to the SQL Server Core Library Management Pack. 
    <RuleId>$MPElement$</RuleId>
    <GroupInstanceId>$MPElement[Name="XXXXXXXXXX"]$</GroupInstanceId>
    <MembershipRules>
    <MembershipRule>
    <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]$</MonitoringClass>
    <RelationshipClass>$MPElement[Name="SC!Microsoft.SystemCenter.ComputerGroupContainsComputer"]$</RelationshipClass>
    <Expression>
    <Contains>
    <MonitoringClass>$MPElement[Name="MicrosoftSQLServerLibrary!Microsoft.SQLServer.DBEngine"]$</MonitoringClass>
    <Expression>
    <RegExExpression>
    <ValueExpression>
    <HostProperty>
    <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]$</MonitoringClass>
    <Property>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/DNSName$</Property>
    </HostProperty>
    </ValueExpression>
    <Operator>MatchesRegularExpression</Operator>
    <Pattern>domain.(dev|net)/Pattern>
    </RegExExpression>
    </Expression>
    </Contains>
    </Expression>
    </MembershipRule>
    </MembershipRules>
            </Configuration>

Maybe you are looking for

  • How do I display RAW photos from Photoshop Elements 11 on Apple TV?

    Hi, Ever since I got my Apple TV 3rd gen I have been able to simply turn on itunes and stream my albums from photoshop without an issue.  The shots are mostly RAW and came out perfectly on the big screen.  They also still appear on my ipad without an

  • How do i wipe the harddrive clean on my macbook Air 1,1

    I have an Original MacBook Air 1,1 2008 I want to wipe the harddrive clean so i can sell it. I do not have access to an optical harddrive to do a remote install on it. What else can i do to wipe the harddrive clean? Also I still have the opriginal ow

  • Second AE for a PC

    So, I have one AE as my Ethernet connected router. I can stream music through it to a pair of computer speakers using airplay from my touch and iPad...Horray !!! Now it's time to set up the second AE for my Hometheater using another AE. I'm just as p

  • Receiving errors after modifying "How-to" javascript

    I've succeefully used the "disable" javascript from this example: http://otn.oracle.com/products/database/htmldb/howtos/htmldb_javascript_howto2.html#disable. However, when I try to run it on a separate page for different items I receive javascript e

  • How to check JDK version

    Hi I have windows XP installed and I want to know what version of JDK is installed. Can anyone know how to check that? Thanks, Vishal