Using the LIKE operator

How do I create a search parameter LIKE for a name?  I wrote this, and it's pulling in all the names, instead of only searching for whatever I entered in.  What did I do wrong?  Please help.
{table.name_last} like ["*", {?Last Name}]
Thank you,
T

I have never seen it written like this.  Are the * entered in the parameter selection?
{table.name_last} like \"*\", {?Last Name}
What does
do in the formula?

Similar Messages

  • Select Performance problems using the 'like' operator

    I have a PL/SQL procedure that uses a cursor which contains a 'like' operator in the where clause. I have two database instances that are theoretically the same, however this code processes about 100,000 rows in 5 minutes on one database and 100,000 rows in several weeks on the other database. I know it is the 'like' operator that is causing the problem, but I don't know where to look in the database setup parameters as to what could be different between the two. Can someone point me in the right direction?

    I tried to think of another way to write the query, but I really need to use the wildcard option on the data I'm searching for. The system I'm working with attaches a suffix to the end of every ID (ie. '214-222-1234-0') The suffix ('-0') increments but the rest of the ID stays the same ('-1','-2',etc...), but I want to find all of the rows where the first 12 characters are the same, so I strip off the suffix and use a wildcard '%' in its place. I tried adding the SUBSTR() function to the left hand column of the where clause, but it was even slower than using the 'like' operator. I know its a sound query, I just can't figure out why it works fine on one database and not the other.

  • Using the LIKE operator with wildcards to match names

    I am using SQL in ColdFusion 9 to match names in an MS Access 2003 database table.
    The Visitors field of MyTable contains the name "Smith" in six records.
    1. Smith Jones Wilson
    2. Smith, Jones, Wilson
    3. Smith(Jr.), Jones, Wilson
    4. Jones Wilson Smith
    5. Wilson Smith Jones
    6. Smith
    7. Smithson, Jones, Wilson
    8. Jones, Wilson, Arrowsmith
    To find out which records contain the name Smith (but not Smithson or Arrowsmith) I now need to write four "OR" lines:
    WHERE MyField LIKE 'Smith[!a-zA-Z]%'  (finds only the Smiths in records 1, 2 and 3)
             OR MyField LIKE '%[!a-zA-Z]Smith'  (finds only the Smith in record 4)
           OR MyField LIKE '%[!a-zA-Z]Smith[!a-zA-Z]%' (finds only the Smith in record 5)
           OR MyField = 'Smith'   (finds only the Smith in record 6)
    I would like to know how to combine these four lines into one which would find all six records containing Smith.
    Thank you for your help.

    As this is a SQL-specific question, you might be better off asking it on a SQL forum?  Does Access even support regexes?
    For a CF the regex you'd be after "\bsmith\b".  You should read the Access regex reference to see if it supports this.  A CF regular expression is no use to you here as the comparison needs to be done on the DB,  not in CF.
    Adam
    Misread the question.  Revising.

  • Why the 'LIKE' operator takes so much time to run?

    I have a table T with 3 columns and 3 indexes:
    CREATE TABLE T
    id VARCHAR2(38) NOT NULL,
    fid VARCHAR2(38) NOT NULL,
    val NVARCHAR2(2000) NOT NULL
    ALTER TABLE T ADD (CONSTRAINT pk_t PRIMARY KEY (id,fid));
    CREATE INDEX t_fid ON T(fid);
    CREATE INDEX t_val ON T(val);
    Then I have the following two queries which differ in only one place - the 1st one uses the '=' operator whereas the 2nd uses 'LIKE'. Both queries have the identical execution plan and return one identical row. However, the 1st query takes almost 0 second to execute, and the 2nd one takes more than 12 seconds, on a pretty beefy machine. I had played with the target text, like placing '%' here and/or there, and observed the similar timing every time.
    So I am wondering what I should change to make the 'LIKE' operator run as fast as the '=' operator. I know CONTEXT/CATALOG index is a viable approach, but I am just trying to find out if there is a simpler alternative, such as a better use of the index t_val.
    1) Query with '=' operator
    SELECT id
    FROM T
    WHERE fid = '{999AE6E4-1ED9-459B-9BB0-45C913668C8C}'
    AND val = '3504038055275883124';
    2) Query with 'LIKE' operator
    SELECT id
    FROM T
    WHERE fid = '{999AE6E4-1ED9-459B-9BB0-45C913668C8C}'
    AND val LIKE '3504038055275883124';
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=1 Card=1 Bytes=99)
    1 0 TABLE ACCESS (BY INDEX ROWID) OF 'T' (Cost=1 Card=1 Bytes=99)
    2 1 INDEX (RANGE SCAN) OF 'T_VAL' (NON-UNIQUE) (Cost=4 Card=12)

    I will for sure try to change the order of the PK and see whether there will be any impact to the performance.
    In our application, val is much closer to a unique value than fid. In the example query, the execution plan showed that the index on val was indeed used in the execution of the query. That's why the 1st query took almost no time to return (our table T has more than 6 million rows).
    I was hoping the 'LIKE' operator would utilize the t_val index effectively and provide similar performance to the '=' operator. But apparently that's not the case, or needs some tricks.

  • What exacly does filtering by the "like" operator do?

    I'm using Apex 3.1 and in my interactive report I'm using the "Filter" option from the action menu. What exactly does the "like" operator do?
    For example if I have a string "male" does the like operator search for all words
    %male
    male% or
    %male%
    Thanks!

    If you test it out you will see that the IRR simply wraps whatever you enter into standard SQL syntax. So, selecting 'Job' 'like' and entering 'MAN' returns no rows against the EMP Table. Changing that to 'Job' 'like' 'MAN%' returns 'MANAGER's and 'Job' 'like' '%MAN' returns 'SALESMAN's (excuse the improper grammar). Your users need to put the % where they want the wildcard. We also mention it in the Help available off the Actions Menu - "The expression is case sensitive and you can use % as a wild card (e.g. STATE_NAME like A%).
    Hope that helps -
    -- Sharon

  • Can I use a LIKE operator in an IF statement in a column formula

    This is what I have so far.
    CASE WHEN Opportunity."Sales Type" LIKE '*New Acct' THEN 'Sale to NEW Customer' END
    I want to display 'Sale to NEW Customer' if opportunity type contains the terms New Acct.

    Try this:
    CASE WHEN Opportunity."Sales Type" LIKE '%New Acct' THEN 'Sale to NEW Customer' END
    The LIKE operator requires a % wildcard rather than the * wildcard.
    Mike L.

  • How can I use the update operation in a VC Model

    Hello experts,
    i try to to use the update operation in my VC model.  I have developed an AS wich return a table. Now i want to update a table row. So I add the update operation to my model. But it doesn´t work. I mapped all attribute between the table and the update service. The event name is submit.
    Another strange thing is: If i try to update in the service browser it cames the error message that the vandatory attribute ... is missing.
    Any ideas??
    Thanks
    Marco

    Hi Marco,
    In this case it is possible that your update service requires a mandatory parameter which you are not providing.
    When you drag your service onto the VC screen, right click on the service and test it.It will give you a clear picture of which parameters are required by the service and besides you can also use some test data to check if the service is working properly.
    Do let me know if this helps.
    Thanks,
    Gaurav.

  • SSRS Expression for Conditional Filtering using the "IN" operator

    Hello,
    I need to filter my dataset based on a parameter:
    If Period= 1 then Week must be in (W1, W2, W3),  Else Week must be in (W10, W20, W30)
    I tried using the "IN" operator but don't know how to create the expression for the "Value" field. I tried the following:
    iif(Parameters!Period.Value = 1,
    "W1, W2, W3",
    "W10, W20, W30")
    But it doesn't work.
    Expression: Week
    Operator: IN
    Value: ???
    Any help would be highly appreciated!

    Hi,
    Use split function.
    See this expression: IIF(Parameters!Period.Value = 1, SPLIT("W1,W2,W3",","), SPLIT("W10,W20,W30",","))
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/8da78c9b-7f0c-42f1-a9c4-82f065f317c9/using-the-in-operator-in-ssrs-expressions
    Thanks Shiven:) If Answer is Helpful, Please Vote

  • Using the LIKE keyword in a SQL query

    Does anyone have an example using the Database Connectivity Execute Query vi and the LIKE keyword? I would like to do something like:
    SELECT TestNum, TestType FROM tests WHERE DeviceType ='Paul_AF125_Ver1' AND DeviceID = 'Test1' AND (TestType LIKE "Cyclic Voltammetry*")
    It works fine if I say LIKE "Cyclic Voltammetry" (without the *) but if I put the * in there, I get no records.
    I'm using Microsofts SQL Server Desktop Engine (comes with Access).
    Thanks,
    Paul

    Paul-
    Thank you for contacting National Instruments. I don't have an example program, but I did find some information for you.
    LIKE - similar to.
    Using the LIKE command, you can use the wildcard symbol %. To find names starting with J : names LIKE 'J%'; Ending in s ? name LIKE '%S'; You can use more than one % charactor too : names LIKE '%sam%'; Also, LIKE is not case sensitive.
    What you have written, may work if you change the wildcard syntax from * to %.
    -Erik

  • Using the "as" operator vs casting?

    I've recently been reading the docs regarding data types in
    AS3 and am still not clear on a few things. If anyone has blogged
    on this, please point me there.
    One problem is that "casting" syntax is the same as top-level
    function syntax. Compare String(objString) to XML(event.result).
    The latter is a top-level function, but the former is a "cast". Or
    is it?
    An option to the String cast is objString.toString(). What is
    the difference? I am not so much interested in the underlying
    details of the language, as in understanding when to use which.
    The same question exists for the top-level function
    XML(event.result), which can be done with the "as" operator:
    event.result as XML. When to use which? Are there performance
    issues? The "as operator" documentation is unsatisfying.
    Any discussion of this will be appreciated.
    Tracy

    ActionScript 3.0 has the
    as operator because it circumvents a deficiency with the
    cast operation () in ActionScript. Consider this:
    var a:Object = new Array(1,2,3,4);
    var b:Array = Array(a);
    What is b? It is an Array of 1 element: [ [1,2,3,4] ];
    The
    as operator takes care of this:
    var b:Array = a as Array;
    The actual difference in the operators is that if the
    variable being cast is not of the proper type, the
    as operator returns null while the () operator throws an
    exception:
    var j:Number = Number(a); // exception!
    var k:Number = a as Number; // NaN in this case, but null
    normally
    The feeling here at Adobe is to use the
    as operator since it is not ambiguous and just check for
    null. If you prefer to catch exceptions and know when X(y) is a
    cast vs a conversion, then use that. More of a preference but at
    times only
    as will do what you need.

  • Using the "this" operator to pass variable references among classes and met

    Hi guys still trying to understand how to use the "this" operator
    can some one tell what I am doing wrong or just make this work for me to see how it works.
    public class ReferencePassing
    public static void main(String[]args)
    ReferencePassing rp = new ReferencePassing();
    System.out.println(rp);
    public ReferencePassing()
    HelperObject ho = new HelperObject(this);
    System.out.println(this);
    class HelperObject
    private ReferencePassing MyReferencePassingBuddy;
    public HelperObject (ReferencePassing theRp);
    MyReferencePassingBuddy = theRp;
    print();
    public void print()
    System.out.println(MyReferencePassingBuddy);
    }

    Hi guys still trying to understand how to use the "this" operatorYou're still trying to understand how to write methods and constructors.
    public HelperObject (ReferencePassing theRp);Syntax error at ';'.
    MyReferencePassingBuddy = theRp;
    print();
    public void print()Syntax error: '}' expected.

  • How do I use the ? operator in JSF tag attributes?

    I want to do something like this:
    <h:inputText styleClass="${myBean.valid ? 'styleA' : styleB'}" ...>
    What do I have to do to use this Expression language?
    With the #{...} expression the ? operator doesnt seem to be available.
    When I use the ${...} expression I am getting this error:
    javax.servlet.ServletException: ServletException in '/WEB-INF/body/Test.jsp': /WEB-INF/body/Test.jsp(12,5) According to TLD or attribute directive in tag file, attribute styleClass does not accept any expressions
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
    Can anybody please help?
    Thanks!

    Personally, i'd do:
    <h:inputText styleClass="styleA" rendered="#{myBean.valid}"/>
    <h:inputText styleClass="styleB" rendered="#{!myBean.valid}"/>

  • Using the Unpivot Operator when in Oracle8i PL/SQL Generation Mode

    Hi,
    when you are validating a mapping with contains an unpivot operator and the PL/SQL Generation Mode is set to Oracle8i (because you're using an Oracle8i 8.1.7. target database) the following error is raised:
    VLD-3127: Cannot generate code for UNPIVOT because the unpivot operator is only supported starting with the Oracle9i version of the database.","The unpivot operator is only supported starting with the Oracle9i version of the database. To resolve this, set the PL/SQL Generation Mode to Oracle9i in the configuration of the Oracle module that contains this mapping.
    When you set the PL/SQL Generation Mode to Oracle9i and after successfully validating the mapping generate the code you can see that within the generated code case-statements are used for the unpivot translation.
    like:
    MIN(CASE WHEN "AGG_YEAR_MONTH" = 200301 THEN "NO_CALLS" ELSE NULL END) "JAN2003_CALLS"
    And as Oracle8i doesn't support the case-statement, the raised validation error is understandable. But the generated code can be easily modified using decode-classes instead of the case-statements.
    results in:
    MIN(DECODE("AGG_YEAR_MONTH",''200301'',"NO_CALLS",NULL)) "JAN2003_CALLS"
    And the generated code works fine in the Oracle8i 8.1.7 target database.
    But now my question:
    Does someone know if it is possible to create a custom unpivot operator in OWB9.2.0 which will generate the code using the decode-class instead of using the case-statements. And if so, how I can create such custom operator.
    Many Thx in advantage!
    Remco

    Hi,
    The reason why OWB does not generate decode statements is that the generated code needs to support both set-based and row-based operation modes. Decodes are valid in SQL (set based), but not in PL/SQL (row based)
    Oracle 8i (8.1.7) does in fact support CASE, but only in SQL statements, not PL/SQL
    Have you considered creating a view to perform the unpivot operation using decode? It should also be possible solve your problem using a function
    Regards,
    Roald

  • Error in Automated activity of BPM using the PI operation mapping.

    Dear Experts,
    We have a BPM process, where we have imported Operation Mapping, to use it in an automated activity. We have created the service reference with localhost and checked the local provider system check box and with type WS.
    While running the scenario the process stops at the automated activity (having the Operation mapping), with error:
    A technical error during invocation: Could not invoke service reference name
    I have tried to recreate the step couple of times but it is always the same error.
    Could you please share your expertise in how to over come the error.
    Thank you,
    Best Regards,
    Ajay

    Hi Ganesh,
    Thanks for your response.
    SOAP and Mail scenario are also using the same inbound proxy structure , and the proxy is working fine in both cases.
    For FTP scenario we are reusing the same inbound proxy but we are facing error .
    SAP is getting
    "XML to ABAP Conversion error with error id as "CX_ST_MATCH_ELEMENT " System expected the element 'Namespace of the inbound service interface' .
    Please guide.
    Thanks,
    Ruchi

  • Cross-post: Using the "as" operator vs casting

    I'm cross posting this because it is technically an
    Actionscript question, but it has real Flex consequences.
    I've recently been reading the docs regarding data types in
    AS3 and am still not clear on a few things. If anyone has blogged
    on this, please point me there.
    One problem is that "casting" syntax is the same as top-level
    function syntax. Compare String(objString) to XML(event.result).
    The latter is a top-level function, but the former is a "cast". Or
    is it?
    An option to the String cast is objString.toString(). What is
    the difference? I am not so much interested in the underlying
    details of the language, as in understanding when to use which.
    The same question exists for the top-level function
    XML(event.result), which can be done with the "as" operator:
    event.result as XML. When to use which? Are there performance
    issues? The "as operator" documentation is unsatisfying.
    Any discussion of this will be appreciated.
    Tracy

    Maltus now I'm totally confused.
    The Flex manual in the TOP LEVEL section (Guess TOP LEVEL
    means that they don't belong to any package) clearly states this
    functions:
    Function Description
    Array Creates a new array.
    Boolean Converts the expression parameter to a Boolean value
    and returns the value.
    decodeURI Decodes an encoded URI into a string.
    decodeURIComponent Decodes an encoded URI component into a
    string.
    encodeURI Encodes a string into a valid URI (Uniform
    Resource Identifier).
    encodeURIComponent Encodes a string into a valid URI
    component.
    escape Converts the parameter to a string and encodes it in
    a URL-encoded format, where most nonalphanumeric characters are
    replaced with % hexadecimal sequences.
    int Converts a given numeric value to an integer value.
    isFinite Returns true if the value is a finite number, or
    false if the value is Infinity or -Infinity.
    isNaN Returns true if the value is NaN(not a number).
    isXMLName Determines whether the specified string is a valid
    name for an XML element or attribute.
    Number Converts a given value to a Number value.
    Object Every value in ActionScript 3.0 is an object, which
    means that calling Object() on a value returns that value.
    parseFloat Converts a string to a floating-point number.
    parseInt Converts a string to an integer.
    String Returns a string representation of the specified
    parameter.
    trace Displays expressions, or writes to log files, while
    debugging.
    uint Converts a given numeric value to an unsigned integer
    value.
    unescape Evaluates the parameter str as a string, decodes
    the string from URL-encoded format (converting all hexadecimal
    sequences to ASCII characters), and returns the string.
    XML Converts an object to an XML object.
    XMLList Converts an object to an XMLList object.
    So how do I do a XML type casting without using the XML
    function for example? or is it the same?

Maybe you are looking for

  • Is there a way to structure the library

    Hi All, I would love to be able to have a more flexible overview of all my files in the Library. I have it sorted by Artist. The list is quite long and if I am looking for a song by U2, I have to scroll and scroll, just to get to the letter U. Is the

  • Custom Button Event Handler

    I'm working on a form that inserts data into my database. The normal Insert PL/SQL just does "doInsert". I want to add in the PL/SQL Button Event Handler a condition statement as follows: IF :new.name_id != null THEN doInsert; ELSE "do something else

  • ZFS and grown disk space

    Hello, I installed Solaris 10 x86 10/09 using ZFS in vSphere, and the disk image was expanded from 15G to 18G. But Solaris still sees 15G. How can I convince it to make notice of the expanded disk image, how can I grow the rpool? Searched a lot, but

  • Display which method called the method (gives you a headache doesn't it)

    Hi, This question might sound a little weird, so maybe read it twice: I would like to see which method called the method. public void test1()    test2(); public void test2()    System.out.println(....); The program output should be, test1 or classnam

  • Contact showing online when they are offline

    Same problem. Maybe it is depending on version/OS running.The situation is as follows: Using Skype (last version) simultaneously on laptop, running Ubuntu Raring, and tablet PC, running Android 4.2.2. Skype is switched on on both machines, but active