Restricting query data

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.
 
A

Arvin Meyer [MVP]

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#
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Restricting Query Data 1
Query Question 1
Filter data from a query 3
Smart Filter For My Query 1
split data 3
count break from 2 hours 3
query using an expression 5
chack input data 0

Top