List:General Discussion« Previous MessageNext Message »
From:Stephen Moretti Date:January 5 2005 1:22pm
Subject:Re: Retrieving partial field values
View as plain text  
Kentucky Families wrote:

>Very new to MySQL and this list. Thanks in advance for your patience with elementary
> questions. I'm in process of converting a current web site to a mysql database. As this
> database will eventually contain millions of records, I want to set it up properly.
> 
>The database will contain transcriptions of birth, marriage and death records. For
> surname fields, I would like for my transcribers to be able to enter multiple values for
> records that are difficult to read. For instance, a surname that could be read Stotts or
> Statts or Stutts. If I use a VARCHAR or TINYEXT field to enter these values and I want to
> be able to retrieve all records where the surname field contains the whole word Stotts,
> how would I enter these values:
> 
>stotts or statts or stutts
>stotts,statts,stutts
>other?
>  
>
You need to do an IN query.

SELECT column,list,here
FROM tblBMD
WHERE Surname IN ('stotts','statts','stutts')

http://dev.mysql.com/doc/mysql/en/Comparison_Operators.html#IDX1235

Regards

Stephen

Thread
Retrieving partial field valuesKentucky Families5 Jan
  • Re: Retrieving partial field valuesStephen Moretti5 Jan
    • Re: Retrieving partial field valuesIan Grant5 Jan
      • Re: Retrieving partial field valuesStephen Moretti5 Jan
      • Re: Retrieving partial field valuesKentucky Families5 Jan
        • Re: Retrieving partial field valuesJigal van Hemert6 Jan
          • Re: Retrieving partial field valuesKentucky Families6 Jan
            • Re: Retrieving partial field valuesJigal van Hemert6 Jan
            • Re: Retrieving partial field valuesJigal van Hemert6 Jan
              • Re: Retrieving partial field valuesSGreen6 Jan
            • RE: Retrieving partial field valuesAndy Eastham6 Jan
        • RE: Retrieving partial field valuesSteve Bacher6 Jan
        • Re: Retrieving partial field valuesIan Grant6 Jan
    • Re: Retrieving partial field valuesSGreen5 Jan