select * from table WHERE field CONTAINS "ill" - missing parameter

Posted on 2007-07-25
Last Modified: 2010-04-23
I am using the following statement to search for a field that contains some data
select * from table WHERE field CONTAINS "ill"

in a field that contains names such as

thsi should returns the records will & bill
this is giving me a message saying that there is a parameter missing
Question by:CiaranG
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    select * from table WHERE field LIKE "%ill%"
    LVL 39

    Accepted Solution

    select * from table WHERE  CONTAINS(field, "ill")


    Author Comment

    appari when I run your query I get the following
    Syntax Error (missing operator) in query expression 'CONTAINS (ContactName, "time")'

    why is this ?

    angellll - this works - cheers - but what does the LIKE do - if I want to use wild cards can I used the like command
    LVL 17

    Expert Comment

    "f I want to use wild cards can I used the like command"

    The % characters in the LIKE command are wildcards:

    To get everything that ends with ill:  select * from table WHERE field LIKE "%ill"
    To get everything that begins with ill:  select * from table WHERE field LIKE "ill%"

    etc. etc.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now