Scott Marcus
marcus at tsstech.com
Sat Jan 22 22:33:41 CST 2005
Steve, The key doesn't have to be sequential, doesn't have to be the primary key, and doesn't have to be numeric. It just needs to be a single field key (one could probably get around that restriction also with concatenation). Scott ----- Original Message ----- From: "Steve Erbach" <erbachs at gmail.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Friday, January 21, 2005 10:33 PM Subject: Re: [AccessD] complex query!! (solution) > Scott, > > Oooh! Good one. I think that'll do it, as long as the Keys are nice > and sequential. > > Steve Erbach > > > On Fri, 21 Jan 2005 15:39:42 -0500, Scott Marcus <marcus at tsstech.com> wrote: > > The answer is the following, where id is the primary key of Table1... > > > > SELECT ([a].[factor]+[b].[factor])/2 AS Average_OF_Factor, > > a.factor, > > b.factor > > FROM Table1 AS a, > > Table1 AS b > > WHERE [a].[id]<[b].[id]; > > > > Scott Marcus > > TSS Technologies, Inc. > > marcus at tsstech.com > > (513) 772-7000 > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com