[AccessD] 10 days before

John Ruff papparuff at attbi.com
Thu Apr 24 00:20:15 CDT 2003


Pedro,
 
Will this do what you are asking?
 
SELECT Table2.TestDate2
FROM Table1, Table2
WHERE (((Table1.TestDate1)=#5/15/2003#) AND
((Table2.TestDate2)>=DateAdd("d",-10,#5/15/2003#) And
(Table2.TestDate2)<=#5/15/2003#));
 
I've taken both tables and added them to a query but they are not joined.  I
set the criteria for TestDate1 in Table1 to equal 5/15/2003 and the criteria
for TestDate2 in Table2 >= 10 days before 5/15/2003 (which is 5/5/2003) and
<= 5/15/2003.
 
This give me all dates between 5/5/2003 and 5/15/2003
 

John V. Ruff - The Eternal Optimist :-) 
Always Looking For Contract Opportunities 

Home: 253.588.2139 
Cell: 253.307/2947 
9306 Farwest Dr SW 
Lakewood, WA 98498 

"Commit to the Lord whatever you do, 
                and your plans will succeed." Proverbs 16:3 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Pedro Janssen
Sent: Tuesday, April 22, 2003 4:08 AM
To: AccessD at databaseadvisors.com
Subject: [AccessD] 10 days before


Hello Group,
 
i have two tables
Tablea has 1 field with dates (1 date per year)
and TableB has 1 date field (1 record per date from all dates between 1950
and 2002) and 10 number fields.
 
What i need is from all the dates that are present in TableA, all the
records from TableB for 10 days back.
 
TIA
 
Pedro Janssen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030423/a13975f6/attachment-0001.html>


More information about the AccessD mailing list