Graham,
Wouldn't a query like the following return what you want?
SELECT * FROM ACCIDENTS WHERE DATE > "20/06/2002" AND DATE <
"20/06/2005"
The date format I've used may not be exactly right, but I think the
structure of the query is correct.
Regards,
Keith
-----Original Message-----
From: Graham Herridge [mailto:[EMAIL PROTECTED]
Sent: 21 June 2005 11:39
To: [email protected]
Subject: MI-L Selecting only the last three years worth of data
Hi List!
I have a table of traffic accidents which occurred in the past 25
years. I have been asked to develop a MB tool which will let my users enter
a date, from which my program will then return a query displaying only the
accidents in a 36 month (3 year) block prior to that date.
I can return data from the past 3 years (i.e. from Jan-Dec for each
year), but I need to refine this down even more...
For Example:
Date entered = 20/06/2005
Find all accidents that happened 36 months prior to this.
The resulting data would list accidents that happened between
20/06/2002 and 20/06/2005
My problems occur because I need all the data from 2003/04 but only data
after June 20th in 2002 and before June 20th in 2005. How can I combine all
this data into a single query?
Does anybody have any sample code/psuedo code/ideas which could help
as I'm really stumped?!
Thanks very much!
Graham Herridge
**********************************************************************
The views and comments expressed in this email are confidential to the
recipients
and should not be passed on to others without permission. This email
message does
not necessarily express the views of Bath & North East Somerset Council and
should
be considered personal unless there is a specific statement to the contrary.
This footnote also confirms that this email message has been checked for all
known viruses by the MessageLabs Virus Scanning Service.
Making Bath & North East Somerset a better place to Live, Work and Visit.
**********************************************************************
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com | To
unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16851
This message has been scanned for viruses by MailControl - (see
http://bluepages.wsatkins.co.uk/?4318150)
This email and any attached files are confidential and copyright protected. If
you are not the addressee, any dissemination of this communication is strictly
prohibited. Unless otherwise expressly agreed in writing, nothing stated in
this communication shall be legally binding.
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16853