Selecting data based on user input

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Selecting data based on user input

    Hi !

    I have a table on my sql-server with date, value1, value2
    How can I make a asp where the user can input date range, and the number of
    values to return ? The returned numbers should then be the average for the
    given number of rows.

    If I have 1000 rows in the selected date range, and the user will return
    only 10 numbers, then there will be one average for every 100 values.

    I will use the result to present in a graph.

    Svein Olav Steinmo


    Svein Olav Steinmo Guest

  2. Similar Questions and Discussions

    1. Dynamic generation of list boxes based on user input
      This topic is similar to my last topic, but is slightly different. Again, I'm using session variables and a form wizard that takes the user...
    2. Insert data into a form based on user input
      You have a list menu field call company invoice number and 2 other fields called customer name and cust invoice. Is there a way to have the user...
    3. How do I get the input from a user web cotnrol and build the control based on that?
      Hi, I'm building a user login control, which will accept a username and password in textboxes and a checkbox to keep logged in - pretty much your...
    4. selecting based on a month in a date
      Hi, Asked this on the mySQL list but it seems to be more of a PHP syntax thing that a mySQL thing. In have the following line in PHP <?php...
    5. Loading forms based on user selecting combo box
      How about creating a new table that identifies the form to open for the different Tree/Task combinations? The table would have three columns:...
  3. #2

    Default Re: Selecting data based on user input

    Please don't take this the wrong way.

    Have you created any asp pages before? Have you started working on this
    one?

    Ray at work

    "Svein Olav Steinmo" <svein-olav@steinmo.no> wrote in message
    news:mzfab.30948$Hb.472950@news4.e.nsc.no...
    > Hi !
    >
    > I have a table on my sql-server with date, value1, value2
    > How can I make a asp where the user can input date range, and the number
    of
    > values to return ? The returned numbers should then be the average for the
    > given number of rows.
    >
    > If I have 1000 rows in the selected date range, and the user will return
    > only 10 numbers, then there will be one average for every 100 values.
    >
    > I will use the result to present in a graph.
    >
    > Svein Olav Steinmo
    >
    >

    Ray at Guest

  4. #3

    Default Re: Selecting data based on user input

    As far as setting a date range based on posted fields:

    strSQL = "SELECT * FROM MyTable WHERE (TheDateField >= #" &
    Request.Form("MinDate") & "#) AND (TheDateField <= #" &
    Request.Form("MaxDate") & "#)"

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Developer
    [url]http://www.Bullschmidt.com[/url]
    ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt Guest

  5. #4

    Default Re: Selecting data based on user input

    No, this is my first asp project. Sorry if the question was to basic, but Im
    trying every way to get information. The way I have done the pages I already
    have, is by using access and frontpage.

    Svein Olav

    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:OhjIoYefDHA.2748@TK2MSFTNGP11.phx.gbl...
    > Please don't take this the wrong way.
    >
    > Have you created any asp pages before? Have you started working on this
    > one?
    >
    > Ray at work
    >
    > "Svein Olav Steinmo" <svein-olav@steinmo.no> wrote in message
    > news:mzfab.30948$Hb.472950@news4.e.nsc.no...
    > > Hi !
    > >
    > > I have a table on my sql-server with date, value1, value2
    > > How can I make a asp where the user can input date range, and the number
    > of
    > > values to return ? The returned numbers should then be the average for
    the
    > > given number of rows.
    > >
    > > If I have 1000 rows in the selected date range, and the user will return
    > > only 10 numbers, then there will be one average for every 100 values.
    > >
    > > I will use the result to present in a graph.
    > >
    > > Svein Olav Steinmo
    > >
    > >
    >
    >

    Svein Olav Steinmo Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139