Re: max min question



"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.


.



Relevant Pages

  • Re: ASP Login Script not working
    ... I'm sure if I were more knowledgeable with ASP I would do just that, but alas I'm not and your reply helps me little ... I am trying to protect a portion of a web site by allowing users to register ... created a small Access database called UserDB.mdb, which stores the username ...
    (microsoft.public.inetserver.asp.db)
  • Re: How to assign a fixed identity to ASPNET process?
    ... > username password when the ASP.NET application attempts to write a file. ... > I used my FTP account which does allow me to write to the specified ... >> Secure pages with ASP! ... >> Read our most recent edition of Insights ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: POST data from aspx page to asp page
    ... post to a page using the normal ASP method and use HTML controls. ... I want to pass username & password from ... Give me a sample code to send a username and password to it, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Login failed for user...
    ... DSN connnection to DB from ASP page ... When they submit the authentication form with their username and password now they get this: ...
    (microsoft.public.sqlserver.server)
  • Re: About Response.Redirect
    ... I want user to login to our FTP ... > server via an asp page on my website with their username and password. ...
    (microsoft.public.inetserver.asp.general)

Loading