One parameter to search two fields

Hi
Is it possible to have one parameter set up to search 2 fields e.g.
forename+surname like @Name so that the parameter value can search both forename and surname boxes. This is so you can either put in a forename or surname or part of a forename or surname and the correct results will appear.
Thanks

Hi dev-13,
After testing the issue in my local environment, we can try the query which is modified from Olaf like below:
SELECT *
FROM myTable
WHERE FirstName LIKE @Name OR LastName LIKE @Name OR FirstName + ‘ ‘ + LastName LIKE @Name
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • Parameter to search within a field

    Post Author: hd1
    CA Forum: Crystal Reports
    Hello,
    I have a report that is connected to SQL database.  I was wondering if there was a way to create a parameter to search within a specific field in my database table.  The scenario is we have Paralegals and Attorneys who have created a huge Word document that has a table in it.  They have 8 fields in this table and one field in particular is their summary field.  This field can go up to over 1000 characters.  So, we decided to create a SQL database and have them import their data from a Data Access Page using Microsoft Access, then we run a Crystal Report for them. So far it looks good and it's working great.  We can import there current data without any problems.  The problem that I have run into is the way they search for specific entries.  I was wondering if I could create a parameter in the report to search within the summary field.  Again these summary fields can be from one sentance to multiple paragraphs.  I would like to be able to get this going for them, it will make things a lot easier on them. An example would be.  We have multiple entries in this field.
    This is a test entry done 11/27/07
    This is a test entry done 12/3/07
    This is a test import using DTS done 12/3/07.
    Now it would be nice if the users could put in the word 'DTS' in the parameter and it would only show entries containing DTS.  Do you think this is possible. 
    I ran accross a posting by Skodidine and his was something like this.
    {table.field} LIKE & "*"
    But that was relating to a wild card search.  I tried just using {table.field} LIKE but I didn't get any results.  This does sound possible though.

    Post Author: hd1
    CA Forum: Crystal Reports
    So far this seems to give me some results.
    IF {?Summary} = "<none>" THEN TRUE ELSE ({?Summary}) IN LowerCase ({LOEB_Docs.Summary})
    I don't know though, If someone has a more reliable and better one could you let me know?   I did have to add some words in my parameter, by the looks of it, I will have to do that from now on.  So if someone has something better to where I do not have to enter keywords for them, I would appreciate it.  This database is going to continue to grow, it's a reference for them so the keywords could be endless.

  • FM : to call collective Search help and update two fields in SSCR

    Hi Experts,
         I have problem while using collective serach help.
        My scenario is using Collective Search help thru that i want to update 2 fields in my selection screen.
    Thru this function module F4IF_INT_TABLE_VALUE_REQUEST  i can mapping and update two fields using DYNP_VALUE_UPDATE but using this function module i can't able to call my Collective Search help
    in other way
    Thru F4IF_FIELD_VALUE_REQUEST  i can able to call the collective search help but _i can't mapping field and can't updated the
    selection screen field_
    Is any otherway to do it, Please help me ASAP.
    Regards,
    Florian.

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

  • Search Method by more one parameter

    Hi All,
    I am trying to use search method (LOV) which has three parameters..
    How can let the user search by one parameter or two or all..

    Are you asking how to write the SQL for the VO for this?
    How about:
    Where field1=nvl(:p1,field1)
    and field2=nvl(:p2,field2)....

  • Passing two export parameter from search help exit

    hi gurus,
    i need your help
    i need  to import two field from search help exit into two screen field.
    eg.
    parameters : p1 type p1 matchcode id s1,
                        p2 type p2,
    on f4 for p1 i am displaying two field in search help output, p1 and p2.
    i am using search help exit FM to pass value from s1, not using any view or table infact extracting data using other function module. i am filling.
    what i want , when i make a selection on f4 for p1, p2 should also be filled from the same search help s1.
    i allready tried memory id-export option in my search help exit at RETURN event but that does not fits well.
    ASAP reply higly appreciated
    will reward point for sure

    thanks a lot it worked out by defining search help for structure which contain these two fields.
    what i was missing was interface link.
    mandy

  • Update/Insert into two fields based on value of one.

    How would I do the following in ADDT.
    Example:
    I have a database about dogs. When user completes form they make a selection from a recordset feed drop down box of breeds. Lets say they select "PUG" based on the selection two fields are populated from the same recordset size="small" and color="brown".
    I hope I've explained this well enough
    Thanks!
    Rich

    >>
    I think I understand. I'm using two forms One to select the item from a list. I'm passing that items value to the next page where I'm placing that value into a query which will give me the options available based on the query results?
    >>
    what I meant, is first have the user insert the new record and let him specify the desired "breed" already there -- the following page(s) will need to make sure that he´s going to update the newly inserted record with additional values, that´s why you should use the "SELECT dog_id FROM dog_table ORDER BY id DESC LIMIT 1" - query on page 2. However, once this new record had been clearly identified "by id", you can add whatever options available in the secondary table which are related to the "dog_id" (breed) that has been stored when inserting the new record. Maybe *I* don´t get it, lol ;-)
    >>
    I currently do this the dropdown value to a case statement that takes the value of the dropdown and determines the correct values for the database update
    >>
    OK, but when each dog just has one option
    (thought it were two ones: "color" and "size"), isn´t your existing dependant dropdown enough for specifying that "based on breed" option without having to use a hidden field at all ? Ah well, have you ever used ADDT´s / Kollections "dependant drop-down" wizard -- that should do it for one option
    >>
    hidden field that I need to update value based on what the value is above
    >>
    humm -- updating the value of a hidden field in the very same page then ? Never heard of this being possible apart from using some hand-made javascript.
    Guess I gotta ask my dog what it thinks about all that :-)
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Can i report one message and highlight two or more  input field  ?   in WD

    Hi All,
    I can use " report_attribute_error_message " , this will highlight the field with a red border.
    but  can i  highlight the two fields with a red border at the sametime ? 
    Can anyone help me ?
    Thanks!
    Edited by: DDT CHOU on May 6, 2010 10:20 AM

    Hi,
    Yes - but only for a single element
    use method REPORT_ELEMENT_T100_MESSAGE, or REPORT_ELEMENT_ERROR_MESSAGE or REPORT_ELEMENT_EXCEPTION of the message handler..
    data: lo_component type ref to if_wd_component,
          ls_msg type SYMSG,
           lo_message_manager    type ref to if_wd_message_manager.
      lo_component = wd_comp_controller->wd_get_api( ).
      lo_message_manager = lo_component->get_message_manager( ).
    * some code to populate element reference and populate table of attributes...
       lo_message_manager->report_element_t100_message(
                                                 msg                       = ls_msg
                                                 element                   = lo_element
                                                 attributes                = lt_attribs )
    you can pass a table of the attributes you want to relate to the error - but only one element.
    Nor can you highlight a dropdown by index with an error message. (At least not in a table).
    unfortuantely I don't see a way to do the same thing in the FPM message manger. Fingers crossed for NW7.02...
    Hope this helpful,
    Chris

  • Use DISTINCT with two fields to return one record

    I am using OleDB with a SELECT DISTINCT query that is used in C# code to populate a DataGridViewComboBox.  The queried table has two fields: ID and Description. The ID field values are unique. Descriptions may be duplicated. The DataSource of my DataGridViewComboBox
    is ListBoxItems which is a ListBox that is populated from a table. The ValueMember is ID and the DisplayMember is Description.  A sample table might look like this:
    ID    Description
     1     Blue
     2     Blue
     3     Red
     4     Blue
    I want my query to return two records; one for the Red description and only one for the Blue description.  I don't care which Blue description it returns, but I do need the corresponding ID for the selected Blue record and the ID value for the Red record. 
    Using SELECT DISTINCT ID, Description FROM... would give me four records instead of two.  How can I return only two records in this scenario?
    Rob E.

    Using window function:
    create table #temp
    ID int,
    description varchar(20),
    insert into #temp Values(1,'blue')
    insert into #temp Values(2,'blue')
    insert into #temp Values(3,'red')
    insert into #temp Values(4,'blue')
    ;WITH CTE AS (select RN=ROW_NUMBER() OVER (PARTITION BY description ORDER BY newid() ),
    ID,description from #temp)
    SELECT ID, description from CTE
    WHERE RN = 1;
    ID description
    4 blue
    3 red
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • I would like to compare two field and then is it's true then the output will be the 2nd one

    Hello All,
    I am doing a mappong where i need to compare two field and then if there are equal the 2nd one should be the output and 2nd value will be using multiple segment.
    It's for shipment.
    Regards
    Rituparna

    Not sure if i understand correctly. But you are trying to compare one field with multiple occurrences of another field.
    You can make use of the node function "Use One as Many" and repeat the first value as many times as the second value.
    Please refer to below wiki.
    Explain node functions - Process Integration - SCN Wiki

  • Concatinating two fields into one..

    Hi all,
    I have a query wherin i need to concatinate two fields and display it into one.
    Query: We have two fields one of subtype 0001 and d other of subtype 0014. I have to display these two fields together.
    The fields are Pernr   Wtf08   ZAllergy   AEDTM    Zlastillness Exdat.
    Where Pernr wtf08 and zallergy Aedtm are in subtype 0001 and the pernr Aedtm Zlastillness Exdat are from the subtype 0014. I took a workarea of the type a method containing all the above fields. And now i want to show all the fields together in one field while displaying.
    Can u please help me with any pointers or any sample code.
    Thanks,
    Anita

    You can create a new Data field with character 255 or more.
    Then you use the CONCATENATE Function to combine all the field you wanted to.
    e.g.
    CONCATENATE Pernr wtf08 and zallergy Aedtm INTO L_display SEPARATED BY SPACE.
    L_display is the field to concatinate two fields.

  • Get value of two fields into one field

    Hellou,
    i need little help with javascript again
    Currently i'm using code below to get value from one field to other:
    getField("Text35").value = getField("Text1").valueAsString;
    Now i'm wondering how to change this code, so i could get values from two fields into one. For example i have field "firstname" and field "lastname", now i want to show this in field "name".
    Example, if field firstname have value John and field lastname value is Doe, i want to show it in field name like "John Doe".
    I hope that u understood what i want
    Thanks for helping me!

    getField("Text35").value = getField("Text1").valueAsString + " " +
    getField("Text2").valueAsString;

  • Joining Two Fields Into One Field for a View

    I am trying to create a view based off of multiple tables.
    I have all of the joins and everything done nicely and working properly.
    However, when I get to this one step, that's when I start running into problems.
    I just want to join (or concatenate) two fields together with a period character in between them.
    For example, if I take FirstName and LastName, then I want them to become one field called Name, appearing as "JOHN.DOE"
    When I try to join them together, the problem comes up with the period character.
    A sample code of what I have done is here:
    BEGIN
    EXECUTE IMMEDIATE 'create view VIEW_LALALA
    as SELECT t1.FirstName + '.' + t2.LastName as Name, t1.something as Something, t2.ooo as OOO
    FROM (tableFirstNames t1 inner join tableLastNames t2 on t1.nameID = t2.nameID)
    END;

    832667 wrote:
    I am trying to create a view based off of multiple tables.
    I have all of the joins and everything done nicely and working properly.
    However, when I get to this one step, that's when I start running into problems.
    I just want to join (or concatenate) two fields together with a period character in between them.
    For example, if I take FirstName and LastName, then I want them to become one field called Name, appearing as "JOHN.DOE"
    When I try to join them together, the problem comes up with the period character.
    A sample code of what I have done is here:
    BEGIN
    EXECUTE IMMEDIATE 'create view VIEW_LALALA
    as SELECT t1.FirstName + '.' + t2.LastName as Name, t1.something as Something, t2.ooo as OOO
    FROM (tableFirstNames t1 inner join tableLastNames t2 on t1.nameID = t2.nameID)
    END;to concatenate two string together do not use "+", but "||"
    SELECT FIRST_NAME||'.'||LAST_NAME FROM EMP;

  • Input in one formfield go to two different fields in a MySQL tablerow?

    Hi, I hope you can help me with this.
    How can I have input in one formfield go to two different fields in a MySQL tablerow without having the visitor to type out his input out twice?
    With the second one I would like to use md5.
    Any help is greatly appreciated.

    How can I have input in one formfield go to two different fields in a
    MySQL tablerow without having the visitor to type out his input out
    twice?
    You would need to write your query with the WHERE clause when you update to say "WHERE user=$userid".  That's the most basic way.  The $userid variable would need to come from either a session or a cookie if the user is logged in and you don't want them to enter the information again.  Or if this is from a previous page, the $userid could just be equal to the $_POST variable after sanitization.
    With the second one I would like to use md5.
    That's even simpler.  Before submitting the form, just do $md5_pass = md5($pass);
    http://us.php.net/manual/en/function.md5.php

  • Search help that populates two fields on a WEB dynpro page

    Hi there,
    I have created a search help based on a single table ( QPCD ) with two exporting parameters CODEGRUPPE and CODE. When the user selects a their desired entry i would like it to poulate the relevant two fields on the web dynpro screen. I know in a normal dialog screen you could get this to happen automatically, but when implementing it into a web dynpro from abap screen it only returns the first value into the field that the search help was called from. Anyone know how i could get both fields populated?
    Thanks in advance
    Regards
    Mart

    check http://help.sap.com/saphelp_nw04s/helpdata/en/5d/395e4254139041e10000000a1550b0/frameset.htm
    It is not that hard.
    Create a new webdynpro component and implement IWD_VALUE_HELP in this component.
    go to the component controller of you new component and add a new attribute:
    listener type ref to IF_WD_VALUE_HELP_LISTENER.
    in the method set_value_help_listener add the line:
    wd_this->listener = listener.
    then you can create as much views and things you need for your search help.
    To set a selected value just add a method to your component controller which takes the values as import parameters. if you only want to set the value for the attribute it was requested for:
      wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
        name = wd_this->listener->F4_ATTRIBUTE_INFO-name
        value = <value>
    This is the save way
    But you can also call
      wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
        name = 'CODEGRUPPE'
        value = <value_codegruppe>
      wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
        name = 'CODE'
        value = <value_code>
    But keep in mind that if the structure of the element changes, this could lead to short dump if the name of the attribute changes or the attribute was deleted.
    if you want to close the search help window call wd_this->listener->close( ).
    Hope this helps.
    Cheers,
    Sascha

  • Cocatenate the two fields ERDAT and ERZET in one field

    Hello Friends, Please suggest how to Cocatenate the two fields ERDAT and ERZET in one field . in my ZTABLE.ERDAT IS DATE 8 and ERZET tims 6
    so what should  be the new ZCOMBO field length and type
    Please give the ABAP Code to write that in Exit to Populate this Cocatenation of these two fields.
    Thanks
    Sincerely
    Soniya Kapoor

    Hi Soniya,
    Declare the field as Timestamp and use Convert To timestamp statement for Concatenating Date and Time into a single field
    CONVERT for Timestamps
    Converts a timestamp into the correct date and time for the current time zone.
    Syntax
    CONVERT TIME STAMP <tst> TIME ZONE <tz> INTO DATE <d> TIME <t>.
    CONVERT DATE <d> TIME <t> INTO TIME STAMP <tst> TIME ZONE <tz>.
    As long as <tst> has type P(8) or P(11) with 7 decimal placed, and <tz> has type C(6), the time stamp <tst> will be converted to the correct date <d> and time <t> for the time zone <tz>.
    Regards,
    Abhishek

Maybe you are looking for

  • Changing the Admin name

    How can i change the Admin name on my mac mini?

  • How do I save a single page from a PDF file?

    I am trying to save as a pdf file, a single page from an existing PDF file that has 4 pages. How do I do that?

  • Professional 8 Submit buttons

    I know how to create but having problems with xml and pdf extensions. When I select the submit button on my form, the email comes up and the attachment is a xml instead of a pdf. How do you make this a pdf??

  • APEND the file depending upon the source field length

    Dear ALL, Scenario is IDOC to FILE(using File Content Conversion in receiver side) *Requirement:* Payment Id is the field from IDOC. 1st time data for the field length is 6 digit that always end with '0' that is 6th character or 6th position '0'(this

  • How to access complex arrays/types in a class

    public class VirusScanMessage { public byte[] fileContent; public int fileSize; public String messages; public String datLocation; jclass clazz = env->FindClass("VirusScanMessage"); // get field jfieldID byteArrayField = env->GetFieldID(clazz,"fileCo