Skip to main content
Participant
June 26, 2006
Question

SQL Search Between Dates

  • June 26, 2006
  • 1 reply
  • 288 views
I have a table which contains a list of enquiries that I receive. I have an 'Input_Date' field as a column. I have set up a page on my site on which to input two dates to search between for enquiries. One input field is called Start and the other End.

What is the SQL I would need in order to display the results on a page which I go to after hitting 'submit'? Also, how would I define the variables, 'Request.Form' or 'Request.QueryString'?

Thanks for your help in advance!
This topic has been closed for replies.

1 reply

Inspiring
June 26, 2006
If your 'Input_Date' DataType is datetime or Int you can use a BETWEEN
clause.

eg. WHERE Input_Date BETWEEN Start AND End

As for whether to use Request.Form or Request.Querystring, this depends on
whether you are using POST or GET on submission of the Form.

Do a Google on 'SQL BETWEEN' and you will find loads of good articles. It's
very easy and straightforward to use.

Pat.


"Yorkshire Newbie" <webforumsuser@macromedia.com> wrote in message
news:e7ojm4$4e1$1@forums.macromedia.com...
>I have a table which contains a list of enquiries that I receive. I have an
> 'Input_Date' field as a column. I have set up a page on my site on which
> to
> input two dates to search between for enquiries. One input field is called
> Start and the other End.
>
> What is the SQL I would need in order to display the results on a page
> which I
> go to after hitting 'submit'? Also, how would I define the variables,
> 'Request.Form' or 'Request.QueryString'?
>
> Thanks for your help in advance!
>


Participant
June 27, 2006
It's sorted now. Thanks for your help.