Griffiths, Richard
R.Griffiths at bury.gov.uk
Thu Nov 20 05:03:20 CST 2003
try change DISTINCTROW to DISTINCT AFAIK the DISTINCTROW will take into account other fields such as tblHarts.Postcode, tblHarts.Plaats, tblHarts.Oud (if they differ from row to row the row will be returned) with DISTINCT if you only return the two fields [Praktijk] [adres] in your query then this should return the results as required Richard Richard > -----Original Message----- > From: pedro at plex.nl [SMTP:pedro at plex.nl] > Sent: 20 November 2003 11:54 > To: AccessD at databaseadvisors.com > Subject: [AccessD] query > > Hello, > > i have a query in which i want to show each "Praktijk" with the same > "adres". > How can this been done > > now i get > > [Praktijk] [adres] > Janssen rondweg > Janssen rondweg > Janssen rondweg > Janssen herenweg > Hendriks kortweg > Hendriks kortweg > Hendriks langeweg > > > i would like to have > > [Praktijk] [adres] > Janssen rondweg > Janssen herenweg > Hendriks kortweg > Hendriks langeweg > > > <sql> > SELECT DISTINCTROW tblHarts.Praktijk, tblHarts.Adres, tblHarts.Postcode, > tblHarts.Plaats, tblHarts.Oud > FROM tblHarts > WHERE (((tblHarts.Praktijk) In (SELECT [Praktijk] FROM [tblHarts] As Tmp > GROUP BY [Praktijk] )) AND ((tblHarts.Oud)=No)) > ORDER BY tblHarts.Praktijk; > </sql> > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com