You need to join the data: select * from table1, table2 where table1.id = table2.FKid
table2 should hold the ID of the record it belongs to in table1. or vice versa Ian On Mon, 25 Oct 2004 14:51:58 -0400, Ewok <[EMAIL PROTECTED]> wrote: > You could try grouping by something distinct or selecting distinct > > -----Original Message----- > From: Phillip Perry [mailto:[EMAIL PROTECTED] > Sent: Monday, October 25, 2004 2:45 PM > To: CF-Talk > Subject: Getting 4 results where there should be only 2 > > When I do something like this... > > <cfquery datasource=#mydbname# name="getinfo"> > SELECT * > FROM Table1,Table2 > </cfquery> > > and there are only 2 records to show, the output shows those 2 records > twice. I'm assuming that its becuase there are 2 tables so it shows it > twice. How do I get around this? This page is independant and has no > variables passed to it from urls or forms. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=38 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182530 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

