List:General Discussion« Previous MessageNext Message »
From:Nigel Peck Date:March 13 2009 7:24pm
Subject:Re: Getting single results per (left) record with INNER JOIN
View as plain text  
Nigel Peck wrote:
> ...
> My query is:
> 
> SELECT
>     `People`.`person_id`,
>     `People`.`name`,
> FROM
>     `People`
> INNER JOIN
>     `Person_postal_addresses`
> ON
>     `Person_postal_addresses`.`person_id` = `People`.`person_id`
> WHERE
>     `People`.`name` REGEXP 'example'
>     OR
>     `Person_postal_addresses`.`address` REGEXP 'example'
> ;

Sorry, there was a typo in my query, should have been:

SELECT
     `People`.`person_id`,
     `People`.`name`
FROM
     `People`
INNER JOIN
     `Person_postal_addresses`
ON
     `Person_postal_addresses`.`person_id` = `People`.`person_id`
WHERE
     `People`.`name` REGEXP 'example'
     OR
     `Person_postal_addresses`.`address` REGEXP 'example'
;

Thread
The <=> operatorMorten13 Mar
  • Re: The <=> operatorMichael13 Mar
    • avoiding use of Nulls (was: The <=> operator)Ray13 Mar
      • Re: avoiding use of Nulls (was: The <=> operator)michael13 Mar
        • Re: avoiding use of Nulls (was: The <=> operator)Thomas Spahni13 Mar
          • Re: avoiding use of Nulls (was: The <=> operator)michael13 Mar
            • Re: avoiding use of NullsAndy Wallace13 Mar
              • Re: avoiding use of NullsArthur Fuller14 Mar
            • Re: avoiding use of NullsPJ13 Mar
            • Re: avoiding use of Nulls (was: The <=> operator)Claudio Nanni14 Mar
              • Re: avoiding use of Nulls (was: The <=> operator)Morten14 Mar
              • Re: avoiding use of Nulls (was: The <=> operator)michael14 Mar
                • Re: avoiding use of Nulls (was: The <=> operator)Mattia Merzi15 Mar
                • Re: avoiding use of Nulls (was: The <=> operator)Claudio Nanni15 Mar
                  • Re: avoiding use of Nulls (was: The <=> operator)Don Read15 Mar
                    • W2008 Server Issues?MCUSA)16 Mar
                      • Re: W2008 Server Issues?David M. Karr16 Mar
            • Re: avoiding use of Nulls (was: The <=> operator)Mattia Merzi14 Mar
        • Re: avoiding use of Nulls (was: The <=> operator)Ray14 Mar
          • Re: avoiding use of NullsAMichel Durand14 Mar
      • Getting single results per (left) record with INNER JOINNigel Peck13 Mar
        • Re: Getting single results per (left) record with INNER JOINNigel Peck13 Mar
          • Re: Getting single results per (left) record with INNER JOINArthur Fuller14 Mar
            • Re: Getting single results per (left) record with INNER JOINNigel Peck14 Mar
              • Re: Getting single results per (left) record with INNER JOINJohan De Meersman15 Mar
                • Re: Getting single results per (left) record with INNER JOINNigel Peck15 Mar
        • Re: Getting single results per (left) record with INNER JOINJoerg Bruehe16 Mar