[AccessD] complex query!! (solution)

Gustav Brock Gustav at cactus.dk
Sun Jan 23 05:17:29 CST 2005


Hi Scott

But the key has to be nice (= unique)!

/gustav

>>> marcus at tsstech.com 23-01-2005 05:33:41 >>>
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)

> 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];




More information about the AccessD mailing list