Re: max min question
- From: "Chris Hohmann" <nospam@xxxxxxxxxxxx>
- Date: Tue, 19 Apr 2005 14:37:50 -0700
"Jeff" <gig_bam@xxxxxxxxxxxx> wrote in message
news:fJSdnZMja44S7PjfRVn-vQ@xxxxxxxxxxxxxxx
> Is there a way to achieve this?
>
> In a DB I have fields named
> username
> rd1
> rd2
> rd3
> rd4
> rd5
> rd6
> total
>
> each rd is a score that is entered from form going to an asp page. that
> asp page updates the total.
>
> I would like to be able to get a max and min for each username. i know how
> to geta max or min of a field, but with this, i want to be able to get it
> across the row..not down the column. short of using array's..is this
> possible?
> Let me give example
> say username is TOM
>
> the db would look like this
>
> username rd1 rd2 rd3 rd4 rd5 rd6 total
> TOM 75 69 72 65 68 70 416
>
> so i want a script that would tell me the max is 75 and the min is 65
> Can anyone help here??
> TIA
> Jeff
>
Please provide database, version and DDL:
http://aspfaq.com/etiquette.asp?id=5006
http://aspfaq.com/etiquette.asp?id=5009
In the absence of that information all I can provide is narrative. Create a
union query to transform the columns into rows, then perform your aggregate
MIN/MAX functions on the resulting query.
.
- References:
- max min question
- From: Jeff
- max min question
- Prev by Date: Re: max min question
- Next by Date: Re: max min question
- Previous by thread: Re: max min question
- Index(es):
Relevant Pages
|
Loading