Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SQL Search Between Dates

New Here ,
Jun 26, 2006 Jun 26, 2006
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!
TOPICS
Server side applications
260
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 26, 2006 Jun 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!
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 27, 2006 Jun 27, 2006
LATEST
It's sorted now. Thanks for your help.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines