How to search a word in a database field

Results 1 to 3 of 3

Thread: How to search a word in a database field

  1. #1
    Join Date
    Dec 1969
    Posts
    57

    Default How to search a word in a database field

    I know how to find a field that matches exactly the content of a field but not how to if is a piece of the content<BR><BR>I am going nuts, please help

  2. #2
    David A Guest

    Default RE: How to search a word in a database field

    I believe in MS SQLServer you can do a search on a wild card using the % symbol. So when constructing your where clause, you make sure to fill it in for someone doing a wild search. Something like &#039A%&#039 would list all items beginning with A. You can also use &#039%A&#039 which would list all items that have A in it. Try it and see. Oracle may be slightly different, but same principle can apply. If you know SQL you can pretty much take it from here. Access Database may be slightly different too, but again, same principle.<BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    2,493

    Default RE: How to search a word in a database field

    Sql="Select * From TableName Where FieldName Like &#039%" & variable & "%&#039"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •