Restricting query data

  • Thread starter Thread starter nvacek
  • Start date Start date
N

nvacek

I have a query set so I pull DISTINCT dates in the SQL from 1/1/08 thru
12/31/08 to take out duplicate accounts, this works great when I run the
report quarterly or yearly but I need to run this report monthly. I have 3
tables that work together and these dates are coming from my Activities
table, I keep track of when I have had contact with them.

I am looking to only count these people 1 time in a year (filter by start
date does not work is it is driven by actibvity date) for example if I work
with them in 1/08 run my report in 1/08 they should show up. If I work with
them in 2/08 I do not want them in my 2/08 report as they were counted in
1/08.

How can I filter these clients out. What expression, operator word(s) or do
i need to do it in the SQL can I use.

I have tried Select DISTINCT [Actibity Date] between 1/1/08 and 12/31/08

What string do I need to use to filter out the people I counted in 1/08 and
so on.
 
If you want to leave out a month, use something like:

Select DISTINCT [Actibity Date] between #2/1/08# and #12/31/08#

from now, until the end of the year:

Select DISTINCT [Actibity Date] between Date() and #12/31/08#
 
Back
Top