dunno, try doing a join versus an 'in'... or maybe a distinct FirstName
(perhaps you've got more than one entry with the same first name too)

select FirstName
from table1 inner join table2 on table1.tableid = table2.tableid
where table2.status = 'Paid'

C. Hatton Humphrey, Developer
Fisher, Towne & Associates
716-839-2141 x336
[EMAIL PROTECTED]


> -----Original Message-----
> From: Owens, Howard [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 25, 2002 2:43 PM
> To: CF-Talk
> Subject: (ot) SQL Brain Fart
>
>
> I'm just blanking out on how to do this query.
>
> The query below is returning multiple duplicates of records.  I
> can't figure
> out why.  It looks to me like it shouldn't. Obviously, I'm missing
> something:
>
> SELECT FirstName
> FROM table1
> WHERE TableID IN ( SELECT TableID
>                       FROM Table2
>                       WHERE Status = 'Paid')
>
>
> Obviously, I want only one copy of each record.
>
>
>
>
> Howard Owens
> Internet Operations Coordinator
> www.insidevc.com
> [EMAIL PROTECTED]
> AIM: GoCatGo1956
>
>
> 
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to