View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 09:40 AM
strawberry
 
Posts: n/a
Default Re: Best way to use subquery?

Don't use a subquery - and don't have duplicate rows!

Use a JOIN instead, something like (untested):

SELECT P.PersonID FROM PersonLocale PL
LEFT JOIN Person P ON P.PersonID = PL.PersonID
WHERE State = 'NC'
ORDER BY LastName,FirstName

Reply With Quote